Author |
Message
|
dmx0t1 |
Posted: Tue Mar 17, 2009 1:43 am Post subject: Accessing Custom Variables in LocalEnviroment from Maps |
|
|
 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 |
|
 |
dmx0t1 |
Posted: Thu Mar 19, 2009 2:38 am Post subject: |
|
|
 Apprentice
Joined: 23 Nov 2008 Posts: 27
|
looks like theres no luck in this... |
|
Back to top |
|
 |
MQEnthu |
Posted: Thu Mar 19, 2009 2:44 am Post subject: |
|
|
 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 |
|
 |
dmx0t1 |
Posted: Thu Mar 19, 2009 6:01 pm Post subject: |
|
|
 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 |
|
 |
MQEnthu |
Posted: Thu Mar 19, 2009 8:23 pm Post subject: |
|
|
 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 |
|
 |
MQEnthu |
Posted: Thu Mar 19, 2009 8:44 pm Post subject: |
|
|
 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 |
|
 |
HOMETOWN47 |
Posted: Fri Mar 20, 2009 2:45 am Post subject: |
|
|
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 |
|
 |
dmx0t1 |
Posted: Thu Mar 26, 2009 1:59 am Post subject: |
|
|
 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 |
|
 |
dmx0t1 |
Posted: Thu Mar 26, 2009 2:08 am Post subject: |
|
|
 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 |
|
 |
MQEnthu |
Posted: Sat Mar 28, 2009 11:05 pm Post subject: |
|
|
 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 |
|
 |
|