web stats
PostProcessor Set Status and Reponse - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 03-16-2017, 05:22 AM
tmcdevitt tmcdevitt is offline
OBX.3 Kenobi
 
Join Date: Oct 2014
Posts: 125
tmcdevitt is on a distinguished road
Angry PostProcessor Set Status and Reponse

In the PostProcessor I like to set the current message status and reponse string but I am unable to update it using this code. I there a better way to do it?


responseMap.put('customResponse', ResponseFactory.getSuccessResponse("Message Sent to Lab"));


return new Response(SENT,'',Message Sent to Lab);
Reply With Quote
  #2  
Old 03-19-2017, 04:58 AM
obsessio obsessio is offline
OBX.3 Kenobi
 
Join Date: Mar 2015
Location: Turkey
Posts: 166
obsessio is on a distinguished road
Default

What is your Mirth version?

Because "getSuccessResponse" method deprecated after v3.1.

So if you are using new version of Mirth, you should use;
PHP Code:
responseMap.put('customResponse'ResponseFactory.getSentResponse('Message Sent to Lab')); 
Class ResponseFactory
http://javadocs.mirthcorp.com/connec...seFactory.html
.
Reply With Quote
  #3  
Old 03-21-2017, 06:20 AM
tmcdevitt tmcdevitt is offline
OBX.3 Kenobi
 
Join Date: Oct 2014
Posts: 125
tmcdevitt is on a distinguished road
Default

I tried that too but it will not set the response or that status, can have the post processor can that be the problem?
Reply With Quote
  #4  
Old 03-21-2017, 12:54 PM
obsessio obsessio is offline
OBX.3 Kenobi
 
Join Date: Mar 2015
Location: Turkey
Posts: 166
obsessio is on a distinguished road
Default

Did you select it from source response dropdown?

Reply With Quote
  #5  
Old 03-27-2017, 08:54 AM
tmcdevitt tmcdevitt is offline
OBX.3 Kenobi
 
Join Date: Oct 2014
Posts: 125
tmcdevitt is on a distinguished road
Default

Can I change the response d1 value using the the same code?


responseMap.put("d1", ResponseFactory.getSentResponse("Message Sent to Lab"));
Reply With Quote
  #6  
Old 03-27-2017, 09:13 AM
tmcdevitt tmcdevitt is offline
OBX.3 Kenobi
 
Join Date: Oct 2014
Posts: 125
tmcdevitt is on a distinguished road
Default

Looks like this is working nice for the source response, is there anyway I can do it for the destination response?
Reply With Quote
  #7  
Old 03-27-2017, 11:55 PM
obsessio obsessio is offline
OBX.3 Kenobi
 
Join Date: Mar 2015
Location: Turkey
Posts: 166
obsessio is on a distinguished road
Default

get destination response and put to responseMap.
Reply With Quote
Reply

Tags
postprocessor, reponse, status

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 08:40 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation