on 2007 Nov 22 12:39 PM
Hello,
I'm having a problem with the conditional graphical mapping.
Here's a part of my source schema:
...
E1EDP01 (1..n)
E1EDC01 (0..n)
...
Here's a part of the target schema:
...
POLINEX (1..n)
...
Goal of the mapping:
If the E1EDP01 element has no E1EDC01 subelements, target element POLINEX is created once.
If the E1EDP01 element has 1 or more E1EDC01 subelements, the target element POLINEX is created as many times as there are E1EDC01 subelements for that E1EDP01 element.
So for example:
source:
...
...
would have to result in 4 POLINEX elements in the target message.
I tried the following mapping:
E1EDC01
E1EDP01 -- exists --\u00A0 then ___ AND __ if >---- - - - - - - POLINEX / else E1EDC01 -- exists --/ |
E1EDP01
If this is not readable, you can find a screenshot of the mapping
<a href="http://www.ict-cs.com/xi/xi-graph-mapping.JPG">here</a>
.
When I map my source example, I only get 3
POLINEX elements in the target.
Any idea what I do wrong or if there's a better graphical mapping that can be used for this ?
Thanks in advance !
You can use the node function "mapWithDefault", what does exactly what you need.
E1EDC01 - mapWithDefault - POLINEX
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Stefan,
thanks for the fast reply !
I tried with the "mapWithDefault" node function, but then I only get as many POLINEX target elements as there are E1EDC01 elements.
Maybe I explained it somewhat unclear, but if there is 1 or more E1EDP01 elements (f)
(no POLINEX target element for (b) + (e), because this element has subelements.
Can this be done ?
Thanks again !
(will reward points !)
Stefan,
thanks again for the reply.
I don't know what I'm doing wrong then with the mapWithDefault, but the E1EDP01 elements without a E1EDC01 subelement don't get mapped to a target POLINEX element.
All POLINEX are under the same parent node.
Could you have a look at my new <a href="http://www.ict-cs.be/xi/xi-graph-mapping2.JPG">screenshot</a>, following your advised mapping ?
Thanks !
The Context of E1EDC01 must not be changes, it is sufficient to change the context of the target with the node function removeContexts.
I see that you have applied valeus to the node E1EDP01. The mapWithDefault cannot take the values from there.
Could you provide a more detailed example, with values?
Regards
Stefan
Hi Frederik,
below mapping may solve your problem
E1EDC01----
>Then
E1EDC01-->Exists
E1EDPO1-->Split by value---->Else
explanation:-
1) take IF Then Else function
2) for If map E1EDC01 and Exists
3) for Then map E1EDC01
4) for Else map E1EDP01 by using Split by value function in between.
5) Map the result to POLINEX.
Please let me know if your problem is not solved
Regards,
Karan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Can't you have the target as:
Node
++Polinex
Things would be easier..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nair, the POLINEX has a parent element, being "Group". How could that make things easier ?
Karan, thanks for your reply!, but that didn't work. It only maps the E1EDC01 elements, but not the E1EDP01 elements that have no E1EDC01 subelements.
Stefan,
I indeed messed up with the contexts, I changed it and now it works ! (the values were only put in the test message to make it easier to understand which elements were mapped and which weren't in the result).
Thank you for your great help !
(points awarded )
Understood question wrong. Content Deleted
Message was edited by:
Prabhu S
Message was edited by:
Prabhu S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
71 | |
11 | |
10 | |
10 | |
10 | |
8 | |
7 | |
7 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.