Use external actions to validate the inputs of your custom workflows.
Prerequisites
Create a custom workflow with input parameters. For more information, see Create Workflows in the Automation Orchestrator Client.
You can use the input form designer to create external validations for your workflow inputs. External validations use action scripts that return a string value when the input parameter value contains an error. If the input parameter value is valid, the external validation returns nothing.
Procedure
- Log in to the Automation Orchestrator Client.
- Create a validation action.
- Navigate to .
- Click New Action.
- Enter the required information on the Summary tab.
- Enter the validation action input parameters.
Note: The names of the validation action input parameters must be identical to the names of the workflow input parameters that are being validated.
- Enter the script of the validation action on the Script tab.
if (in_1=="invalid") {
return "in_1 can't be invalid!";
}
if (in_2=="invalid") {
return "in_2 can't be invalid!";
}
//inputs are valid, return nothing
Note: The preceding script is a simple example and does not represent the full scope of the validation scripts that can be used.
- Click Save.
- Apply external validation.
- Navigate to .
- Select your custom workflow.
- Select the Input Form tab.
- On the Validations tab, drag and drop the Orchestrator validation element into the canvas.
- In the canvas, select the validation element, enter a validation label, and select the validation action.
- (Optional) Create additional validation elements.
- Click Save.
- Run the workflow.
If the validation encounters an error, it returns a string. If the validation is successful, the validation returns nothing and the workflow run continues.
Results
You created an external validation for your custom Automation Orchestrator workflow.