Validator
The Validator ensures that workflows proceed correctly based on predefined criteria. It acts as a checkpoint within the workflow process, comparing the actual outcomes of previous workflows and configurations with the expected results. This comparison determines the appropriate next steps, ensuring that only workflows meeting the specified conditions are executed. Below is a detailed explanation of how the Validator functions with the workflows.
Validation Process: As the workflows are executed, the Validator compares the actual result of that workflow with the expected outcome specified in its configuration. The expected outcomes, or claims, are defined based on the particular workflow chosen before.
Comparison Logic: The Validator compares the actual result from the workflow against the specified value in the configuration, producing a boolean outcome—either true(left-path) or false(right-path). The comparison logic is refined using the AND or OR conditions:
- AND: All specified conditions must be met for the comparison to yield a true result. If any condition fails, the result is false.
- OR: At least one specified condition must be met for the comparison to yield a true result. If any condition is satisfied, the result is true.
- Determining the Next Workflow: Based on whether the comparison yields
true
orfalse
, the Validator determines the next action. If the result istrue
, it means the workflow’s outcome met the expected criteria, and the Validator allows the subsequent workflow to be triggered. If the result isfalse
, the Validator will trigger an alternative workflow.
How to Setup
1 Navigate to Workspace > Workflows, and click on the flow created for Validator.
2 Hover over the plus (+) symbol and select Validator to add it.
The Validator module can be used either before or after a workflow.
When added after a workflow: The Validator displays all claims associated with the previous workflow. You can select these claims in the configurations of the validator to check whether the workflow produced the expected results.
When added as the initial module: Instead of using claims from a previous workflow, you provide an object value. This object value is then checked against the message metadata to perform the validation.
3 Click on the newly added Validator, then select the General tab to customize your preferences.
Manage General
(*) Indicates an action to be mandatory.
Name | Description |
---|---|
*Display Name | Set a name to the workflow for easy identification. |
Description | Summarize the purpose and functionality of this workflow module. |
Enable | This toggle is enabled by default. When enabled, the particular workflow module begins its execution. Conversely, if disabled, the workflow module remains inactive and won't proceed. |
Rule | This determines the criteria for triggering the particular workflow module. When the selected rule is evaluated, and is satisfied, the workflow proceeds as provided. If not, the workflow will not be executed. Note: If no rules are set, the workflow defaults to its standard action without any rule. For more information about the rules, refer here. |
4 Then, click on the Configs tab to set the necessary configurations.
Manage Configs
(*) Indicates an action to be mandatory.
Name | Description |
---|---|
Display Name | This field allows you to assign a name to the validator for easy identification. |
Validation Condition | This setting determines the condition under which the validator will consider a workflow's result as true or false. Multiple conditions can be added, and there are two types of logical operators to define how these conditions are evaluated:
|
Claim | Select the specific claim to compare against the workflow's result. Note that the available claims may differ depending on the workflow selected previously. |
Condition | A string is a sequence of characters used to represent text. In various operations, you can compare, search, or validate these sequences based on specific criteria.
|
Value | Enter the value that the workflow's result should match. The comparison between the result and this value determines the outcome of the validation. |
5 After you've configured everything needed, click on SAVE.
6 Now, for both true and false outcomes, you can add the necessary workflows. There are no limitations on the number of workflows and validators that can be included in a single flow.