Validator node validates the inputs from the previous nodes based on the defined rules. Validator node is used to validate data and then proceed with further execution of the task. If the validation fails, you can specify whether further execution of the task is required or not in the Properties of the node.
In a Ticket Management system, use Validator node to check if the status of ticket is Active and stop further execution of task if status is not active.
Add Validation Rules
Click the Validator node to open the attributes pane. In the Actions tab, specify the rules for the validation:
- Click the icon to add a rule.
- Click on field (1) to specify the input to validate.
- Select whether the input is Constant, Variable, or an Expression in drop-down (2).
- Constant: Provide input text for the rule in field (3).
- Variable: Select input variable in field (3).
- Expression: Provide expression in field (3).
Click the icon to edit expression in the Build your expression here window.
- Enter expression in the Editor.
- Select which group the expression belongs to in the Function Groups drop-down.
- You can also use existing expressions in the selected Function Group that are listed in the Methods field.
- Click the icon to close the window.
- Select the datatype of the input in drop-down (4).
- Select operator for the rule in drop-down (5).
- Click on field (6), repeat steps 3 and 4 to specify the value to validate against.
- Use the
- icon to add a new rule.
- icon to delete a rule.
- icon to add a nested rule.
- Select All or Any option in drop-down (7). By default, All option is selected.
- All: If all the specified rules must be passed to continue the execution.
- Any: If any one of the specified rules must be passed to continue the execution.
Properties Of Validator Node
- Navigate to Properties and enter Name and Description.
- Enable Mark run Failure on Node Fail option as required.
- Enable Stop on Validation Error option, to stop the execution if the validation fails.
Result of Execution in Validator node
After executing the task, the Result of Execution window displays the following tabs:
- Input: The input variables that are mapped to the node are displayed.
- Output: The status of the validation is displayed.
- Run Info: The information of the run such as Run ID, Sequence Number, Iteration ID, Iteration Start Time, Iteration End Time, Iteration Time(in seconds), and Total Node Execution Time(in seconds) are displayed.