Configuring an Event Condition
  • 24 Nov 2024
  • 5 Minutes to read
  • Dark
    Light
  • PDF

Configuring an Event Condition

  • Dark
    Light
  • PDF

Article summary

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:

To configure an Event Condition

  1. In the Event Conditions pane, select one of the following types of conditions to add to the event in the above node:
  2. At the end of the True branch, hover over the + icon and and do one of the following:
  3. At the end of the False branch, hover over the + icon and do one of the following:
Note:

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.

UserTerminationWorkflow

To add a Fields condition to the Workflow

  1. 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.

EventConditionAssetValueChanged

To add conditions based on event criteria

  1. 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.
  2. 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

  1. 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.
  2. 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.
EventConditionAssetCriteria

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.
EventConditionAssetSavedQuery

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.

TimeoutCondition

  • 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.



Was this article helpful?