Author |
Message
|
akil |
Posted: Tue Jun 02, 2015 11:02 pm Post subject: IIB9: Mapping Node |
|
|
 Partisan
Joined: 27 May 2014 Posts: 338 Location: Mumbai
|
In a mapping node, when I move an element that is optional in the source but mandatory in the destination, I see that the 'move' does not create the element in case the source element does not exist.
Could not find a property that would allow this configuration,
Any suggestions on how to proceed with this? I could write if/else for all such cases but that's pretty elaborate.
In ESQL, using the VALUE clause, this would have been easy. _________________ Regards |
|
Back to top |
|
 |
iibmate |
Posted: Wed Jun 03, 2015 1:06 am Post subject: Re: IIB9: Mapping Node |
|
|
 Apprentice
Joined: 17 Mar 2015 Posts: 38 Location: Perth, WA
|
akil wrote: |
In a mapping node, when I move an element that is optional in the source but mandatory in the destination, I see that the 'move' does not create the element in case the source element does not exist.
|
Version plz...
This is not in case of IIB v9.0.0.2 |
|
Back to top |
|
 |
akil |
Posted: Wed Jun 03, 2015 9:57 am Post subject: |
|
|
 Partisan
Joined: 27 May 2014 Posts: 338 Location: Mumbai
|
The version : 9.0.0.2, _________________ Regards |
|
Back to top |
|
 |
iibmate |
Posted: Wed Jun 03, 2015 10:28 am Post subject: |
|
|
 Apprentice
Joined: 17 Mar 2015 Posts: 38 Location: Perth, WA
|
akil wrote: |
The version : 9.0.0.2, |
Not sure of difference in behaviour even though version is same. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Jun 04, 2015 1:02 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Please define exactly what you mean by 'does not exist'.
Do you mean
- the value is the empty string or
- the value is NULL or
- the input message tree does not contain the element at all _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
akil |
Posted: Thu Jun 04, 2015 7:56 am Post subject: |
|
|
 Partisan
Joined: 27 May 2014 Posts: 338 Location: Mumbai
|
The input does not contain the element ( since it is optional ) . _________________ Regards |
|
Back to top |
|
 |
kimbert |
Posted: Fri Jun 05, 2015 12:40 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
In that case you and Akil will need to fight this one out between yourselves. You seem to be getting different results after doing the same thing in the same version of the same software. _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
martinb |
Posted: Fri Jun 05, 2015 12:52 am Post subject: |
|
|
Master
Joined: 09 Nov 2006 Posts: 210 Location: UK
|
I concur with iibmate.
An instance doc with an optional (minOccurs=0) element not present that is mapped directly by a "Move" to a mandatory output element (minOccurs=1) run in IIB v9.0.0.2 does see the Mapping node produce an output doc with the mandatory element created, but with no value.
If you want to detect that the optional input element is not present so that you can assign a fixed value, you can use the If / Else transform with a condition of
Code: |
fn:exists( $<variable for optional input element> ) |
It is often helpful during development to run your flows with schema validation enabled, so that you can be sure the instance data conforms to the schema model that the Map has been built against. |
|
Back to top |
|
 |
iibmate |
Posted: Fri Jun 05, 2015 12:54 am Post subject: |
|
|
 Apprentice
Joined: 17 Mar 2015 Posts: 38 Location: Perth, WA
|
kimbert wrote: |
In that case you and Akil will need to fight this one out between yourselves. |
mqsiservice -v
BIP8996I: Version: 9002
BIP8997I: Product: IBM Integration Bus
BIP8998I: CMVC Level: S900-FP02
BIP8999I: Build Type: xxxxxxxxxx, 64 bit, amd 64_linux_2
BIP8980I: Fix ID: 9.0.0.2-IIB-LinuxX64-xxxxxxxxxxx |
|
Back to top |
|
 |
|