A Task can be marked as critical by calling Task.
setCritical(true).
During workflow execution, if a critical task fails, the
workflow that composes the task will fail also; whereas,
when a non-critical task fails, the workflow continues
execution and later may complete successfully.
However, if a non-critical parent of a critical task fails,
the workflow will continue execution despite the fact that
the critical task never ran and therefore didn't complete
succesfully.
Some possible solutions below. These differ only in the
implementation and possible represenation in the GUI.
Functionality is identical.
1. When a Task is marked as critical, all parents of the
Task are by implication critical themselves. This could be
implemented in the GUI or in the enactor.
2. Another option is to have two configuration options for
a Task:
'failFlowIfNeverRan' - meaning if didn't run (e.g. due to
allowable failure upstream), fail the workflow. This is the
same as marking all parents of a critical task as being
critical.
'failFlowOnFailure' - meaning if ran and fails fail the
workflow.