Announcement

Collapse
No announcement yet.

Channel with multiple destination and javascript filter?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    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.

    Comment


    • #3
      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?

      Comment


      • #4
        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.

        Comment

        Working...
        X