web stats
Channel Map vs Connector Map vs Global Map - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 04-20-2007, 05:06 AM
jbartels jbartels is offline
Mirth Guru
 
Join Date: Oct 2006
Posts: 729
jbartels is on a distinguished road
Default Channel Map vs Connector Map vs Global Map

Do I understand this correctly?

The different mappings are just the scope of the mapping??

Channel Map = just in this channel
Connector Map = just in this connector
Global Map = across the entire application
Response Map = just for the response
__________________
Jon Bartels

Zen is hiring!!!!
http://consultzen.com/careers/
Talented healthcare IT professionals wanted. Engineers to sales to management.
Good benefits, great working environment, genuinely interesting work.
Reply With Quote
  #2  
Old 04-20-2007, 12:22 PM
chrisl chrisl is offline
Mirth Employee
 
Join Date: Aug 2006
Posts: 967
chrisl is an unknown quantity at this point
Default Re: Channel Map vs Connector Map vs Global Map

You've got it correct.
__________________
Chris Lang
Reply With Quote
  #3  
Old 09-12-2007, 10:00 AM
scottk@IntelligentSolutio scottk@IntelligentSolutio is offline
Mirth Newb
 
Join Date: Jul 2007
Posts: 15
scottk@IntelligentSolutio
Default Re: Channel Map vs Connector Map vs Global Map

What is the scope of the Response Map? Is it within just scope of the "current" message?

If two messages are in a channel at the same time (assuming they can they be), isn't Channel Map the wrong place to put temporary message values?

Basicly I need a clear, unambigious definition of all the maps.
Reply With Quote
  #4  
Old 09-13-2007, 12:16 AM
chrisl chrisl is offline
Mirth Employee
 
Join Date: Aug 2006
Posts: 967
chrisl is an unknown quantity at this point
Default Re: Channel Map vs Connector Map vs Global Map

The channelMap only exists in the scope of a single message in the channel. It actually "lives" in the message object, same as the response map.

The connector map is local for each connector (so the source and any destinations).

Here is the actual object flow in the Mirth code:

Message is Received->Message Object is Created (includes channel map, response map and the source connector's connector map)->Message Object is duplicated for each destination (retains a SINGLE reference to the channel map and response map, however a new connector map is created for each copy of the message object).

When you reference any of the maps in your JS, you are referencing the maps that live on that message object.

The only map that is shared between messages is the global map.
__________________
Chris Lang
Reply With Quote
  #5  
Old 09-13-2007, 10:51 AM
scottk@IntelligentSolutio scottk@IntelligentSolutio is offline
Mirth Newb
 
Join Date: Jul 2007
Posts: 15
scottk@IntelligentSolutio
Default Re: Channel Map vs Connector Map vs Global Map

In the case where the message is routed to another channel, are new channel & response maps created or are the still referenced to the original ones?

Out of curosity, what is the difference between the channel & response maps? They seem to have the the same scope, etc.
Reply With Quote
  #6  
Old 09-13-2007, 11:46 AM
brendanh brendanh is offline
Mirth Employee
 
Join Date: Aug 2006
Posts: 191
brendanh
Default Re: Channel Map vs Connector Map vs Global Map

They will be new maps when its routed to new channel.

They do have the same scope. They are just for separation of concerns.
__________________
Brendan Haverlock | Mirth Software Engineer | Mirth Corporation
Reply With Quote
  #7  
Old 09-13-2007, 01:36 PM
chrisl chrisl is offline
Mirth Employee
 
Join Date: Aug 2006
Posts: 967
chrisl is an unknown quantity at this point
Default Re: Channel Map vs Connector Map vs Global Map

Right, completely new maps and messages are created (duplicated content).

Same scope as Brendan said - the response map is automatically populated with an entry for each destination (which you can override).
__________________
Chris Lang
Reply With Quote
  #8  
Old 09-13-2007, 02:31 PM
scottk@IntelligentSolutio scottk@IntelligentSolutio is offline
Mirth Newb
 
Join Date: Jul 2007
Posts: 15
scottk@IntelligentSolutio
Default Re: Channel Map vs Connector Map vs Global Map

Now the picture is becoming clearer - thanks!
Reply With Quote
  #9  
Old 04-07-2009, 07:27 AM
kbobba kbobba is offline
OBX.2 Kenobi
 
Join Date: Oct 2006
Posts: 51
kbobba
Default Map that will be available in Message reception

My use case is to process a set of results from a query as one data set. For implementing this, I want to loop through this result set (using Javascript) and create a map that I can use in the source transformer.

I am not sure if this will work. Looks like Mirth expects a result set and processes one result at a time. In my case I need to fake by returning a artificial resultset that has only one result.

But the actual problem looks like that no map is visible in the source connector. Is this because there is no message object created at this point.

How can I put the values that I got from multiple rows into a map that will be visible in source transformer?

Can you give your thoughts?

Thanks in advance.
Reply With Quote
  #10  
Old 04-07-2009, 10:55 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

kbobba, rather than returning a resultset, you can return a different type of set. I believe you can return a list of hash maps. Each item in the list will be processed as a message, and each item in the hash map will be accessible in the source transformer as the incoming xml message.
__________________
Jacob Brauer
Director, Software Development
NextGen Healthcare

Reply With Quote
Reply

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Global code adventsun Development 6 05-02-2008 10:02 AM
Global Variables gauchomike Support 2 02-19-2008 09:31 AM
Access global function afterdark23 Support 4 02-14-2008 02:34 PM
Global map jerchap Support 1 01-30-2008 03:02 PM
Global functions - how to do it? Bleupomme Support 1 06-04-2007 11:29 AM


All times are GMT -8. The time now is 07:42 PM.


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