Hello Mex,
welcome to ruote's mailing list.
== step 1
Restart the ruote system
== step 2
If there are stalled processes, kill them or re-apply them at
their stalled leaves (processes always stall at the leaves anyway)
Best regards,
--
John Mettraux - http://lambda.io/processi
== short answer
On Fri, Mar 30, 2012 at 01:01:30AM -0700, mex048 wrote:
>
> #How to resume THE process (exactly_this_process_wfid) ?
Simply restart ruote, the rest is taking care of for you.
> #Is it somehow preserved in storage?
Yes (ruote takes care of preserving the state of each processes for every
change they go through (that's why it's much slower than vanilla
interpreters))
> #Is it resurrectable at all?
Yes
> #or - it died and 'dead means dead'?
== long answer
On Fri, Mar 30, 2012 at 01:01:30AM -0700, mex048 wrote:
>
> #How to resume THE process (exactly_this_process_wfid) ?
Simply restart ruote, the rest is taking care of for you.
> #Is it somehow preseved in storage?
It depends on when the interruption occured.
> #Is it resurrectable at all?
It depends
> #or - it died and 'dead means dead'?
If the interruption occurred right after the worker picked the launch message
in the 'msgs' folder and right before it saved the first expression and
applied it, the process might die. You end up with a "wfid" that points to
nothing. It's a rare case, but it's not an impossible case.
If the interruption occurred right after an expression was saved and right
before it's applied, the process might stall. You can simply call re-apply on
the stalled leaf and it will go on.
You could do that [automatically] with:
ps = @ruote_engine.ps(exactly_this_process_wfid)
ps.leaves.each { |fexp| @ruote_engine.re_apply(fexp) }
or (maybe better):
ps = @ruote_engine.ps(exactly_this_process_wfid)
ps.leaves.each { |fexp|
@ruote_engine.re_apply(fexp) unless fexp.is_a?(Ruote::Exp::ParticipantExpression)
}
Where we trust the participant implementations to handle interruptions
gracefully.
(note to self: I should package that routine into
@ruote_engine.zap(wfid)
# or
@ruote_engine.shock(wfid)
it could come in handy)
So, it's rare that a process dies, it's more likely it becomes a vegetable,
but in that case you can shock it to bring its anima back.
I hope it helps, cheers,