This would definitely work for me but I probably won't be using the
raiseexpression (although I agree that having one makes sense).
Instead I would
have my participants raise a ruby exception when things go wrong. This way I
don't have to put something like raise :if => "${f:__failed__} is set" after
each participant call (assuming raise is the new expression used to trigger
arbitrary exception).
sequence :on-error => "rescue" do
participant :ref => '...'
participant :ref => '...'
...
end
process_definition :name => "rescue" do
...
end
Alternatively and to avoid relying on a language mechanism for raising
exceptions, there could be a standard field (e.g. __failed__) that the
engine understands and automatically raises an exception when it sees it set
(effectively doing an implicit raise :if => "${f:__failed__} is set" after
each expression).
One nice thing about this is that combined with the 'redo' expression we
effectively have a retry mechanism.
--
Raphael.
On Wed, Nov 26, 2008 at 12:12 AM, John Mettraux <[EMAIL PROTECTED]>wrote:
>
> On Wed, Nov 26, 2008 at 4:09 PM, Raphael Simon <[EMAIL PROTECTED]>
> wrote:
> >
> > This looks great. A few questions:
> >
> > 1. What would cause an expression to trigger the 'on-error' sub-process
> > exactly?
>
> In the fact, when applying or replying [to] an expression, errors are
> caught
>
>
> http://github.com/jmettraux/ruote/tree/r0.9.19/lib%2Fopenwfe%2Fexpool%2Fexpressionpool.rb#L941-944
>
> Usually the error journal, if present, handles them.
>
> I'm thinking about placing an observer before the error journal. If
> the process definition or process definition segment registered a
> subprocess for handling errors, this subprocess would get called
> instead of letting the error journal handle the error.
>
>
> > 2. Would that also cause the current sequence to be aborted?
> > 3. Would that apply to concurrence expressions as well?
>
> As I currently see it, it would cause any expression inside of an
> expression with a on-error handler to get "rescued".
>
> It would also mean that there should be a mechanism (an expression)
> for triggering arbitrary exceptions (much like redo and undo can
> short-circuit a segment of process). Have to refine those ideas.
>
>
> > Thanks for the prompt replies. I'm looking forward to resuming this
> > discussion tomorrow (bedtime here in California).
>
> GMT +9 here. Thanks for the strong feedback.
>
>
> Best regards,
>
> --
> John Mettraux - http://jmettraux.wordpress.com
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruote (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
-~----------~----~----~----~------~----~------~--~---