简体   繁体   English

在Mirth Connect中更新globalChannelMap

[英]Update globalChannelMap in Mirth Connect

I inherited a Mirth Connect (v2.2.1) instance and am learning how it works. 我继承了一个Mirth Connect(v2.2.1)实例,并且正在学习它的工作方式。 I'm now learning how globalChannelMap variables work, and I'm stumped by a misbehaving filter on a source connector. 我现在正在学习globalChannelMap变量的工作方式,并且对源连接器上的过滤器行为globalChannelMap感到困扰。

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. 理论上,我可以在Mirth Connect文件夹目录中编辑一个csv文本文件,以更新由过滤器调用的globalChannelMap

But in practice the csv file is updated yet the source connector filter continues to call a prior globalChannelMap for the txt file. 但实际上,csv文件已更新,但源连接器过滤器继续为txt文件调用先前的globalChannelMap What step am I missing to update the globalChannelMap ? 我缺少哪个步骤来更新globalChannelMap Is there a simple way to output the current contents of a globalChannelMap ? 有没有一种简单的方法来输出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. 如果您看到使用的是旧的全局频道地图(使用calKno的方法),则意味着您需要重新部署频道。

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. 无论何时更改其代码内容,都需要重新部署Channel,无论是内部库(例如代码模板),转换器还是全局通道图。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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