AnsweredAssumed Answered

Empty node breaks map

Question asked by martijn.keizer147426 on Aug 1, 2016
Latest reply on Aug 1, 2016 by Srinivas Chandrakanth Vangari

I am building a process that needs to request records from a service. The records returned are in XML format and are in a similar structure to this:

<root>

     <recordcontainer>

          <record>[data]</record>

          <record>[data]</record>

          <record>[data]</record>

     </recordcontainer>

     <moreRecords>false</moreRecords>

</root>

I need to extract a few values per record from the data. I do this with a data map. The generic structure of my target profile is the same as that of the source profile. In both cases, the minOccurs of the record is set to 0, the maxOccurs to unbounded.

 

When there are no new records to display, the service that I call returns the following message:

<root>

     <recordcontainer/>

     <moreRecords>false</moreRecords>

</root>

When receiving this message, the mapper returns an exception and aborts the process. I figured that I can use a try-catch block to retrieve this error and continue, but shouldn't the mapper be able to detect the "no records" message, and produce an empty result? If it is possible, how do I do that?

 

Thanks,

Martijn Keizer

Enable-U

Outcomes