[英]retrieving array result in channel destination from source - mirth
I have this javascript in mirth connect and my source connector and basically grabs everything i want. 我有这个javascript在欢乐连接和我的源连接器,基本上抓住我想要的一切。 I stored some of my results in an array and placed in in an array because its much.
我将一些结果存储在一个数组中并放入一个数组中,因为它很多。
var gist = [];
var list = new java.util.ArrayList();
xmlMs = '<html>';
xmlMs += ' <body>';
xmlMs += '<table>';
// content here
xmlMs += '</table>';
xmlMs += ' </body>';
xmlMs += '</html>';
list.add(xmlMs);
gist.push([list, new_app]);
channelMap.put('try', gist);
What i tried to do is put the gist array in a channel map so as to be able to retrive it in the destination or destination/transformer. 我试图做的是将gist数组放在通道映射中,以便能够在目标或目标/变换器中检索它。 It complained of not recognizing the channelMap.put;
它抱怨没有识别channelMap.put;
I had no problem to run your code. 我没有问题来运行你的代码。 I had to define the variable new_app.
我不得不定义变量new_app。 In the message browser I got the channel variable with the value org.mozilla.javascript.NativeArray@186a7a9.
在消息浏览器中,我获得了值为org.mozilla.javascript.NativeArray@186a7a9的channel变量。 If you use native java arrays, you can see the values displayed correctly.
如果使用本机java数组,则可以看到正确显示的值。 Concerning your problem: Check for syntax errors in your code, becasuse your put-statement is correct.
关于您的问题:检查代码中的语法错误,因为您的put语句是正确的。 You can upgrade to mirth connect 3.2, there is a javascript IDE implemented.
你可以升级到mirth connect 3.2,有一个javascript IDE实现。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.