web stats
Return new message from preprocessor - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 08-10-2018, 06:09 AM
rapolas rapolas is offline
What's HL7?
 
Join Date: Jul 2018
Posts: 4
rapolas is on a distinguished road
Default Return new message from preprocessor

Is it possible to return a completely new message from preprocessor? I read an xml file, and if it is not a valid XML I would like to replace with a valid, such as "<ERR/>".

What I have is this:
Code:
try {
 var tst = new XML(message);
} catch (err) {
message = "<ERR/>";
}
return message
However, in the source connector transformer msg variable is empty, no matter what I try. It seems like preprocessor is working fine, and source connector is not throwing an error, just that I can't access the message. I've tried getting all get*Data() messages, and only getRawData returns me a message, but original one, which is not a valid xml, other methods return either empty or null.

Thank you,
Rapolas K.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 04:22 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Mirth Corporation