On Thu, Jul 29, 2010 at 04:12:39AM -0700, zs wrote:
>
> is it possible to set the timeout value dynamically? Something along
> this:
>
> <participant ref="group-publisher" timeout="${field:timeOut}"/>
>
> I'm pretty sure that the timeOut field is resolved properly since it's
> logged with:
>
> <log level="warn" engine-log="yes" message="Timeout: ${field:timeOut}"/
> >
>
> but unfortunately so far I was not able to get it work by that way,
> only when the value is hardcoded. Something like
>
> <participant ref="group-publisher" timeout="2h"/>
>
> I've already tried pretty much ways (up to my knowledge) how to set it
> up, but still can't get it work even though I used to use ${..} pretty
> much in other expressions.
Hello,
this is strange, this ( http://gist.github.com/497885 ) works for me :
---8<---
require 'ruote'
pdef = %{
<process-definition name="test">
<sequence>
<set field="timeout" value="2h" />
<participant ref="alpha" timeout="${f:timeout}" />
</sequence>
</process-definition>
}
engine = Ruote::Engine.new(Ruote::Worker.new(Ruote::HashStorage.new))
engine.register_participant :alpha, Ruote::StorageParticipant
#engine.noisy = true
wfid = engine.launch(pdef)
engine.wait_for(:alpha)
workitem = engine.storage_participant.first
p workitem.fields['params']['timeout']
# ==> "2h"
p engine.storage.get_many('schedules').first['original']
# ==> "2h"
--->8---
Which version of ruote are you using ? On which platform ? Which version of
Ruby ?
Kind regards,
--
John Mettraux - http://jmettraux.wordpress.com
--
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en