Shay Hakshorian
Shay Hakshorian

Reputation: 71

Mirth - How to handle response when having multiple destinations


I created a channel with 2 destinations.
Each one of the destination has a different response and i decide if to use it by filtering message source.


Example 1:
Sending [Message] ->
Destination 1 FILTERED return no response
Destination 2 SENT return [response x]

I want source response to be [response x] but it is not


Example 2:
Sending [Message] ->
Destination 1 SENT return [response y]
Destination 2 FILTERED return no response

I want source response to be [response y] but it is not.

How can i set source response to match SENT destination?

I tried to set Source settings Response on each of the mirth drop-down options, with no success.

Upvotes: 3

Views: 3758

Answers (1)

agermano
agermano

Reputation: 1719

You can't use a destination as your response in your situation, as it must always pick the same destination. You do have a couple options, though.

  1. You can use the post-processor for your response. The post-processor can see the results of all destinations and determine an appropriate value to return.
  2. You can use a responseMap variable. In the response transformer of each destination place the value you want to use as the response into the responseMap. Use the same key for all destinations. You will be able to select that variable as your response in the source tab of your channel. You may want to set a default response in your pre-processor or source transformer in case your destination has an error before setting the variable.

Upvotes: 6

Related Questions