On 2/26/07, Adam Lally <[EMAIL PROTECTED]> wrote:
3) Notification of errors to allow continuing after a failure.  This
would support an action like the current CPM's "continue" action.
There would be a new API:
Flow.onFailure(String failedAnalysisEngineKey, Throwable failure)

If the runtime wanted to continue after a failure, it would call this
method on the Flow Controller, and then would go back to calling
hasNext/next.  Without this notification, a "continue" action wouldn't
make much sense, because a dynamic FlowControlle may make an
assumption that the last step it issued completed successfully.

Note for #2 and #3 I'm not intending on having the existing framework
call these methods, yet.  These Flow Controller extensions are a
prerequisite for doing more advanced flow things like parallel flows
and error recovery.


Actually as I think about it more I wonder if it would be better if
when I add the Flow.onFailure() I also change the framework to call
this method when an error occurs.  The existing FixedFlowControllers
(such as fixed flow) could just refuse to continue, so the default
beahvior would be unchanged.  This could be a configuration parameter
on the FixedFlowController so people could configure their AEs to
continue after errors.  It seems like this would provide some value so
may be worth doing, rather than just adding a method that's never
called.

Possibly we might want to allow the application to control whether the
FlowController is consulted when an error occurs.  This could be made
configurable through the additionalParams map when the Aggregate AE is
constructed.  Then an application could always use "terminate on
error" mode if desired, regardless of the FlowController being used.

Thoughts?

-Adam

Reply via email to