ivan stojic
life is a low fidelity experience

Unpacking strings in TIBCO BusinessWorks

August 29th, 2006, 10:27.

Suppose you have a string composed of messages which are fixed in length. However, you do not know for certain how many messages there are in the string. You need to take this string and unpack it into a list of repeating elements where each element represents one message.

How do you do this? BusinessWorks’ built in Parse activities will not help you because you do not know in advance how many messages there are in the package.

Let’s do it!

First off, we need a process definition with the required input and output formats. This splitter implementation will work with any message length, based on it’s input and the output is a set of repeating items which are tokenized out of the package:

Input and Output
Figure 1 - Input and Output for the Splitter process

Now, the magic part. We need to iterate over the package, picking out parts from it and saving them for later use. First, we create the iteration group and set the basic parameters:

Iteration group settings
Figure 2 - First part of the group options

Then we pick out one item from the package:

Mapper settings
Figure 3 - Mapper configuration

And in the end, we modify the group to store the item we just picked out:

Iteration Accumulate Output Settings
Figure 4 - Accumulating group output

The end is simple, converting the output of the group into our required process output:

End mapping
Figure 5 - Mapping the output

That’s it! Now you can get to your package items!

And here is the download of the repository which contains this process. Enjoy!

Technorati Tags: , , , , ,

Leave a Reply