Announcement

Collapse
No announcement yet.

pass data across channels

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

  • pass data across channels

    I have some data that I would like to pass from one channel to another.

    I have 2 channels right now : channel A and channel B.

    B's source connector is a channel reader that reads from channel A.

    channel A has a destination connector that routes messages to channel B.

    I am wondering if there is a map that I can use to pass data across channel. If no such map exists, what's the best way to pass data between channels?

  • #2
    Hi,
    If needed, you can use the globalMap to pass data from one channel to another.
    Regards,
    Alessandro

    Comment


    • #3
      one instance of the globalmap is shared across all requests and channels right? I will need a map that is basically request scoped.

      Comment


      • #4
        Yes of course. An object put inside the global map in a channel has a global scope and can be read from any other channel.

        Comment


        • #5
          Pass data using router.routeMessage as follows

          Hi,
          You can send message to another channel using "router.routeMessage('ChannelName', Message)". Message should be in xml format.

          Comment


          • #6
            The trouble with the GlobalMap is that ANY channel might inadvertently change the data, if the same variable name is used by different channels! (We did have this kind of trouble some time ago.)
            Your Channel A might even have changed the value in the global variable before your Channel B has finished processing it. You have to be aware of this. Perhaps, the "Synchronize channel" option might help solve this problem.
            JJ Mouris
            FFE Luxembourg
            IT-Department

            Comment


            • #7
              Originally posted by mourisj View Post
              The trouble with the GlobalMap is that ANY channel might inadvertently change the data, if the same variable name is used by different channels! (We did have this kind of trouble some time ago.)
              Your Channel A might even have changed the value in the global variable before your Channel B has finished processing it. You have to be aware of this. Perhaps, the "Synchronize channel" option might help solve this problem.
              To get around any channel inadvertently changing the data, try using the new globalChannelMap in Mirth Connect 2.0+.
              Jacob Brauer
              Director, Software Development
              NextGen Healthcare

              sigpic

              Comment


              • #8
                Hello there.
                i've got the following Problem:

                I use the globalChannelMap in Mirtz 2.0.1 but i cannot see the variable i mapped.

                how could this be?

                Yours
                Java4Fun

                Comment


                • #9
                  Originally posted by Java4Fun View Post
                  Hello there.
                  i've got the following Problem:

                  I use the globalChannelMap in Mirtz 2.0.1 but i cannot see the variable i mapped.

                  how could this be?

                  Yours
                  Java4Fun
                  I'm using Mirth v3.5, and I can see the globalChannelMap variable in the Global Maps tab on the Dashboard view.

                  Comment


                  • #10
                    A lot has changed in 7 years You can also directly pass a sourceMap while routing a message now instead of having to use the globalChannelMap.

                    Comment

                    Working...
                    X