Working with Orchestration Output

Use the Orchestration Output page to view the JSON representation of orchestration output. Viewing the output enables you to validate the fields that contain the data you want returned in the orchestration output for output mapping.

Orchestration output can include values from fields and grid columns that you specify as returns when setting up a form request, data request, or cross reference in an orchestration. It can also include the response from a connector, custom service request, or the result of a rule (true or false).

On the Orchestration Output page, you can use Groovy scripting to manipulate the contents of the response to refine the orchestration output as required by the parameters in the consuming device or program.

Note: Orchestration output is available only with version 2 orchestrations created in Orchestrator Studio 5.0.1 or higher. For orchestrations created prior to Orchestrator Studio 5.0.1, you must update them to version 2 orchestrations to view orchestration output.

To work with orchestration output:

  1. On the Orchestration design page, click the Orchestration Output button.

  2. If you want to view the JSON code of all return fields in an orchestration, click Add All.

    The grid displays all of the components or steps in the orchestration that contain return fields, as shown in the following example:

    This image is described in the surrounding text.
  3. Instead of Add All, you can individually select the return fields for which you want to preview the JSON code:

    1. Click Add to view a list of all steps (orchestration components) in the orchestration that contain return fields.

      You can expand each step to see the return fields. The Output Field column displays the variable name defined for a return field.

    2. In the Select column, click the check box next to any return field that you want to add to your orchestration output, and then click OK.

      The field will be returned in JSON format, which you can also preview on the design page.

  4. To modify the return fields for which you want to see the JSON representation:

    • You can change the variable name for the return field in the Output column.

    • Click Delete (X) at the end of row to remove a return field from the JSON preview.

    • Click Add (+) to add any additional grid controls not currently selected for output.

  5. Click the Preview button.

    The following image shows an example of the JSON code for three grid return fields: 2nd Item Number, Item Description, and Order Number.

    This image is described in the surrounding text.
  6. In the Preview area, you can click the Copy to Clipboard button so you can paste the JSON code into your program.

  7. (Advanced) In Orchestrator Studio 5.1.0, edit the provided Groovy script template in the Manipulate Output area to manipulate the contents of the response to refine the orchestration output.

    See Groovy Template for Manipulating Output from an Orchestration Response for more information.

  8. Click the Test button to view the output.

    The Orchestrator Studio displays a preview of the output manipulated by the Groovy script.

  9. To save the orchestration outputs, return to the Orchestration design page and click Save.