Despite I frequently use this community this is my first post here.
I have this situation where I'm doing a mapping from CompoundEmployee (SuccessFactors) to a third party.
Considering this source structure:
I should get the following structure/data on the target:
What I have done is a mapping with a IF, I take the value from phone_type, and if it is a then it is sent. For b_phone I created another function, same logic but instead of "a" the ifWithoutElse received a constant of "b" and the true value is phone_number.
The thing is that only the first occurence from the source structure is evaluated, and the worst, if I have two <person>'s on the same XML then the second person will receive the phone of the first person (Seems that the second occurrence of <phone> is evaluated the second time I evaluate a person)