Skip to main content

Workflows

Workflows are a powerful tool that lets you automatically act on monitoring data. Create workflows that generate scheduled reports, notify you about detected issues, or even mitigate them immediately.

This section provides you with guides on how you can leverage Workflows when developing custom apps.

Custom action

A workflow consists of a directed acyclic graph of tasks that defines their invocation sequence. Each task invokes an action with given inputs and might return a result. Dynatrace provides a set of built-in actions, such as JavaScript or HTTP request, and the possibility to create custom actions to extend the platform.

An action consists of the following:

  • A widget that allows users to define the input as a static value or expression, called widgets. The task input the user configures via the widget is stored in the workflow.
  • A Dynatrace app function invoked with the task input by the AutomationEngine at runtime. The AutomationEngine resolves expressions before it invokes the action.
  • An action typically connects to a third party system. Information related to this connection (URL, credentials, etc.) is a specific type of input that defines its schema and can be managed separately. The user can pick it up in the widget and resolve it in the action app function so the connection can be established.

Action widget

The widget is a react app. The UI part of the action allows the user to configure and parameterize a task within a workflow. For example, the built-in HTTP request action lets users specify parameters like HTTP method, URL address, payload, and headers. You can build this input form to suit your action as a developer.

Users can either provide static values or use expressions to reference the results of the earlier steps as task inputs. Find more information about expressions in the user documentation expression reference. To properly support the user in configuring inputs, there are specific Automation action UI components (@dynatrace/automation-action-components) we highly recommend to use for widget implementation. Those support expression auto-completion, input expand mode, etc.

The Dynatrace App Toolkit will set up your widget for communication with the Workflows, thus ensuring task input values are populated, and Automation action component features work.

Action app function

App functions implement the actual logic of an action. When implementing your desired business logic, be aware of the following app function limitations.

The AutomationEngine invokes the action app function while processing tasks and their actions. Any expression used in a task input is resolved at runtime of the workflow. Looking at a task in the execution monitor of Workflows shows all resolved inputs as provided to the function invocation by the AutomationEngine.


Still have questions?
Find answers in the Dynatrace Community