Hi,
I am Querying the compound employee and getting the person data with multiple employment information. I would need the employment information where the 'company is 42' under job information node. The other company employment information should be removed. This is my requirement.
I tried to remove it using filter post request reply query but the filter sends both the employment data. Below I have updated the filter details.
queryCompoundEmployeeResponse/CompoundEmployee[((person) and ((person/employment_information/job_information/employee_class = '1_NLD' or person/employment_information/job_information/employee_class = '2_NLD' or person/employment_information/job_information/employee_class = '3_NLD' ) and (person/employment_information/job_information/company = '42') and ((person/employment_information/job_information/action = 'INSERT' or person/employment_information/job_information/action = 'CHANGE') and (person/employment_information/job_information/event = 'H' or person/employment_information/job_information/event = 'R') or (((person/employment_information/compensation_information/action = 'CHANGE') or (person/employment_information/compensation_information/action = 'INSERT')) and ((person/employment_information/compensation_information/paycompensation_recurring/action = 'CHANGE') and (person/employment_information/compensation_information/paycompensation_recurring/calculated_amount_previous))))))]
As the filter dint work I have tried to use another message mapping before the original data mapping.
I am using 'createif' node function to remove the unnecessary employment information but the issue is, the field company is under job information node which repeats many times under each employment information , so the employment information is getting created as many times the company field is present.
My output XML from request reply I have provided below , also updated the createif function image.
Can any one help me to resolve the issue, which way can help me to remove the unwanted data. Please suggest.
<queryCompoundEmployeeResponse>
<CompoundEmployee>
<person>
<action>INSERT</action>
<created_by>46174</created_by>
<person_id_external>99598</person_id_external>
<employment_information>
<action>INSERT</action>
<start_date>2020-01-03</start_date>
<user_id>99598</user_id>
<job_information>
<action>INSERT</action>
<business_unit>1BS35</business_unit>
<company>42</company>
<custom_string4>NL</custom_string4>
<custom_string9>C</custom_string9>
</job_information>
<job_information>
<action>INSERT</action>
<business_unit>1BS35</business_unit>
<company>42</company>
<custom_string4>NLDP</custom_string4>
<custom_string5>CSS</custom_string5>
<custom_string9>D</custom_string9>
</job_information>
<job_event_information>
<action>INSERT</action>
<event>H</event>
</job_event_information>
<compensation_information>
<paycompensation_recurring>
<action>INSERT</action>
<last_modified_on>2021-12-29T14:53:26.000Z</last_modified_on>
<pay_component>501</pay_component>
<pay_component_type>AMOUNT</pay_component_type>
<paycompvalue>0.0</paycompvalue>
<seq_number>3</seq_number>
<start_date>2021-12-29</start_date>
</paycompensation_recurring>
</compensation_information>
<compensation_information>
<paycompensation_recurring>
<action>INSERT</action>
<pay_component>5010</pay_component>
<pay_component_type>AMOUNT</pay_component_type>
<paycompvalue>0.0</paycompvalue>
<seq_number>3</seq_number>
<start_date>2021-12-29</start_date>
</paycompensation_recurring>
</compensation_information>
</employment_information>
<employment_information>
<action>INSERT</action>
<start_date>2020-01-03</start_date>
<user_id>99598</user_id>
<job_information>
<action>INSERT</action>
<business_unit>1BS35</business_unit>
<company>17</company>
<custom_string4>SP</custom_string4>
<custom_string7>A</custom_string7>
<custom_string9>D</custom_string9>
</job_information>
<job_information>
<action>INSERT</action>
<business_unit>1BS35</business_unit>
<company>17</company>
<custom_string4>SR</custom_string4>
<custom_string9>D</custom_string9>
</job_information>
<job_event_information>
<action>INSERT</action>
<event>H</event>
</job_event_information>
<compensation_information>
<paycompensation_recurring>
<action>INSERT</action>
<last_modified_on>2021-12-29T14:53:26.000Z</last_modified_on>
<pay_component>10</pay_component>
<pay_component_type>AMOUNT</pay_component_type>
<paycompvalue>0.0</paycompvalue>
<start_date>2021-12-29</start_date>
</paycompensation_recurring>
</compensation_information>
</employment_information>
</person>
</CompoundEmployee>
</queryCompoundEmployeeResponse>