How to Use Transitions and Task States in Gen 2
  • 03 May 2024
  • Dark
    Light
  • PDF

How to Use Transitions and Task States in Gen 2

  • Dark
    Light
  • PDF

Article summary

Transitions in Automation Builder Generation 2 behave somewhat differently from transitions in Generation 1. Each task is only permitted to have one outgoing transition of each type (success, failure, and error), and loop and revert transitions are not supported.

The only exception to the one transition per task rule is the decision task. This task is used to choose an execution path among a sets of options based.

How to Add Success Transitions in Gen 2

To add a transition between two unconnected tasks, click the Add Transition button to enter Add Transition Mode and click a task to transition to.

Figure 1: Add Transition
43-Gen2_addTransitionButton

When hovering over a task while in Add Transition Mode, tasks which may be transitioned to will outline in green, while tasks that may not be transitioned to will outline in red. To find out why a particular task may not be transitioned to, click it to create a toast with a warning message explaining the violated rule.

Figure 2: Add Transition Mode: Green
44-Gen2-AddTransitionGreen

Figure 3: Add Transition Mode: Red
45-Gen2-addTransitionError

Press the escape key or click on the empty canvas space to exit Add Transition Mode without adding a transition.

How to Add Failure Handlers in Gen 2

To handle task failures, select the task to handle and use the Failure Handler settings of the Details tab in the Edit Task Menu.

Figure 4: Failure Handler
46-Gen2-addFailureHandler

To use another task to handle failures in the current task, select the Task radio button option and either select the New Task option to create and connect to a new empty task, or select an existing task from the dropdown.

Figure 5: Failure Transition
47-Gen2-failureTransition

To terminate the automation on task failure, use the associated radio button setting: End the automation.

How to Add Error Handlers in Gen 2

To handle task errors, select the task to handle and use the Error Handler settings of the Details tab in the Edit Task Menu.

Figure 6: Error Handler
48-Gen2-addErrorHandler

To use another task to handle errors in the current task, select the Task radio button option and either select the New Task option to create and connect to a new empty task, or select an existing task from the dropdown.

To terminate the automation on task failure, use the associated radio button setting: End the automation.

To use the automation-wide Error handler automation, select the third option in the menu.

Figure 7: Error Transition
49-Gen2-errorTransition

How to Change Error and Failure Visibility in Gen 2

Use the Visibility toggle button in the Primary actions menu to make the error and failure transitions and their tasks transparent.

Figure 8: Visibility Toggle
50-Gen2-visibilityToggleButton

Figure 9: Visibility On
51-Gen2-visibilityON

Figure 10: Visibility Off
52-Gen2-visibilityOFF

Task Success, Failure, or Error in Gen 2

All tasks are able to return an Error or Success status. However, Evaluation tasks, Manual tasks, and Query tasks can return as a Failure. The differences between an Error and Failure are discussed in the next sections.

Gen 2 Task Failure

A task Failure is displayed on the Job Details page and will not show any output to identify what the issue was that caused the failure.

  • A Manual task failure can be triggered by manually working the task to send the workflow down a Failure transition.
  • An Evaluation task will show a Failure that has a False return.
  • A Query task can return either a Failure or an Error.

Gen 2 Task Error

An Error on the Job Details page will display an output message for what went wrong. This can be helpful for locating where the error occurred in the workflow and what troubleshooting may be needed.

  • An issue in a JST task will result in an Error.
  • An issue in a Query task can result in an Error or a Failure.

Further Reading

JSON Transformations can be added directly to transitions in the Gen 2 Automation Builder, allowing data to be seamlessly transformed as it flows between tasks. For further information, refer to the Using the JST on Transition Feature section of the Transformation Options documentation page.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.