web stats
Mirth Community - View Single Post - Set Destination Response in JavaScrip Transformer
View Single Post
Old 06-26-2019, 01:04 PM
agermano agermano is offline
Mirth Guru
Join Date: Apr 2017
Location: Indiana, USA
Posts: 1,106
agermano is on a distinguished road

I don't think you can do exactly what you are asking for, but there are multiple options depending on what your goal is.

The destination response is initially set by the destination connector after it tries to send the message (this would be your File Writer.)

You can override the destination response in the destination's Response Transformer. In order to get the response transformer to fire for a File Writer, you need to set its inbound (required) and outbound (optional) data types to Raw.

If you don't need to actually override the destination's response, but you just want to send your message back to the upstream connection, in your transformer you can put your validation result in the responseMap, and then select that responseMap variable as your response on the source tab of your channel.

Edit: The user guide should be helpful if you need additional info about Response Transformers or using the responseMap.

Last edited by agermano; 06-26-2019 at 01:15 PM.
Reply With Quote