Create validation rules

You can extend the functionality of an integration task by adding validation rules in the form of JavaScript. A pre-validation script is ran before starting an integration task and a post validation script is ran after completing an integration task.

  1. Click the Validation Rules tab.
  2. To add a pre-validation script, on the Pre-Validation Script section, click Add.
    To add a post-validation script, on the Post-Validation Script section, click Add.

    The Script dialog box is displayed.

  3. Specify a script in this format:
    var brokenrule;
    function Evaluate(n, x)
    {
        if (n==x)
        {
        return true;
        }
        else
        {
        brokenrule = "is not equal!";
        return false;
        }
    }
    Evaluate(membername.Param1, membername.Param2)
    
  4. Modify the conditions and the variables on the script and on the second evaluate statement, replace the values of the parameters, where membername is the name of the integration task and Param is a parameter on the integration task.
    Note: The parameters on the evaluate statement must be from the currently selected task or from previous tasks.
  5. Click Save.

    To edit an existing validation rule, double-click the validation rule. To delete an existing validation rule, select a validation rule and click Remove.

    You can add multiple pre-validation scripts and post-validation scripts in an integration task.

    The scripts are ran according to the sequence that is defined in the Pre-Validation Script section and the Post-Validation Script section.