Bundling Messages Without BPMN/ccBPM

Facebooktwittergoogle_pluslinkedintumblr

I got the following question from a contact:

Hello Daniel,

I have a requirement with my client, and as per this requirement, how can we append multiple incoming documents into one document, just for a period of time?

This needs to be done without BPM.
e.g. 5 files coming in time b/w 4PM to 5PM and needs to send 1 file after appending.

It would be obvious to use BPMN to process this, in which case you will only create a collect pattern that listens for 5 files, and then concatenates the files to one message. But since BPMN is not an option, I would go with the following idea:

If it were IDocs, I would use IDoc bundling, because it would be the simplest approach, since it contains the mapping.

Without these options, I would take the following steps:

  1. First, I would route the messages directly to a file location on the SAP PI/PO system.
  2. Then, I would create a file adapter that listens in this directory. This adapter can be scheduled to run for 1 minute at 5PM. This will enable picking up all the files. Then we have some other options, though I’m not sure which will work best.
    1. You could have a batch/Unix job that takes the 5 files and concatenates them into the first file, and then process this file. You use the parameter %F or %f to get the file that is being processed.
    2. You could use the get additional files. I’m not sure if it can pick up files with the same name, otherwise you will have to create a dummyfile to be used for the main message. Then you will have all 5 files in one payload. Your job is then to create an adapter module or a message mapping that can concatenate the attachments into the MainPayload and process it.
Facebooktwittergoogle_pluslinkedintumblr

Comments are closed.