- create the new channel with the name OneSourceMultipleDestination.
- Set data types to delimited text.
- Goto source tab, choose channel reader from the connector type drop down.
- Goto destination tab ,from connector type choose FileWriter from drop down.
- Method -> File
- Directory -> Give your directory path(example D:/MirthTool/Output).
- File Name -> Give your file name(Ex:MyDestination).
- Append To file -> Yes. (or No,Depends on user)
- From Destination mapping in right side,click and drag the Encoded data into the template field (or write ${message.encodedData}).
- Now click on New Destination from the Channel task in the left side.
- Connector Type - > JavaScriptWriter.
- Write as logger.info("Success"); inside the JavaScriptWriter field.
- Now save and deploy the channel .
- Now right click on the OneSourceMultipleDestination channel from the Dashboard ,choose send message .Write something and click process message button.
- Now go to the given path(example D:/MirthTool/Output).There you can see the file which you named(MyDestination).
- Open and see,there will be the text that you have wrote in the message field .
- And in the Log Information area in the bottom you can see the success which is second destination output.(Remainder:See step 12)
Like this you can add multiple destination.Using java file writer you can write in to another file.
Use Database writer as a another destination and write into db.
Tuesday, January 15, 2013
One source to multiple destinations in Mirth
Labels:
Mirth related
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment