[
https://issues.apache.org/jira/browse/OODT-212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13218911#comment-13218911
]
Chris A. Mattmann commented on OODT-212:
----------------------------------------
Hey Sheryl, good question. I think the wengine branch does have this
capability. Here's how I was thinking of supporting it:
* if we detect that *ApplicationSuccessFlag* or *TaskSuccessFlag* or
*JobSuccessFlag* is set to 0 in the WorkflowContext metadata, we can say that
the application failed, as detected by the specific WorkflowProcessor or
engine. This can then drive the next state to enter the Workflow into. States
are currently evolving, per OODT-71.
* if it's a CAS-PGE task I believe it will throw an exception if the return
status from the script is 0 or a negative value, so in that case, we could
catch the exception and then transition into a state that's "roll back-able".
This seems to be driven by the state that we're in. One option for rolling back
would be to concretely to do one of 2 things:
h2. (most dramatic)
# Make WorkflowTaskInstance implement a
#rollback(WorkflowTaskConfiguration,Metadata) method.
- the method would require a developer implementing the workflow task to undo
and clean up resources that were expended during execution. We could insulate
this change by implementing it at the CAS-PGE level, but that then cuts out
generic WorkflowTaskInstances from this capability which wouldn't be good IMHO.
h2. (least dramatic)
# Make a specialized AbstractRollbackableWorkflowTaskInstance, make it
implement WorkflowTaskInstance, and then add the additional method requirement
as specified above.
# Ease tasks into implementing this new sub-class:
- first the o.a.oodt.cas.workflow.examples
- then other downstream consumers in the framework, e.g., CAS-PGE
Either way, we're going to have to likely break binary back-compat, but the
benefits far outweigh the issues with that.
That similar to what you were thinking?
> Rollback capability for Workflows
> ---------------------------------
>
> Key: OODT-212
> URL: https://issues.apache.org/jira/browse/OODT-212
> Project: OODT
> Issue Type: Sub-task
> Components: workflow manager
> Environment: From JPL's internal JIRA, pre-Apache
> Reporter: Chris A. Mattmann
> Assignee: Chris A. Mattmann
> Fix For: 0.4
>
>
> Since workflows can involve sequences of PGE-type tasks that can possibly
> fail, and whose failure may invalidate subsequent PGEs that have already been
> processed, it might be good to have a capability for rolling back
> interactions from prior tasks in a workflow. This is a placeholder for future
> patches on that issue.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira