web stats
Mirth Community - View Single Post - Get Destination Response with Postprocessor
View Single Post
  #2  
Old 03-30-2018, 02:56 PM
pacitommaso pacitommaso is offline
Mirth Newb
 
Join Date: Jun 2015
Posts: 6
pacitommaso is on a distinguished road
Default

Ok I found a solution to my previous question.
I collect the returned information in some variable in the Destination - Edit_Response, and then in the PostProcessor I use these variables.

However now I have a second issue with the PostProcessor as the ACK / NACK messages are not send back to the caller.

I'm using the following Functions and Mirth 3.5:

For the Ack:
function sendAck()
{
// Generate an ACK response with code AA and put into the Response Map with SUCCESS status.
var ackMessage = ACKGenerator.generateAckResponse(message.getConnec torMessages().get(0).getRawData(), "AA", "Success");
responseMap.put("ACK Message", ResponseFactory.getSentResponse(ackMessage));
logger.info("ACK Msg Sent");
}


for the NACK (as I want to send a retrieved message):
function sendNack(ackMsgStr)
{
var ackMessage = ACKGenerator.generateAckResponse(message.getConnec torMessages().get(0).getRawData(), "AR", ackMsgStr);

responseMap.put("ACK Message", ResponseFactory.getErrorResponse(ackMessage));
}


I see that the functions are called (I see the logger.info) but nothing is sent. Can you give me a hint?

Thank you all for your help.
Reply With Quote