on_error retry infinite number of times every x seconds

25 views
Skip to first unread message

Idan Moyal

unread,
Dec 25, 2013, 11:30:41 AM12/25/13
to openwfe...@googlegroups.com
Hi,

Is it possible to retry a participant on error infinite number of times every x seconds?


Thanks,
Idan

John Mettraux

unread,
Dec 25, 2013, 4:23:21 PM12/25/13
to openwfe...@googlegroups.com

On Wed, Dec 25, 2013 at 08:30:41AM -0800, Idan Moyal wrote:
>
> Is it possible to retry a participant on error infinite number of times
> every x seconds?

Hello Idan,

not really the infinity, not even close:

```
sequence do
set :max => 1073741823
set :x => 12 # seconds
toto :on_error => '${v:x}s: retry * ${v:max}'
end
```

cf http://ruote.io/common_attributes.html#on_error_composing

Another way:

```
sequence do
set :x => 12 # seconds
cursor do
toto
sequence :if => '${f:error}' do
wait '${v:x}s'
rewind
end
end
end
```

(note to self,

rewind :after => '12s'

is quite readable.)


Best regards,

John

Idan Moyal

unread,
Jan 15, 2014, 9:04:05 AM1/15/14
to openwfe...@googlegroups.com
Does the trick.

Thanks!
Reply all
Reply to author
Forward
0 new messages