Workflow Operators
Operators allow you to choose the path your workflow should take. Use choice operators to compare two items, or use a loop to perform a set of actions on every item in a list. Operators also include the end steps, used to mark the end of a workflow. Review the operators listed below for more information.
Boolean
A boolean operator is a type of choice operator. It compares two boolean (true or false) values.
Field | Required? | Description |
---|---|---|
Value 1 | No | A JSONPath expression to a TRUE or FALSE value in the step's input, to be compared with Value 2. |
Comparison Operator | Yes | The operator Equals . |
Value 2 | No | A static value or a JSONPath expression to another value in the input, to be compared with Value 1. |
Compare Numbers
A Compare Numbers operator is a type of choice operator. It compares two numerical values.
Field | Required? | Description |
---|---|---|
Value 1 | No | A JSONPath expression to an integer value in the step's input, to be compared with Value 2. |
Comparison Operator | Yes | The operator to use to compare Value 1 to Value 2. |
Value 2 | No | A static value or JSONPath expression to another value in the input, to be compared with Value 1. |
Compare Strings
A Compare Strings operator is a type of choice operator. It compares two text, or string, values.
Field | Required? | Description |
---|---|---|
Value 1 | Yes | A JSONPath expression to a string value in the step's input, to be compared with Value 2. |
Comparison Operator | Yes | The operator to use to compare Value 1 to Value 2. |
Value 2 | Yes | A static value or a JSONPath expression to another value in the input, to be compared with Value 1. |
Compare Timestamps
A Compare Timestamps operator is a type of choice operator. It compares two timestamp values, or the number of days between a single timestamp value and the date a workflow is executed.
Field | Required? | Description |
---|---|---|
Value 1 | Yes | A JSONPath expression to a timestamp value in the step's input, to be compared with Value 2. |
Comparison Operator | Yes | The operator to use to compare Value 1 to Value 2. |
Value 2 | No | A static value or a JSONPath expression to a value in the input, to be compared with Value 1. This value must be either a date in ISO 8601 format, or an integer representing a number of days. The comparison operators Is on the Date, Is Before, Is After, Is On or Before, and Is On or After require a date in the Value 2 field. The comparison operators More Than X Days Ago, Fewer Than X Days Ago, More Than or Exactly X Days Ago, and Fewer Than or Exactly X Days Ago require an integer representing a number of days. Do not include the word "days" or any other unit. |
Define Variable
Custom variables combine existing values with static strings to create dynamic values to use in workflows. Refer to Define Variable Operator for details.
Note
This operator is in Beta.
Loop
The Loop operator allows you to choose a set of steps to perform on a list of items.
To use the Loop operator, drag a set of steps into the canvas inside the tile. This set of steps can include actions and operators, including choice operators. It must meet many of the same requirements as the workflow itself.
Within the Loop step:
- All steps must be connected to at least one other step.
- Each branch within the Loop step must have an end step, so that the loop knows when to finish with an object and restart the set of steps on a new object.
- This end step within the loop does not replace the end step outside of the loop, which signifies the end of the entire workflow instead of the loop itself.
The steps in a loop are executed on items from the input list in parallel with each other. Items are not guaranteed to be processed in any specific order.
Later actions and operators in the workflow can begin before the loop step has finished iterating over all objects in the list. However, the workflow itself can't end until the loop has finished executing. For this reason, adding additional steps outside of the loop between the Loop operator and the end step is not recommended.
Field | Required? | Description |
---|---|---|
Loop Input | Yes | A JSONPath expression to an array, or list, type attribute from the output of a previous step. The Loop operator will iterate through the objects in this array and perform the steps in the loop on these objects. |
Context | No | A JSONPath expression to another step in the workflow that contains additional data you need to use within the loop. This field allows you to select data from outside of the loop that isn't the loop input. |
Refer to the information below for details on the requirements and syntax for the loop's input and context fields.
Loop Input Information
The Loop operator performs a series of steps on a list of items you select using the Loop Input field. When configuring steps within a loop, you can only select data from this Loop Input or from other steps in the loop.
In the Loop Input field, be sure to select an array containing the type of input required by the first step of the loop. For example, if the first step in your loop is Manage Access, select an array of access items such as the accessItems
object returned by the Get Access step. The array you select can contain no more than 100 items. If an item in this list is larger than 512KB, that item will fail when the loop is executed.
To use this data within the loop's steps, it must be referenced using a JSONPath expression beginning with $.loop.loopInput
. You can add attributes to this expression to specify the data from the input the field needs. For example, use $.loop.loopInput.id
to select an ID from the array in the Loop Input field.
Loop Context Information
The Context field within the loop step allows you to select data from an additional node prior to the loop so that that data can be used within the loop. Steps that aren't included in the context field or the input can't be used within a loop.
You can reference data from the Context field within the loop's steps using the JSONPath expression $.loop.context
. For example, if you selected $.getIdentity
within the context field, in reference to a previous Get Identity step, you could use $.loop.context.name
to reference the name attribute within the loop.
Take care to select only the data you need for use within the loop to avoid slowing down your workflow's execution.
The loop operator returns a JSON blob when it completes successfully. The results are divided into objects that successfully completed the steps in the loop and objects that failed.
Open "Loop" JSON Sample
Verify Data Type
The Verify Data Type operator allows you to confirm that the data in a field you select is a specific type, or that it exists at all.
Field | Required? | Description |
---|---|---|
Value | Yes | A JSONPath expression to a variable in the step's input to validate against what you select in Data Type. |
Data Type | Yes | The type of data. At runtime, the attribute in the Value field is compared to the type selected here. |
This step can validate whether the value in the selected attribute:
- Exists
- Is a boolean
- Is a number
- Is a string
- Is a timestamp
- Is null
Comparison Operators
In each choice step, two values are compared. You'll see the following options for the Compare Strings and Compare Numbers steps:
- Contains
- Equals
- Is Greater Than
- Is Greater Than or Equal To
- Is Less Than
- Is Less Than or Equal To
Note that the Contains operator is only available for Compare Strings steps.
End Steps
Each workflow must have at least one end step. These steps can be added to stop your workflow and categorize its execution as a success or a failure. Each branch of your workflow must finish with an end step.
The Executions tab on a workflow's details reflects whether each execution ended in success or failure.
Success
Add this step to your workflow to stop the workflow and mark its execution as a success.
It doesn't have any unique fields.
Failure
Add this step to your workflow to stop the workflow and mark its execution as a failure. This step is used to signify that the workflow ended with an error, and workflow tests that end in this step are considered failed tests.
Field | Required? | Description |
---|---|---|
Failure Name | Yes | The name of the step, used for linking steps together. |
Failure Details | No | Details or notes to be included in the workflow's execution results to explain its failure. |
To learn more about the process of building a workflow, either in the visual builder or using JSON, visit Creating and Managing Workflows.
You can also review our lists of triggers and actions for more information about the other steps you can add to your workflow.