Graphical mapping: if-then-else problem
I'm having a problem with the conditional graphical mapping.
Here's a part of my source schema:
Here's a part of the target schema:
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:
would have to result in 4 POLINEX elements in the target message.
I tried the following mapping:
E1EDP01 -- exists --\u00A0 then
___ AND __ if >----
E1EDC01 -- exists --/
If this is not readable, you can find a screenshot of the mapping
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 !
Stefan Grube replied
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?