Skip to Content
0

Problem using HCI graphical mapping

Oct 04, 2017 at 08:15 PM

34

avatar image
Former Member

Hi dears,

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:

<person>

<person_id_external>123</person_id_external>

<phone>

<phone_type>a</phone_type>

<phone_number>1234</phone_number>

</phone>

<phone>

<phone_type>b</phone_type>

<phone_number>4567</phone_number>

</phone>

</person>

I should get the following structure/data on the target:

<employee>

<id>123</id>

<a_phone>1234</a_phone>

<b_phone>4567</b_phone>

</employee>

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)

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers