This page explains how to configure Action Conditions within your Axonius Workflows. An Action Conditions node allows you to control your Workflow's run path, branching it based on the outcome of the preceding Action node.
Action Condition Branches
When you add an Action Conditions node after an Action node, it automatically creates True and Run paths, and defaults to an IF condition:
-
True path - Nodes in this path run if the defined condition is met.
-
After path-
- If the condition is met, nodes in this path run after all nodes in the True path have completed.
- If the condition isn't met, the Workflow bypasses the True path entirely and proceeds directly to the nodes in this path.
- The first node in the After path inherits the assets (meaning, 'Runs on') from the node immediately preceding the condition. For example, if Node X is followed by a condition. and Node Y is the last node in the True path, the node following the condition in the After path will run on the assets from Node X.
Adding Subsequent Conditions (ELSE IF / ELSE)
You can build more complex logic by adding ELSE IF or ELSE Action Condition nodes on the After branch following an initial IF condition.
To further refine your workflow's decision-making, add ELSE IF nodes before an ELSE condition. Alternatively, if your logic requires a completely separate set of conditions, you can start a brand new IF condition. This flexibility empowers you to create highly tailored and robust workflow branching.
Types of Action Conditions
You can configure two types of Action conditions:
- Condition based on action result - Evaluates whether the Action succeeded or failed.
- Conditions based on asset criteria - Checks if the assets resolved from the Action meet specified criteria.
Configuring Action Conditions
To configure Action Conditions
- In the Action Conditions pane, choose either or both condition types:
- Condition based on action result - Add a condition based on the success or failure of the action. Proceed to select the action result.
- Condition based on asset criteria - Add conditions to check if the asset resolved from the Action node matches a defined query. Proceed to define the asset criteria.
- Build the True branch:
- Add the first node: At the end of the True branch, hover over the + icon and add the first node to run if the defined conditions are met.
- Add more nodes: To add subsequent nodes, hover over the + icon following the last node in the True branch, and select from the available node types. Repeat this for each node you want to add to the branch.
- Add additional conditions (Else if or Else): Above the After label, hover over the + icon and click one of these options:
- Else IF - This opens an Action Conditions node for configuration, similar to a regular Condition node, allowing you to define another specific condition.
- Else - This opens a non-configurable Action Conditions node. This branch will run if none of the preceding IF or ELSE IF conditions are met.
- Build the After branch: At the end of the After branch, below the After branch label:
- Add the first node: At the end of the After branch, below the After branch label, hover over the + icon and add the first node. This node will run after the True branch completes (if the condition was met), or directly if the True condition wasn't met.
- Add more nodes: To add subsequent nodes, hover over the + icon following the last node in the After branch, and select from the available node types. Repeat this for each node you want to add to the branch.
You must add a node to the end of either or both the After and True branches of an Action Conditions node. If a branch has no subsequent node and is evaluated, the Workflow will complete, and the Run History will show the Workflow status as Completed.
Adding a Condition Based on Action Result
This condition directs the workflow along either the True or After branch, depending on the Action's success or failure.
To add an Action condition based on action result
- In the Action Conditions pane, select Condition based on action result.
- From the dropdown, select Success or Failure. The chosen result appears in the Action Conditions box.
Adding Conditions Based on Asset Criteria
Asset criteria check if the asset resolved from the Action node matches a defined query. For example, you can check if a resolved Device asset has an Asset Unique ID containing a certain number. You can add an action condition based on one or more asset criteria by either creating a new query or using an existing one.
To add a condition based on asset criteria
- Under the Condition based on asset criteria section, determine if the resolved asset matches specific criteria by doing one of the following:
- Define a new Query using the Query Wizard
- Use an existing query - Select a predefined query to evaluate the resolved asset.
- To add an additional asset criterion, click + and repeat step 1.
- To clear an asset criterion, hover over it and click the x. The criteria values are cleared.
Examples
-
A newly created query that checks if the user resolved from the action has an Asset Unique ID containing 99.
-
An existing query that checks if the user resolved from the action is a non-admin user.
Adding the First Branch Node
You can add any of the following nodes below the True and After branches:
- Add Action
- To add and configure an Action node.
- Add Event
- To add and configure another Event node.
- Add Delay
- To add and configure a Delay node.
- Repeat for Each
- To add a Repeat for Each node to define a query and flow for returned assets.