Developer 7.1.2 - Timing problem with wm.fin.format:xmlToIData?

Hello everybody,

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:

  1. select the BLOB containing the XML from the database
  2. convert the BLOB to a string
  3. pass that XML string to the service xmlToIData
  4. pass the output to wm.fin.map:mapOutbound
  5. map respective values to the SWIFT header
  6. pass the output to wm.fin.dfd.convertBizNameFormat
  7. 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 :wink: I already tried that.

Any ideas anybody?

Thanks in advance
Sascha

It may be related to reading the BLOB. Can you share the details of that?

Thanks for the reply.

Which details are you interested in? I will gladly share them :slight_smile:

How the BLOB is being read.

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.

Thanks in advance
Sascha

Just before the call to xmlToIData–which should have been named xmlStringToDocument; doesn’t wM have design reviews? :wink: – 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.

Oh well… I think I have a Poltergeist in my system.

After literally dozens and dozens of failed attempts (I have witnesses for that!!) the service now seems to work.

I inserted a savePipeline before xmlToIData and ran the service normally and it worked!

Then I disabled the step and tried again (to make sure it is not savePipeline that causes it to work), and it still worked.

Now, this is kind of embarrassing, but I cannot reproduce the error anymore.

By the way, the pipeline, retrieved from a separate service, looked perfect like I had expected it to look.

I think we can close the case here.

Even though I’d still love to know why it was happening.

Cheers,
Sascha