Creating a Workflow
  • 24 Nov 2024
  • 5 Minutes to read
  • Dark
    Light
  • PDF

Creating a Workflow

  • Dark
    Light
  • PDF

Article summary

This section describes how to create a Workflow.
A Workflow includes:

  • The Trigger Type in the top node.
    • For Event type: The selected triggering Event in the top node.
    • For Scheduled and Manual types: The selected Action in the second node.
  • As many routes and sub-routes as are needed, where each one can include:
    • Enforcement Actions
    • Action Conditions
    • Events
    • Event Conditions
    • Delays

To create a Workflow

  1. In the left navigation panel, click the Enforcement Center EC_Icon icon, and then click the Workflows tab.

  2. In the All Workflows page that opens, click Create Workflow.

  3. In the left pane of the New Workflow screen that opens, click the Workflow Settings icon WorkflowSettingsIcon, and in the Workflow Settings that open in the right pane, type a Workflow name. The name appears in the Workflow pane.
    WFSettings

  4. In the Trigger Type right pane, select the type of Workflow trigger and configure it, as required.

    • For an Event trigger type, this includes selecting the Event for the top node.
    • For a Scheduled trigger type, this includes setting the Schedule Plan of the triggering Action (that you add in the second node).
  5. For Scheduled and Manual triggers: Add the triggering Action to the second node of the Workflow.

Note:

When you select Trigger Type = Scheduled or Manual, the only button available directly below it is Add Action AddActionButton, as in the second node you need to select the triggering action.

  1. Continue adding nodes to the Workflow. Hover over the + icon under a Workflow node to see the nodes you can add:

  2. When you have completed building the Workflow:

    • For a Workflow with an Event trigger, click Save and Activate to activate the Workflow.
    • For a Workflow with a Scheduled or Manual trigger, click Save and Run to run the workflow.

    The All Workflows folder opens with the newly added Workflow on top of the table. The Workflow is added to the Drafts folder (if configuration is incomplete) or Shared Workflows folder (if configuration is complete).

Note:
  • Click Save at any time during the configuration to save changes to the workflow as you add nodes and remain on the Workflow configuration page.
  • In a Workflow triggered by an Event, the Save and Save and Activate buttons are disabled when a node with a Condition is not fully defined. You must complete condition configuration in order to save the workflow.
  • In a Workflow triggered by an Action, the Save and Run button is disabled when a node with an Action is not fully defined. You must complete the action(s) configuration(s) in order to run the workflow.
  • It is possible to Save a Workflow with a Delay node that is configured with an invalid Delay time. However, you can Save and Run or Save and Activate the Workflow only after you correct the Delay time.

Example - Scheduled Workflow

The following example shows a Workflow that begins with a scheduled Enforcement Action that sends a Slack message. Each time a user responds to the Slack message, an event occurs, and based on the response, the workflow continues.

Configure the Workflow as follows

  1. In the Trigger Type pane, click Scheduled, and configure a schedule plan for the triggering action of the Workflow. The Scheduled label appears in the Trigger By node in the Workflow pane.
  2. Hover over the Trigger By node, click the + icon, and click Add Action AddActionButton. An Action node opens; the system- generated UUID appears on the node (preceded by #). A UUID also appears on the Trigger By node.
  3. In the Action Setup pane, do the following:
    1. Select the Slack - Send Direct Message to Assets Enforcement Action as the triggering action. The action name appears in the Action node.
    2. Select the Module and Query Name of the query that defines the assets on which to run the Workflow, and click Apply.
    3. Configure the Required Fields.
      ExampleActionRequiredFields
    4. In Additional Fields, configure the predefined responses (buttons) to be added to the Slack message that is sent to each user resulting from the query.
      ExampleActionAdditionalFields
Note:

You can also use the Slack - Send Message to Channel enforcement action, which is configured with predefined responses, in a Workflow.

  1. Hover over the Action node, click the + icon, and click AddEventButton.

  2. In the Event pane that opens, select the Slack Message Response event. The Event pane shows the Retrieved Asset from the previous node. It also shows the Retrieves information in the Event node. This event is sent each time a user responds to the Slack interactive message using the Response buttons.
    WFExampleEvent

  3. Hover over the Event node, click the + icon, and click AddConditionButton.

  4. In the Event Conditions pane that opens, add an Event Condition - If Response Equals Yes. This enables performing one action if the response to the Slack message is Yes (True branch), and another action if the response is other than Yes (False branch).
    ExampleEventCond

  5. Hover over the True branch (user Response Equals Yes), click the + icon, and then click AddDelayButton to add a Delay node to the branch. In the Delay pane, configure a delay of 5 hours.

  6. Hover over the Delay node, click the + icon, and then click AddActionButton.

  7. In the Action Setup pane that opens, add the Axonius - Add Tag to Assets Enforcement Action and configure it, including selecting related assets.

  8. Click Save. The Workflow is saved.
    WFExampleImage5




Was this article helpful?