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

  1. Log in to the Automation Orchestrator Client.
  2. Create a validation action.
    1. Navigate to Library > Actions.
    2. Click New Action.
    3. Enter the required information on the Summary tab.
    4. 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.
    5. 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.
    6. Click Save.
  3. Apply external validation.
    1. Navigate to Library > Workflows.
    2. Select your custom workflow.
    3. Select the Input Form tab.
    4. On the Validations tab, drag and drop the Orchestrator validation element into the canvas.
    5. In the canvas, select the validation element, enter a validation label, and select the validation action.
    6. (Optional) Create additional validation elements.
    7. Click Save.
  4. 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.