How to Configure and Edit Tasks in Gen 2
Tasks in Automation Builder represent individual actions taking place. They are the unit from which business logic can be built and fleshed out in Gen 2 Automation Builder. Each task takes a known set of input parameters and produces a known set of output value. In almost every case, each task produces just one output; however,
childJob may produce multiple output values depending on the task configuration. If a task encounters an error, that error may be accessed through a special output value called
FIgure 1: Example Task
Tasks may be created by clicking the Add Node button when the canvas is zoomed to 100%.
Figure 2: Canvas 100% Zoom
Alternately, tasks may be created by clicking the Add Node menu option for lower canvas zoom levels.
Figure 3: Add Node
Both options will create a new empty task between the Start task and End task that was provided with the automation.
Figure 4: New Task
In addition, tasks may be inserted between two existing, connected tasks by hovering over the success transition connecting them and selecting the Insert Node menu option.
Figure 5: Insert Task
Newly created tasks are always empty, and require assignment to a method before they can be run. In order to assign a method to a New Node, click to select it and then use the Task Explorer menu to assign the desired method.
Figure 6: New Task Node
Figure 7: Task Explorer
Search for methods either by their containing application name or by method name to filter and expand the menu.
Figure 8: Search & Filter Task Methods
Click the desired item (method) to assign it to the task and have it added to the task configuration menu.
Figure 9: Method Assigned to Task
To configure a task, click it on the canvas to select it. This will open the Task Configuration panel in the right-hand sidebar. If multiple tasks are selected, the Task Configuration panel will not open.
The Details tab of the Task Configuration panel describes the basic properties of a task, including its Summary, Description, and Actor, as well as its Error Handler and Failure Handler settings.
- The Summary and Description fields may be edited using their respective text areas. Note that the Summary field is used to identify the task throughout the automation, and the title displayed for the task on the canvas will change as the Summary is edited.
- The Actor field is only available on Automatic tasks, and denotes which system user will be marked as responsible for running the task. It may be managed using the Actor dropdown in the Details tab.
- The Groups field is only available on Manual tasks, and denotes which groups of users are permitted to work the task in a job. It may be managed by typing to search for a group, and then clicking the desired group to add it.
- See the Transitions documentation for more details on managing Error Handler and Failure Handler.
Figure 10: Configuring Task Details
The Variables tab contains an expandable panel for each available input parameter for the current task. Each panel will contain the name and type of the parameter, and will designate which variables are required parameters.
Figure 11: Configuring Task Variables
The data provided to a task may come from one of several different sources. The source of the data is specified with the Reference Task dropdown.
Selecting Static from the the Reference Task dropdown denotes a value which is manually entered and will be the same every time the automation is run. Select the radio button for the value editor to provide a value, or select the radio button for None to pass no value in for the parameter.
Figure 12: Static Variable
Selecting Job denotes a value which is provided when the automation is initiated. Use the Reference Variable dropdown to select which job input to use for the current task input. Select custom to enter a custom variable name.
Figure 13: Job Variable
Figure 14: Custom Job Variable
Selecting the summary of another previous task from the Reference Task dropdown will designate the output of that value be provided as the input value for the current task. Select the output variable to use in the Reference Variable dropdown.
Figure 15: Reference Variable
You can mask all outgoing variables on a task, or mask individual incoming variables.
Figure 16: Mask Incoming Variables
Figure 17: Mask Outgoing Variables
Like in the legacy canvas, masked variables will appear as hidden in the Jobs (Operations Manager) views.
Figure 18: Mask Variable Result - Incoming
Figure 19: Mask Variable Result - Outgoing
The Run Window tab is used to designate windows of time in which a task may run. This is useful for requiring specific tasks to be run during maintenance windows.
Figure 20: Configuring a Run Window
Select a value source using the Select Mode dropdown. Static activates the input controls. Enter a Start and End time, as well as Days of the Week. The Start time must be before the End time.
Figure 21: Set Run Window Times
To delete a task, open the Secondary actions menu on the task using the three-dot button (ellipsis) and select the Delete option.
Figure 22: Deleting a Task
To select a single task, click it on the canvas. To select multiple tasks, hold the Shift key, and either click multiple tasks, or click and drag to select tasks by drawing a box.
Figure 23: Selecting Tasks
To copy a task, open the Secondary actions menu using the three-dot button and select the Clone option.
Figure 24: Clone a Task
Retry a Task
From the Automation Builder canvas, a task can be setup to allow an operator of a job to retry it. Two types of task retry are available: automatic and manual. The Automatic Retry is configured on the canvas with options for when to retry, how often, and if there should be a delay between retry attempts. A Manual Retry is available within the Jobs UI; however, to enable this capability, the automation designer must specifically have 'Retry Task' set to true.
To specify the retry settings on the Automation Builder Gen 2 canvas:
Click the Task Details tab.
Switch the Retry Task toggle on.
Select the Automatically Retry Task checkbox. When checked, the task will automatically retry without user intervention.
Retry settings are as follows:
- Retry On: Select a value from the dropdown to set what conditions to allow task retry to occur on.
- Retry Attempts: The number of times to retry a task before the workflow must continue running.
- Retry Delay: The number of seconds between retry attempts a task waits to retry again.
Figure 25: Retry Task Settings
After running the workflow, you can manually retry a task by accessing the job in Operations Manager (IAP→ Operations Manager → Jobs), and clicking the Retry button in the Job Details panel beneath the workflow, if available. You will be presented with a Retry Task modal that contains a previous iteration of retry values. From this modal, you can provide new inputs on the retry. The modal is also resizable. After entering the new inputs, click Continue Job.
Figure 26: Retry Task
Figure 27: Change Task Data on Retry