Dispatch multiple messages from javascript reader source - rbeckman-nextgen/test-mc GitHub Wiki

  1. Mirth Connect
  2. Home
  3. Examples and Tutorials

Mirth Connect : Dispatch multiple messages from javascript reader source

Created by Marc H on Jan 20, 2016

Occasionally it is useful to dispatch multiple messages from a **javascript reader **source connector.  

Typically this occurs when you are manually building a message or are reading multiple rows from a database and wish to dispatch multiple messages to the channel.

To do this, return an ArrayList from the javascript reader.  For example:

var messages = new java.util.ArrayList();
messages.add(message1);
messages.add(message2);
return messages;

The 'message1' / 'message2' variables will typically be XML.

Source: http://www.mirthproject.org/community/forums/showpost.php?p=47922&postcount=2

Document generated by Confluence on Nov 11, 2019 08:40

Atlassian

⚠️ **GitHub.com Fallback** ⚠️