web stats
responseMap variable not visible in source response alternatives - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 02-11-2020, 01:43 PM
doggabyte1 doggabyte1 is offline
What's HL7?
 
Join Date: Feb 2016
Posts: 4
doggabyte1 is on a distinguished road
Default responseMap variable not visible in source response alternatives

HI,

Using mirth 3.8.1. Have a channel with a source TCP listener and a destination with a javascript writer. In the destination I have the following code:

HTML Code:
var sourceRequest = connectorMessage.getRawData();
logger.info("sourceRequest: " + sourceRequest);
channelMap.put("sourceRequest", sourceRequest);

var sourceResponse = Packages.customlibtransformer.apply(sourceRequest);

logger.info("sourceResponse: " + sourceResponse);
channelMap.put("sourceResponse", sourceResponse);
responseMap.put("sourceResponseMessage", sourceResponse);
In the source tab the "sourceResponseMessage" is not seen as an alternative. If I use another type of source connector e.g. HTTP Listener the sourceResponseMessage can be chosen.

It seems there is a workaround for me by setting my code in the transformer step of the destination but I wonder if there is something I have misunderstood with the responseMap.
Reply With Quote
  #2  
Old 02-12-2020, 12:07 AM
doggabyte1 doggabyte1 is offline
What's HL7?
 
Join Date: Feb 2016
Posts: 4
doggabyte1 is on a distinguished road
Default

Will do like this in the javascript writer destination and in return the destination I guess, but still weird that responseMap did not work...

HTML Code:
var sourceRequest = connectorMessage.getRawData();
logger.info("sourceRequest: " + sourceRequest);
channelMap.put("sourceRequest", sourceRequest);

var sourceResponse = Packages.customlibtransformer.apply(sourceRequest);

logger.info("sourceResponse: " + sourceResponse);
channelMap.put("sourceResponse", sourceResponse);
return sourceResponse;
Reply With Quote
  #3  
Old 02-13-2020, 11:14 AM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 1,095
agermano is on a distinguished road
Default

You can open an issue here http://www.mirthcorp.com/community/issues/browse/MIRTH
Reply With Quote
Reply

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 01:13 PM.


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