Skip to Content
0
Oct 29, 2018 at 10:09 AM

Router and XML CSV converter not working as expected

49 Views

Hi People,

I have created an iflow which is getting the response of SFAPI and further this response is sent through several maps and then through XML TO CSV converter and then the resultant CSV file is sent to SFTP location.

We are sending the XML response of SF API to a sequential multicast which has ten branches where every branch has a map for data transformation and last most branch has the issue. However the scenario is working perfectly fine but for one branch the XML is leaking in the result CSV. In that branch SF API response for a particular employee is coming in XML format which we further send to a router which has two routes -

1. Default route which has Event End message.

2. Route with the following condition /queryCompoundEmployeeResponse/CompoundEmployee/person/employment_information/job_information/event = ('H','R') (As it is our requirement to send the message only if it has event H or R)

If the message routes to second condition, the message is sent through a map and then it is manipulated and sent to xml-csv converter shape whose response is sent to Join for joining response from other branches and then we have used Gatherer to create a Final CSV.

But the issue we are facing is that if the above condition becomes true in the router, correct CSV file is generated. However if the above condition becomes False, i.e., event ! = ('H','R') then whole XML response coming from SF API for that particular employee takes a WHOLE row in final CSV which is strange.

For further analysis, we set the router condition as /queryCompoundEmployeeResponse/CompoundEmployee/person/employment_information/job_information/event != ('H','R'), it worked as the message with events other than H or R correctly got placed in final CSV file.

We have checked the XML to CSV converter and it has correct configuration.

Can you please specify what can be the issue here as we dont want the whole XML to be appearing in final CSV.

Please refer to the attached screenshot

1.png

Attachments

1.png (59.3 kB)