wdr3
wdr3

Reputation: 11

Update globalChannelMap in Mirth Connect

I inherited a Mirth Connect (v2.2.1) instance and am learning how it works. I'm now learning how globalChannelMap variables work, and I'm stumped by a misbehaving filter on a source connector.

In theory I can edit a csv text file in the Mirth Connect folders directory to update the globalChannelMap that is called by the filter.

But in practice the csv file is updated yet the source connector filter continues to call a prior globalChannelMap for the txt file. What step am I missing to update the globalChannelMap? Is there a simple way to output the current contents of a globalChannelMap?

Upvotes: 0

Views: 5019

Answers (2)

Cole Bittel
Cole Bittel

Reputation: 2894

You may need to redeploy. If you're seeing that you're using an old global channel map (using calKno's method), it means you need to redeploy the channel.

Channel's need to be redeployed anytime their code content is changed, be it an internal library (such as a code template), a transformer, or a global channel map.

Upvotes: 1

calKno
calKno

Reputation: 21

You can get the map at the beginning of your filter and update it at the end or wherever it makes sense.

//get map
var map = globalChannelMap.get('mapName');

//log map value
logger.info('This is your map content: '+map);

//update map value
globalChannelMap.put('mapName', value);

Upvotes: 0

Related Questions