ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Accessing Custom Variables in LocalEnviroment from Maps

Post new topic  Reply to topic
 Accessing Custom Variables in LocalEnviroment from Maps « View previous topic :: View next topic » 
Author Message
dmx0t1
PostPosted: Tue Mar 17, 2009 1:43 am    Post subject: Accessing Custom Variables in LocalEnviroment from Maps Reply with quote

Apprentice

Joined: 23 Nov 2008
Posts: 27

Hi All,

I have a message map that needs to be mapped to predefined parsed data not currently stored in the input message tree, is it possible that I can store these data in the Environment or LocalEnvironment tree and map them in message maps? I learned that I can add "LocalEnvironment" as map source via "Add or Remove Headers and Folders." But, how can I make custom variable in the LocalEnvironment.Variables folder visible in the message map? Or is there a better alternative?

- Much Thanx in Advance
Back to top
View user's profile Send private message
dmx0t1
PostPosted: Thu Mar 19, 2009 2:38 am    Post subject: Reply with quote

Apprentice

Joined: 23 Nov 2008
Posts: 27

looks like theres no luck in this...
Back to top
View user's profile Send private message
MQEnthu
PostPosted: Thu Mar 19, 2009 2:44 am    Post subject: Reply with quote

Partisan

Joined: 06 Oct 2008
Posts: 329
Location: India

AFAIK, you can not add the Environment tree in mapping editer but though you can add LocalEnvironment tree, you cannot map Local Environment objects that are not listed ..you can map the destination list and HTTP urls.....
_________________
-----------------------------------------------
It is good to remember the past,
but don't let past capture your future
Back to top
View user's profile Send private message
dmx0t1
PostPosted: Thu Mar 19, 2009 6:01 pm    Post subject: Reply with quote

Apprentice

Joined: 23 Nov 2008
Posts: 27

Yea, I understand that I can not add the Environment tree in the map editor, perhaps I should take some of the listed objects in LocalEnvironment tree and store my custom data? Would this cause any side effects?
Back to top
View user's profile Send private message
MQEnthu
PostPosted: Thu Mar 19, 2009 8:23 pm    Post subject: Reply with quote

Partisan

Joined: 06 Oct 2008
Posts: 329
Location: India

dmx0t1 wrote:
perhaps I should take some of the listed objects in LocalEnvironment tree and store my custom data? Would this cause any side effects?


No I do not think ..You should store your data in Variables subtree of local environment tree and not anywhere else...
_________________
-----------------------------------------------
It is good to remember the past,
but don't let past capture your future
Back to top
View user's profile Send private message
MQEnthu
PostPosted: Thu Mar 19, 2009 8:44 pm    Post subject: Reply with quote

Partisan

Joined: 06 Oct 2008
Posts: 329
Location: India

The data you want to store under the LocalEnvironment tree is it part of Input tree? if yes, you can do it. Drag the wildcard element under Variables subtree and place it on the complex element (whose simple elements you want to map) of target message, then it creates a submap and ask you to select the message structure under LocalEnvironment, you select the suitable message structure then map the required fields in the submap editer. Hope this is clear. Let me know if it works for you...
_________________
-----------------------------------------------
It is good to remember the past,
but don't let past capture your future
Back to top
View user's profile Send private message
HOMETOWN47
PostPosted: Fri Mar 20, 2009 2:45 am    Post subject: Reply with quote

Apprentice

Joined: 25 Mar 2003
Posts: 34

The previous post assumes that the data held in the LocalEnvironment.Variables structure has been defined as part of a message definition. If this is the case then it works as suggested.
If you have some variables that are temporary and created in previous nodes and not based on a message definition i.e LocalEnvironment.Variables.SomeFlag, then you can still do this by including the LocalEnvironment header in the source and then right-click the target element and choose 'Enter Expression'. In the expression window enter something like:-

$source/LocalEnvironment/Variables/SomeFlag

Works for me !
Back to top
View user's profile Send private message
dmx0t1
PostPosted: Thu Mar 26, 2009 1:59 am    Post subject: Reply with quote

Apprentice

Joined: 23 Nov 2008
Posts: 27

MQEnthu wrote:
The data you want to store under the LocalEnvironment tree is it part of Input tree? if yes, you can do it. Drag the wildcard element under Variables subtree and place it on the complex element (whose simple elements you want to map) of target message, then it creates a submap and ask you to select the message structure under LocalEnvironment, you select the suitable message structure then map the required fields in the submap editer. Hope this is clear. Let me know if it works for you...


Sorry for the late reply MQEnthu,

Nope, the data I wanna retrieve is not in the input tree, its from some data randomly calculated at the beginning of flow (e.g. randomly assigned UUID). Then again, if its already in the input tree, I could have just dragged and dropped...

Could I perhaps create a message definition to mimic the structures of the variables stored in LocalEnvironment tree and map that in the submap?


Last edited by dmx0t1 on Thu Mar 26, 2009 2:27 am; edited 1 time in total
Back to top
View user's profile Send private message
dmx0t1
PostPosted: Thu Mar 26, 2009 2:08 am    Post subject: Reply with quote

Apprentice

Joined: 23 Nov 2008
Posts: 27

HOMETOWN47 wrote:
The previous post assumes that the data held in the LocalEnvironment.Variables structure has been defined as part of a message definition. If this is the case then it works as suggested.
If you have some variables that are temporary and created in previous nodes and not based on a message definition i.e LocalEnvironment.Variables.SomeFlag, then you can still do this by including the LocalEnvironment header in the source and then right-click the target element and choose 'Enter Expression'. In the expression window enter something like:-

$source/LocalEnvironment/Variables/SomeFlag

Works for me !


I am getting an error like this "Invalid mapping for "$target/Envelope/Body/UUID". Check for correct mapping from simple type to simple type."
Back to top
View user's profile Send private message
MQEnthu
PostPosted: Sat Mar 28, 2009 11:05 pm    Post subject: Reply with quote

Partisan

Joined: 06 Oct 2008
Posts: 329
Location: India

dmx0t1 wrote:
Could I perhaps create a message definition to mimic the structures of the variables stored in LocalEnvironment tree and map that in the submap?


may be you should try!! I think it will solve your problem...
_________________
-----------------------------------------------
It is good to remember the past,
but don't let past capture your future
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Accessing Custom Variables in LocalEnviroment from Maps
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.