web stats
Channel with multiple destination and javascript filter? - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 02-03-2015, 11:57 AM
satishs satishs is offline
OBX.2 Kenobi
 
Join Date: Jul 2012
Location: Mumbai,India
Posts: 59
satishs is on a distinguished road
Exclamation Channel with multiple destination and javascript filter?

Hi All,

I was wondering if anyone ever tried to create a channel with multiple destination and filters written in javascript. I want to know incase if it's possible to have a destination process a number of messages for a channel and then write next xx number of messages to other destination. There coule be 4 to 5 destinations. and after reaching the last destination it should start with first destination once again. So essentially one destination is active at a time and and others are sort of waiting.

Please let me know how we can achieve this or if it's not possible.

Regards,
Satty
Reply With Quote
  #2  
Old 02-03-2015, 01:13 PM
wayneh wayneh is offline
OBX.3 Kenobi
 
Join Date: May 2012
Posts: 102
wayneh is on a distinguished road
Default

If you're looking to do something like round robin messages to different destinations, then that is possible with destination set filtering. Search for "destination set" in the reference list. Also look at the javadoc (http://javadocs.mirthcorp.com/connec...nationSet.html)

In your source connector transformer, you can specify which destinations you want the message sent to by using the destination set methods. You can determine this by a field from the message or keep track of the state in the global channel map.
Reply With Quote
  #3  
Old 02-04-2015, 07:07 AM
satishs satishs is offline
OBX.2 Kenobi
 
Join Date: Jul 2012
Location: Mumbai,India
Posts: 59
satishs is on a distinguished road
Default

Thanks for the info Wayne but I think I'm still confused how would I select the destination in the source. Has anyone ever written that using a hash map or something?
Reply With Quote
  #4  
Old 02-04-2015, 07:33 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road
Default

Quote:
Originally Posted by satishs View Post
Thanks for the info Wayne but I think I'm still confused how would I select the destination in the source. Has anyone ever written that using a hash map or something?
First, since you did not specify, I'm assuming you're on the latest version (3.1.1). As Wayne said, use the DestinationSet methods in the source transformer script. It's all right there in the Javadoc; read it. There are also entries for this in the References list on the right-hand side of the transformer window.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
Reply

Tags
cycle destination, dynamic destination, dynamic filter, multiple destination

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 01:00 AM.


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