Thursday, January 10, 2013

CONTROL TASK



  • 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 WFFails the workflow that is running.
Stop Top-Level WFStops the workflow that is running.
Abort Top-Level WFAborts the workflow that is running.

Example: Drag any 3 sessions and if anyone fails, then Abort the top level workflow.
Steps for creating workflow:
  1. Workflow -> Create -> Give name wf_control_task_example -> Click ok.
  2. Drag any 3 sessions to workspace and link all of them to START task.
  3. Click Tasks -> Create -> Select CONTROL from list. Give name cntr_task.
  4. Click Create and then done.
  5. Link all sessions to the control task cntr_task.
  6. Double click link between cntr_task and any session say s_m_filter_example and give the condition: $S_M_FILTER_EXAMPLE.Status = SUCCEEDED.
  7. Repeat above step for remaining 2 sessions also.
  8. Right click cntr_task-> EDIT -> GENERAL tab. Set ‘Treat Input Links As’ to OR. Default is AND.
  9. Go to PROPERTIES tab of cntr_task and select the value ‘Fail top level
  10. Workflow’ for Control Option. Click Apply and OK.
  11. Workflow Validate and repository Save.
  12. Run workflow and see the result.
clip_image002[7]


No comments:

Post a Comment

Thank you :
- kareem