Working with Orchestration Assertions (Release 9.2.5)

The Orchestration Assertions functionality enables you to specify the values that you expect to be produced by an orchestration and validate the data produced by an orchestration. For example, you might assert that a value is expected to be within a certain range or must match a specific numeric value.

When assertions are evaluated during the execution of an orchestration, a collapsible section showing all the assertions and the expected values is displayed and the failed tests are highlighted. An exception is returned only when the orchestration execution fails.

To work with Orchestration Assertions:

  1. In the orchestration design page, click the End node.
  2. Click the Outputs and Assertions icon.

    The grid displays all the components or steps in the orchestration that contain return fields.

  3. Click the Define Assertions tab.
    This image is described in surrounding text
  4. Select the Operator value as required in the Operator drop-down menu.
  5. Define the assertions for the outputs in the Test Value column.
    Note: You can also define assertions for data that is not selected for output in the Define Outputs tab.

    You can also disable the assertions without removing it by disabling the Select option. The Test Value is either a literal value or you can choose an orchestration input or variable. Variables generated from other steps are not available for assertions unless it overwrites an input or a variable.

    • If the output data is an array, click the Define Row Assertions icon (list icon) in the Test Value column. A window where you can define assertions for specific rows is displayed. If you define an assertion for a row number exceeding the result set, then that assertion will fail. For example. If you define an assertion for row 5 and during the execution only 4 rows are returned, all the assertions for row 5 and above will fail.

      (Release 9.2.6.2)You can define an assertion criteria that is evaluated against all the rows returned by an orchestration step. For example, an orchestration might include a data request to return all the sales order lines, and the assertion can evaluate whether all the lines have a line type of S.

      Click the Define Row Assertions icon (list icon) in the Test Value column for the output data that is an array. A window where you can define assertions for specific rows is displayed and you can specify the Operator and Test Value as required for the All Rows column. This image is described in surrounding text.

      The Count option is available for any array generated in the outputs at the group level for the array.

    • If the output is a date type, click the drop-down menu in the Test Value column to select a date based on the current date. You can also use a literal value for the date type and this literal value must be in the matching date format.
    • If you want to get the test values from another step, then the values must be first declared as variables in the Variables tab of the Orchestration Inputs tab. These variables are then available as Test Values and any step can overwrite them.
  6. To save the orchestration assertions, return to the Orchestrations design page and click Save.

    If your orchestration calls another orchestration, the Select Assertion option is available at the called orchestration level on the Define Assertions tab. This option enables you to execute and show results of all the assertions defined in the called orchestration.

    Note: You can also define assertions for any top-level outputs of a called orchestration in the calling orchestration but not for data in arrays.