Working with Orchestration Outputs
Use the Orchestration Outputs 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 Outputs 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.
To work with orchestration output:
On the Orchestration design page, click the Define Output button.
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:
Instead of Add All, you can individually select the return fields for which you want to preview the JSON code:
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.
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.
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.
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.
In the Preview area, you can click the Copy to Clipboard button so you can paste the JSON code into your program.
(Advanced) In Orchestrator Studio, 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.
Click the Test button to view the output.
The Orchestrator Studio displays a preview of the output manipulated by the Groovy script.
To save the orchestration outputs, return to the Orchestration design page and click Save.