0
votes

I have this javascript in mirth connect and my source connector and basically grabs everything i want. 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. It complained of not recognizing the channelMap.put;

1

1 Answers

0
votes

I had no problem to run your code. I had to define the variable new_app. In the message browser I got the channel variable with the value org.mozilla.javascript.NativeArray@186a7a9. If you use native java arrays, you can see the values displayed correctly. Concerning your problem: Check for syntax errors in your code, becasuse your put-statement is correct. You can upgrade to mirth connect 3.2, there is a javascript IDE implemented.