Quantcast
Channel: SCN : Popular Discussions - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 971

PI / HCI message mapping issue

$
0
0

Hello, I have a mapping issue.

 

We are reading the SuccessFactors CompoundEmployee interface.

 

Let's say we have the following structure :

SC_1.jpg

 

Task :

I have to take out the job_information record active now, so at job_information level I test if current_date is between start and end_date, and if emplStatus = a (active). To achieve this, the start_date, end_date and emplStatus are set to context level 'employment_information', this is the same level as job_information resides on.

 

The subelements of the job_information node are all set to the same context as the employment_information, followed by a 'SplitByValue' (Each Value).

SC_2.jpg

 

Let's say we have three input records, the appropriate records is selected.

 

 

So far, so good.

 

Issue :

Not all input records have 'location' entry. If this is missing, the output is wrong. The 'SplitByValue' expects an element in the queue. If not the case, the 'next' element is assigned to the record instead of an empty (or no) value. That's why I tried to map Location with 'mapWithDefault', followed by the SplitByValue, but no luck.

 

Example :

 

First record :

 

     job_information

          company : TEST_AUT

          emplStatus : A

          end_date : 2016-01-29

          start_date : 2016-01-20

          location : AUT

 

Second record :

     job_information

          company : TEST_BE

          emplStatus : A

          end_date : 2016-01-31

          start_date : 2016-01-21

          location : this is missing

 

Third record :

     job_information

          company : TEST_FRA

          emplStatus : A

          end_date : 2016-10-29

          start_date : 2016-01-20

          location : FRA

 

Fourth record :

     job_information

          company : TEST_USA

          emplStatus : A

          end_date : 2016-02-14

          start_date : 2016-01-01

          location : USA

 

 

-> The output will be the third record (start_date and end_date and emplStatus are valid), but with the value location : USA, which is actually the 'fourth' record.


     job_information

          company : TEST_FRA

          emplStatus : A

          end_date : 2016-10-29

          start_date : 2016-01-20

          location : USA

 

This is caused by the missing 'location' in the second record. I was hoping 'mapwithdefault' would take care of this, but apparently not. Is there no mapwithdefault performed due to the context change attempt on the 'non-existing' location node for the second record?

 

 

How can I work around this?

 

Many thanks!


Viewing all articles
Browse latest Browse all 971

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>