Author |
Message
|
sirsi |
Posted: Thu Dec 14, 2006 4:53 am Post subject: WMB mapping node... |
|
|
Disciple
Joined: 11 Mar 2005 Posts: 177
|
Hi ,
How can i refer to $target elements in the mapping node.(WBM toolkit v6 fixpack 02)
eg:-
My output message is like this.
$target
Msg
|_element1
|_element2
how can i set element2 = element1 in the mapping sheet.
element2 = $target/Msg/element1 .. is giving error...
But the same is working in WBIMB mapping node.
let me know if i am not clear.
Thanks |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Dec 14, 2006 5:23 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You're entirely unclear.
You have an error.
What is the error message? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
sirsi |
Posted: Fri Dec 15, 2006 2:34 am Post subject: |
|
|
Disciple
Joined: 11 Mar 2005 Posts: 177
|
In the mapping node i am assigning element2 the value of element1..
element1 == $source/Src/element1 ( mapped from source element1)
element2 == $target/Msg/element1 ( mapped from element1 of target message).
i am getting error at the element2 mapping... and error is "$target is out of scope".
How can i refer to element1 of target message so that i can assign the same value to the element2. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Dec 15, 2006 3:42 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Have you tried:
element1 == $source/Src/element1 ( mapped from source element1)
element2 == $source/Src/element1 ( mapped from source element1)
?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
sirsi |
Posted: Fri Dec 15, 2006 3:49 am Post subject: |
|
|
Disciple
Joined: 11 Mar 2005 Posts: 177
|
ya surely it works... but actually my mapping is not simple as that  |
|
Back to top |
|
 |
Vitor |
Posted: Fri Dec 15, 2006 3:54 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sirsi wrote: |
ya surely it works... but actually my mapping is not simple as that  |
Perhaps if you explained your requirement a bit more?
It's perhaps unclear why you need to take a value from the input, add it to an output element, then populate another output element with the same value but taken from the output rather than the input. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
sirsi |
Posted: Fri Dec 15, 2006 4:08 am Post subject: |
|
|
Disciple
Joined: 11 Mar 2005 Posts: 177
|
for the element1 mapping i have applied a complex logic ( if,else )... element2 needs the same value to be populated as element1. So instead of doing the computation again i thought of using the value at element1. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Dec 15, 2006 4:55 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Maybe you should map your computation into Environment, instead of the output tree, and then map both target fields from environment.
Maybe you should use an ESQL procedure to compute your value, and use a SHARED variable to cache the results so you don't recompute.
Maybe you shouldn't use a Mapping node for something this complex. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Dec 15, 2006 5:08 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sirsi wrote: |
for the element1 mapping i have applied a complex logic ( if,else )... element2 needs the same value to be populated as element1. So instead of doing the computation again i thought of using the value at element1. |
I think it's going to be easier / faster / less stressful to store the result in a variable and populate both of the outputs from that.
Or normalise the output to remove the duplicate data item!
(easier said than done I know..) _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
sirsi |
Posted: Fri Dec 15, 2006 6:28 am Post subject: |
|
|
Disciple
Joined: 11 Mar 2005 Posts: 177
|
But this mapping is working in WBIMB... isnt there any way to access $target elements in WMB? |
|
Back to top |
|
 |
jfluitsm |
Posted: Sun Jan 07, 2007 8:39 am Post subject: |
|
|
Disciple
Joined: 24 Feb 2002 Posts: 160 Location: The Netherlands
|
The mapping in V5 and V6 are completely different.
V5 mapping is procedural, what has to be mapped in wich sequence.
V6 is declarative, how should the result look.
As V6 has no guarantee for the sequence in which the mappings are processed, it is not possible to use target fields.
See the topic in the InfoCenter about migrating the mapping from V5 to V6 for incompatabilities. _________________ Jan Fluitsma
IBM Certified Solution Designer WebSphere MQ V6
IBM Certified Solution Developer WebSphere Message Broker V6 |
|
Back to top |
|
 |
sirsi |
Posted: Fri Jan 19, 2007 4:37 am Post subject: |
|
|
Disciple
Joined: 11 Mar 2005 Posts: 177
|
thanks jfluitsm... i will set those mapping outside the mapping nodes |
|
Back to top |
|
 |
|