- We can use the Control task to stop, abort, or fail the top-level workflow or the parent workflow based on an input link condition.
- A parent workflow or worklet is the workflow or worklet that contains the Control task.
- We give the condition to the link connected to Control Task.
Control Option
|
Description
|
Fail Me
|
Fails the control task.
|
Fail Parent
|
Marks the status of the WF or worklet that contains the
Control task as failed.
|
Stop Parent
|
Stops the WF or worklet that contains the Control task.
|
Abort Parent
|
Aborts the WF or worklet that contains the Control task.
|
Fail Top-Level WF | Fails the workflow that is running. |
Stop Top-Level WF | Stops the workflow that is running. |
Abort Top-Level WF | Aborts the workflow that is running. |
Example: Drag any 3 sessions and if anyone fails, then Abort the top level workflow.
Steps for creating workflow:
- Workflow -> Create -> Give name wf_control_task_example -> Click ok.
- Drag any 3 sessions to workspace and link all of them to START task.
- Click Tasks -> Create -> Select CONTROL from list. Give name cntr_task.
- Click Create and then done.
- Link all sessions to the control task cntr_task.
- Double click link between cntr_task and any session say s_m_filter_example and give the condition: $S_M_FILTER_EXAMPLE.Status = SUCCEEDED.
- Repeat above step for remaining 2 sessions also.
- Right click cntr_task-> EDIT -> GENERAL tab. Set ‘Treat Input Links As’ to OR. Default is AND.
- Go to PROPERTIES tab of cntr_task and select the value ‘Fail top level
- Workflow’ for Control Option. Click Apply and OK.
- Workflow Validate and repository Save.
- Run workflow and see the result.
No comments:
Post a Comment
Thank you :
- kareem