简体   繁体   中英

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 ?

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.

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);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM