Create workflows in Dynatrace Workflows
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 Workflow.
Select the default title ("Untitled Workflow") and enter a new workflow title.
- In the Select 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 (Add task) on the trigger node.
- In the Choose action section, select an action type for the task you want to add. The task details pane 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 sections
If you create a new workflow or open an existing one, the editor presents the new workflow. The workflow editor consists of three sections:
The title section shows you the title of your workflow and offers some interactions with the workflow.
- Workflow title—if you have unsaved changes, a Modified badge appears next to it.
- Actions—to the right of the workflow title are interactions you can have with the workflow.
- Save the workflow.
- Run the workflow.
- Access the most recent Executions or open the execution history of the workflow.
- View the workflow Settings to see the associated actor of the workflow. The actor is the user context in which the workflow tasks are run.
- Switch between the Make private or Make public options. By default, a workflow is only visible to the creator (workflow owner). When you make the workflow public, any user with permissions can access it.
- Delete the workflow.
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.
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.
The trigger defines what makes a workflow run. A trigger can be a schedule, an event, a manual interaction, or an API request.
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 to a workflow
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 a new position. 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 is skipped. In the case of default condition configuration (success and skipped), your workflow behaves the same as if the task runs successfully. The only difference is that the skipped task doesn't produce any result. Disabled tasks are rendered in the editor and monitored 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. Save your workflow. Your changes take effect with the subsequent 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 select Delete on your keyboard.
Save your workflow.
Copy a task from another document
Using Open with, you can copy tasks from other documents to reuse in your workflows.
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.
The Workflows application opens with the selected query added as a workflow task.
Edit the workflow as needed.
For more details, see Open with.