- 24 Nov 2024
- 5 Minutes to read
- Print
- DarkLight
- PDF
Configuring an Event Condition
- Updated on 24 Nov 2024
- 5 Minutes to read
- Print
- DarkLight
- PDF
You can add an Event Condition node under an Event node to determine how to proceed in the workflow based on the event results.
There are two types of Event Conditions:
- Fields condition
- Timeout condition - Relevant only below an Event configured with Timeout.
To configure an Event Condition
- In the Event Conditions pane, select one of the following types of conditions to add to the event in the above node:
- Fields condition - See below how to add a Fields Condition to a Workflow.
- Timeout condition - See below how to add a Timeout Condition to a Workflow.
- At the end of the True branch, hover over the + icon and and do one of the following:
- Click Add Event to add an Event node and then select and configure an event.
- Click Add Action to add an Action node and then select and configure an action to run if the Event in the above node times out after the defined amount of time.
- Click Add Delay to add a Delay node and then configure the Delay node.
- At the end of the False branch, hover over the + icon and do one of the following:
Click Add Event to add an Event node and then select and configure an event.
Click Add Action to add an Action node and then select and configure an action to run if the Event in the above node hasn’t timed out.
Click Add Condition to add an Event condition to the Workflow and configure as described in this section.
Click Add Delay to add a Delay node and then configure the Delay node.
A node must be added to the ends of both or either of the False and True branches of an Event condition. When there is no node at the end of a False branch and the Event Condition is false, the Workflow completes, and the Run History shows the status of the Workflow as Completed. Similarly, when there is no node at the end of a True branch and the Event condition is true.
Adding a Fields Condition to a Workflow
A Fields condition includes conditions based on one or more of the following types of criteria:
You can add a condition based on event criteria, asset criteria, or both event and asset criteria.
When run, the Workflow proceeds on the True branch if the event data matches all event condition criteria and the asset resolved from the event matches the query criteria. Otherwise, if even one condition criteria does not match, the workflow proceeds on the False branch.
To add a Fields condition to the Workflow
- In the Fields Condition settings, configure at least one condition based on event criteria or based on asset criteria.
Adding Conditions Based on Event Criteria
You can add an event condition based on one or more event criteria.
An event condition based on Event criteria checks if the event data matches the event criteria. For example, for an Asset value changed event that checks assets for changes in their Host Name (string field), the criteria can check if the Host Name of an asset contains "HostA". Or, for a Workday New Hire event, can check if the Hire Date was in the current year. It is also possible to check if the event data matches a value stored in the Workflow Data dialog.
For the Asset value changed event, it is possible to configure each event criteria in the Event condition to be based either on the current value of the field or the previous value of the field. For example, for a Workflow that is set to trigger when an employee's status changes to Terminated, you can add a condition that the workflow continues only if the status changed from Employed to Terminate and does not continue if it changed from Onboarding.
To add conditions based on event criteria
- Under the Condition based on event criteria section, configure the following:
- In the Select Field dropdown, select a field.
- For the Asset value changed event, select Field Value to compare the current value in the condition or Previous Field Value.
- In the Func dropdown, select a function (for example, Equals or Contains).
- In the Value textbox, do one of the following:
- Type a value.
- Open the Workflow Data dialog (click + in the right-hand corner) and in one of the side tabs, click a value. Then paste that value in the Value box of the condition.
- In the Select Field dropdown, select a field.
- To add an additional condition based on event criteria, click + and continue as in step 1.
To remove an event criteria
- Hover over the criteria to remove, and click the x .
If there is at least one other event criteria, the criteria is removed. Otherwise, if it is the only event criteria configured, the criteria values are cleared.
Adding a Condition Based on Asset Criteria
You can add an event condition based on one or more asset criteria by creating a query using the Query Wizard or by using an existing query.
An event based on Asset criteria checks if the asset resolved from the event matches the query criteria. For example, checks if the resolved Device asset has a Windows Workstation (query).
To add a condition based on asset criteria
- Under the Condition based on asset criteria section, create a query using the Query Wizard or use an existing query, to check if the resolved asset matches the query criteria.
- To add an additional condition based on asset criteria, click + and continue as in step 1.
In the following example, a newly created query checks that the user resolved from the above event is active.
The following example uses an existing query to check that the user resolved from the above event is a non-admin user with an expired password.
To clear an asset criteria
- Hover over the criteria, and click the x. The criteria values are cleared.
Adding a Timeout Condition to a Workflow
You can add a Timeout condition only following an Event configured with Timeout. This means that you cannot add a Timeout condition following a triggering Event.
- This condition checks if the Event defined in the previous Event node timed out.
- The Workflow proceeds on the True branch if the previous Event timed out after the defined amount of time. Otherwise, if the Event hasn't timed out, the Workflow proceeds on the False branch.
- The timeout settings from the previous Event node are displayed and cannot be modified.
- The Event Timed Out label is added to the Event Conditions node.
For more information about working with Workflows, refer to the following:
Viewing and Configuring Workflows Events Settings
Selecting and Configuring the Workflow Trigger
Selecting and Configuring a Workflow Event
Configuring an Event Condition
Selecting and Configuring a Workflow Action
Configuring an Action Condition
Deleting and Deactivating/Activating Workflows