I have a strange issue with the service wm.fin.format:xmlToIData, which I want to use to create a temporary IData document from a SWIFT MT192 in XML-format.
The goal is to create a complete SWIFT-FIN message text (including headers and trailer) by completing its content part, which I have as XML.
What my flow service is doing is the following:
select the BLOB containing the XML from the database
convert the BLOB to a string
pass that XML string to the service xmlToIData
pass the output to wm.fin.map:mapOutbound
map respective values to the SWIFT header
pass the output to wm.fin.dfd.convertBizNameFormat
pass the output to wm.fin.format:convertIDataToFIN
Finally, I have my SWIFT message as a string. Mission complete.
Here’s the funny part:
When I run the service as a whole I get the following error message in Step 3):
If I then trace the flow service step by step it’s working fine. The XML string is there and it is converted to IData as expected.
Is there some sort of timing problem with this service? How else can it be that it is working on the one hand when I step through it in trace mode, and not working on the other when the service is run normally?
The error can even be reproduced when I quickly step through the service in trace mode. While when clicking slowly (i.e. waiting a few seconds between each click) it’s doing what it’s supposed to.
Inserting a sleep-service, by the way, did not help I already tried that.
The BLOB is being read through an SQL adapter service. The database table, from which it reads consists of two columns, ID and BLOB. The adapter service of course gets the ID as input and returns the BLOB as JDBC Type “BLOB” and as output field type “byte array”.
Next in line is a map service that uses pub.string:bytesToString as a transformer to convert that byte array to a string. It does nothing else.
This string is then used unalteredly as direct input for wm.fin.format:xmlToIData.
As said: stepping through the flow click by click has it working. Running or tracing the service causes the error.
Just before the call to xmlToIData–which should have been named xmlStringToDocument; doesn’t wM have design reviews? – put in a savePipeline (not savePipelineToFile). Then run restorePipeline separately to see what the pipeline holds right before the call. That may provide info as to what’s happening.