Objects
messageObject.getRawData() - gets raw data - works in transformer, filter, and connector javascript
messageObject.getEncodedData() - works in transformer, filter, and connector javascript
messageObject.getTransformedData() - works in transformer, filter and connector javascript IFF there is a transformer, otherwise returns null
msg - gets array representing XML - works only in transformer and filter, no equivalent in connector
In other scripting situations (like SQL) you can use ${message.rawData} and the like to get rawData, encodedData, and transformedData.
To get a msg object in a connector, check out this posting by ChrisL on the Mirth forum:
If you are using this on the DB Writer Javascript, then the error is occurring because MSG isn't valid there. msg is only available in the transformer and filter.
You can store msg in the transformer with
channelMap.put('msg', msg)
then in your destination DB Writer do:
Code:
var msg = channelMap.get('msg');
|
2 comments:
What version of Mirth are u using 1.8 ?
Maruthi, I am using Mirth 1.7.1.
Post a Comment