web stats
pass data across channels - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 12-18-2010, 12:33 AM
oldfamily oldfamily is offline
What's HL7?
 
Join Date: Dec 2010
Posts: 2
oldfamily is on a distinguished road
Default 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?
Reply With Quote
  #2  
Old 12-20-2010, 01:26 AM
asulis asulis is offline
Mirth Guru
 
Join Date: Dec 2006
Location: Cagliari, Sardinia, Italy
Posts: 210
asulis is an unknown quantity at this point
Default

Hi,
If needed, you can use the globalMap to pass data from one channel to another.
Regards,
Alessandro
Reply With Quote
  #3  
Old 12-20-2010, 12:35 PM
oldfamily oldfamily is offline
What's HL7?
 
Join Date: Dec 2010
Posts: 2
oldfamily is on a distinguished road
Default

one instance of the globalmap is shared across all requests and channels right? I will need a map that is basically request scoped.
Reply With Quote
  #4  
Old 12-21-2010, 12:25 AM
asulis asulis is offline
Mirth Guru
 
Join Date: Dec 2006
Location: Cagliari, Sardinia, Italy
Posts: 210
asulis is an unknown quantity at this point
Default

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.
Reply With Quote
  #5  
Old 12-22-2010, 10:40 AM
manish.zope manish.zope is offline
Mirth Newb
 
Join Date: Jun 2010
Posts: 6
manish.zope is on a distinguished road
Default 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.
Reply With Quote
  #6  
Old 12-28-2010, 12:02 PM
mourisj mourisj is offline
Mirth Guru
 
Join Date: Feb 2007
Location: Luxembourg
Posts: 407
mourisj is an unknown quantity at this point
Default

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
Reply With Quote
  #7  
Old 01-03-2011, 11:33 AM
jacobb jacobb is offline
Mirth Employee
 
Join Date: Aug 2006
Location: Irvine, CA
Posts: 1,218
jacobb is an unknown quantity at this point
Default

Quote:
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

Reply With Quote
  #8  
Old 03-09-2011, 05:52 AM
Java4Fun Java4Fun is offline
Mirth Newb
 
Join Date: Feb 2011
Posts: 11
Java4Fun is on a distinguished road
Default

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
Reply With Quote
  #9  
Old 03-21-2018, 11:52 AM
ashishshetty1992 ashishshetty1992 is offline
Mirth Newb
 
Join Date: Jan 2018
Location: Boston
Posts: 17
ashishshetty1992 is on a distinguished road
Default

Quote:
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.
Reply With Quote
  #10  
Old 03-21-2018, 02:42 PM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 1,106
agermano is on a distinguished road
Default

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.
Reply With Quote
Reply

Tags
router

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 02:13 PM.


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