Hi,

I am evaluating how Ruote deals with crashes at the workflow level.
Resumption works, with an unexpected side-effect: The engine does
resume a crashed process, but it also runs the workflow once more!

I am probably doing something wrong. Here is a contrived example to
show the problem.

4 steps
----------
Step 1) Run the examples/ruote_quickstart.rb
#=> I received a message from Alice

Step 2) Modify the process definition (so we have time to crash the
process violently). The definition becomes:
---
pdef = Ruote.process_definition :name => 'test' do
  sequence do
    participant :alpha
    wait :for => '5s'            # <= Added statement
    participant :bravo
  end
end
---

Step 3) Run the new example. When it hits the wait (immediate), kill
the script (e.g. CTRL+C)
#=> No output but the interrupt report from the shell.

Step 4) Run again the new example.
#=> I received a message from Alice\nI received a message from Alice
----------

The output message is produced twice after resumption: Output 1 is the
resumption, output 2 is a second run. Possible explanation at this
point: Ruote::ReceiverMixin#launch puts a "launch" message each time
it starts. On resumption, the worker picks any remaining message from
previous runs, and picks "launch" again for another run (the order
depends on the scheduled waiting time). After studying the API, I
could not find any alternative to using Ruote::ReceiverMixin#launch to
avoid the extra "launch" message.

What is a proper way to resume a crashed process without extra run?


Environment information:
* ruote 2.1.10
* ruby 1.8.7 (2010-01-10 patchlevel 249)

-- 
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

Reply via email to