Modifying the Response
Modifying the actual response data is done by using the normal features and steps available to a transformer. The internal representation of the response data is msg, while the internal representation of the outbound template (if set) is tmp. When the response transformer finishes processing, it will use the value of tmp (or msg if no outbound template is set) to create the Processed Response content.
There are three other pieces of the response that you can modify in the response transformer:
- responseStatus: This is the status that will be used to update the message after the response message finishes. You may set the status to SENT, QUEUED, or ERROR. If the status is set to QUEUED and queuing is not enabled for the destination connector, it will automatically be changed to ERROR.
- responseStatusMessage: This is a brief one-line message that displays alongside the status in the message browser. It is typically used to give a reason for the status.
- responseErrorMessage: This is the full error message associated with a response. Typically this is used to display large stacktrace messages.
In addition to the above variables, you have access to response, which is an ImmutableResponse object. For additional information, see the User API.