- 05 Dec 2024
-
DarkLight
-
PDF
How to Use Transitions and Task States on the Canvas
- Updated on 05 Dec 2024
-
DarkLight
-
PDF
Transitions
In a workflow, transitions connect tasks to each other and control the order of task execution. A transition has two properties that affect its behavior:
- A binding value, which corresponds to a possible finish state of its leading task.
- A direction, which determines whether workflow execution should be moved forward or backward.
By using these two properties, transitions can define multiple conditional execution paths for a workflow.
Task Finish States
When a task is finished executing, it is assigned one of the following finish states.
Finish State | Description |
---|---|
Success | Indicates the task executed without error or matched an evaluation expression. |
Error | Indicates the task encountered errors during its execution. |
Failure | Indicates the task failed to match an evaluation expression or returned as undefined. This is seen when using the evaluation and query tasks, respectively. |
The above table assumes that automatic tasks are used. When using Actionable Tasks, finish states are determined and set manually by the IAP user.
Transition Binding Values
The binding value of a transition corresponds to one of the task finish states. As such, transitions are often referred to as success, error, or failure transitions. You can determine the binding value of a transition by its color:
- Success transitions are green.
- Error transitions are red.
- Failure transitions are purple.
After a task has been assigned a finish state, the workflow will proceed by following any transitions from that task that have a matching binding value.
Example - Determining Which Transition Is Used
The workflow displayed in Figure 1 uses the stringConcat
task to combine two strings together. If the stringConcat
task does not encounter any errors in its execution, the workflow proceeds to the evaluation
task. If the combined strings match the expressions defined in the evaluation
task, the workflow proceeds to the End
task using the success transition. Otherwise, the workflow proceeds to the runShellCommand
task using the failure transition.
Figure 1: Transition Paths
Transition Direction
The second defining property of a transition is its direction. A transition may have one of the following directions as defined in the table below.
Direction | Description |
---|---|
Standard | The transition moves workflow execution forward toward the End task. |
Revert | The transition moves workflow execution backward to a revert point. All previously completed tasks from the revert point forward (including the revert point itself) are reset. The workflow will then continue execution from the revert point. |
The direction of a transition is determined by the type of line it is drawn with:
- Standard transitions are drawn with a solid line.
- Revert transitions are drawn with a dashed line.
Example - Behavior of Standard and Revert Transitions
The workflow displayed in Figure 2 uses the getTime
task to get the current time. If the getTime
task does not encounter any errors in its execution, the workflow is advanced forward to the ViewData
task using a standard success transition. Because the ViewData
task is an actionable task, the IAP user will view the results of the getTime
task. If needed, the user can re-execute the workflow by following the revert failure transition of the ViewData
task. The getTime
task will be re-run, and the workflow will proceed as normal.
Figure 2: Transition Directions
Adding Transitions to an Automation
To create a transition between two tasks:
-
Click the task you want to transition from. The task is highlighted with a dashed border.
Figure 3: Highlighted Task
-
Click within the dashed border and begin dragging toward the destination task. Transition direction is determined automatically; a transition is standard unless you are dragging to a previous point in the workflow.
-
While dragging, assign a binding value to the transition by pressing one of the following:
- S for success
- E for error
- F for failure
-
When the transition snaps to the destination task, release the mouse button.
Figure 4: Adding a Transition
Changing a Binding Value
To change the binding value of an existing transition:
- Click the transition. The transition becomes bold.
- Assign a new binding value to the transition by pressing one of the following:
- S for success
- E for error
- F for failure
Alternatively, right-click the transition and select a binding value from the context menu that appears.
New Canvas Task Status Symbols
Task status symbols on the new workflow canvas are used by Operations Manager to track task status in a job instance. This table lists all the icons used in the New Canvas interface to indicate the status of a task.
Task Status Symbol | Icon | Meaning |
---|---|---|
Green Check Mark | Task completed successfully. | |
Red Exclamation Mark | Task has errored. | |
Blue Circular Arrows | Task is currently running (manual task). |
Related Articles
- Actionable Tasks in Operations Manager
- Jobs in Operations Manager
- Troubleshooting Errors & Warnings on the New Canvas