On Fri, Apr 25, 2008 at 6:57 AM, Arjan van Bentem
<[EMAIL PROTECTED]> wrote:
>
> > <wait runtil="Time.now >= workitem.start_time - (2 * 3600)"/>
>
> This workitem.start_time is your own field, right (and if I understand
> correctly: is some time in the future)?
>
> For such "wait" expression, can one access :launch_time from
> OpenWFE::ProcessStatus?
In those "r" prefixed expression attributes, "wi" and "fe" are
available, being respectively the current workitem and the current
flowexpression.
You could thus do
<wait runtil="Time.now >=
fe.get_engine.process_status(fe.fei.wfid).launch_time + x" />
but maybe the intention is just
<sleep for="x" />
> ${f:launch_time} seems empty. In Densha, ${f:launcher} is set in app/
> controllers/launchp_controller.rb -- in which I can easily add
> something:
>
> def launch
> :
> li = OpenWFE::LaunchItem.new
> li.workflow_definition_url = lp.real_url
> li.launcher = user.name
>
> # NEW
> li.launched_at = Time.now
> :
>
> ...and then use "${f:launch_time}" in my process definition.
It's more economical than fetching the process status (an operation
that has to query the expression storage... with a cache on, it's not
a big problem though).
Best regards,
--
John Mettraux - http://jmettraux.wordpress.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"OpenWFEru users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/openwferu-users?hl=en
-~----------~----~----~----~------~----~------~--~---