Create workflows in Dynatrace Workflows
Latest Dynatrace
To build a workflow, you create one, define a trigger, and add tasks. For detailed configuration of the control flow make use of task conditions.
Create a workflow
- On the Workflows overview page, select New workflow.
- Select the default title ("Untitled Workflow") to edit the title.
- In the Choose trigger section, select a trigger type from any of the categories (Event, Schedule, or On demand) and configure it.
- To add the first task select
on the trigger node.
- In the Choose action section, select the action type of the task you want to add.
- The task detail panel on the right shows the task inputs according to your action selection.
- Save the workflow. Any automatic trigger type (events and schedules) takes immediate effect.
Workflow editor
If you create a new workflow or open an existing one, the editor presents the new workflow. The workflow editor consists of three sections:
- Title
Title section
The title section shows you the title of your workflow and offers some interactions with the workflow.
- The name of the workflow. If you have unsaved changes, a Modified badge will show next to it.
- To the right of the workflow name are interactions you can have with the workflow, such as:
- Save the workflow
- Run the workflow
- Quick access to most recent Executions, or open the execution history of the workflow
- Workflow Settings to see the associated actor of the workflow. The actor is the user context the workflow tasks will be run with.
- Private/Public toggle. By default a workflow is only visible to the creator ie. the owner. If its made public any user with the permissions will have access to it.
- Delete the workflow
Workflow editor
The workflow editor pane (the main area under the title) displays a graphical representation of the workflow. It always contains a trigger node that provides access to the trigger configuration. The tasks and their connections (transitions) give you an idea about the control flow.
- To move the workflow, select and drag the background.
Details pane
The details pane on the right provides access to detailed settings and properties of the current selection in the workflow editor.
- To access the trigger configuration, select the trigger node.
- To access the details (such as Input, Conditions, and Options) for a task, select the task.
Trigger
The trigger defines what makes a workflow run. A trigger can be a schedule, event, manual interaction, or API request.
Tasks
Tasks define the inputs for actions, have options to loop, retry or timeout action processing, and define the conditions that make them run. The conditions are either related to states of predecessors or custom expressions.
Add a task
To add a task
- Open the workflow for editing.
- Hover over the trigger node or any existing task in the graph and select
.
- Choose the action type for the task to add it to the workflow.
- optional Select the task name to edit it. The task name must be unique within the workflow. You can use the task name to access its output in the subsequent tasks.
- Fill in the input form of the task to configure its behavior.
- Save the workflow.
- To change the type of the task, select Change action in the upper right of the task details. Change of type discards the current configuration.
- To change the layout of the graph, drag your tasks to new positions. Please mind that the logical flow is still determined by the task state conditions! Rearranging the tasks alone, does not change the logical flow.
Disable or enable a task
While developing or testing a workflow, you often run a workflow over and over again. In such cases, it's often helpful to temporarily disable some tasks in the workflow.
If a task is disabled, it finishes as skipped. In the case of default condition configuration (success and skipped), your workflow will behave the same as if the task runs successfully. The only differene is that the skipped task, won't produce any result. Disabled tasks will render in the editor and monitor in a different style to indicate their state.
To disable a task, open the workflow for editing and do one of the following:
- Hover over the task you want to disable, open the
menu in the upper-right corner of the task node, and select Disable task
- Select the task you want to disable, open the
menu in the upper-right corner of the task details pane, and select Disable task
Remember to Save your workflow to make the change effect the next execution.
To enable a disabled task, open the workflow for editing and do one of the following:
- Hover over the task you want to enable, open the
menu in the upper-right corner of the task node, and select Enable task
- Select the task you want to enable, open the
menu in the upper-right corner of the task details pane, and select Enable task
Remove a task
To delete a task from your workflow, open the workflow for editing and do one of the following:
- Hover over the task you want to delete, open the
menu in the upper-right corner of the task node, and select Delete task
- Select the task you want to delete, open the
menu in the upper-right corner of the task details pane, and select Delete task
- Select the task you want to delete and press the Delete key
Remember to Save your workflow.
Copy a task from another document
Using Open with, you can copy tasks from other documents to reuse in your workflows.
Example
In this example, we have a Grail query in a dashboard that we want to run as a task in a workflow.
To copy a Grail query from a dashboard to Workflows as a task in a workflow
-
In the dashboard, select the query tile that you want to copy to a workflow.
-
Select
>
Open with.
-
In the Open with… window, select the Automate DQL Query Workflows option.
A Select destination box is displayed.
-
In Select destination, you can create a new workflow or select an existing workflow.
-
Select Add.
The Workflows application opens with the selected query added as a workflow task.
-
Edit the workflow as needed.
For details, see Open with.