Skip to main content

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.
8.0.0/Workflow-Flowchart-revamp
  • Determining the Next Workflow: Based on whether the comparison yields true or false, the Validator determines the next action. If the result is true, it means the workflow’s outcome met the expected criteria, and the Validator allows the subsequent workflow to be triggered. If the result is false, 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.

note

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.

Validator

3 Click on the newly added Validator, then select the General tab to customize your preferences.

General

Manage General

(*) Indicates an action to be mandatory.

NameDescription
Display Name*Set a name to the workflow for easy identification.
DescriptionSummarize the purpose and functionality of this workflow module.
EnableThis 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.
RuleThis 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.

Configs

Manage Configs

(*) Indicates an action to be mandatory.

NameDescription
Display Name*This field allows you to assign a name to the validator for easy identification.
Validation ConditionThis 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:
  • AND: When AND is selected, all claims specified for the workflow must be satisfied. If even one claim fails, the result will be considered false, and the workflow associated with a false outcome will be triggered.
  • OR: When OR is selected, at least one of the claims specified for the workflow must be satisfied. If any claim is successful, the result will be considered true, and the workflow associated with a true outcome will proceed.
ClaimSelect 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.
  • is equal to: Compares the string exactly with another string. It returns true if both strings are identical in every character.
  • isn't equal to: Checks if the string is not identical to another string. It returns true if there are any differences between the two strings.
  • contains: Checks if the string includes a specific sequence of characters anywhere within it.
  • doesn't contain: Verifies that the string does not include a specific sequence of characters.
  • starts with: Determines if the string begins with a specific sequence of characters.
  • doesn't start with: Verifies that the string does not begin with a specific sequence of characters.
  • ends with: Checks if the string concludes with a specific sequence of characters.
  • doesn't end with: Verifies that the string does not conclude with a specific sequence of characters.
  • matches regex: Validates the string against a regular expression pattern. It returns true if the string conforms to the pattern.
  • doesn't match regex: Checks if the string does not conform to a given regular expression pattern.
ValueEnter 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.

Many