cancel
Showing results for 
Search instead for 
Did you mean: 

BPM Collect Pattern.

0 Kudos

Hi Experts !

I am trying to implement this scenario.

Source File Adapter -

Message - Vendor # - Material # [Only one material ]

Pattern : Collect Pattern

Key for Correlation - Vendor #

Message collection in Loop for a counter of 3 Messages.

Target file on Directory to be created using file adapter should be of this structure:

<Header> 1.1

vendor

<Header/>

<Items> 1..Unbounded

<Material>Matl1 <Material/>

<Material>Matl2<Material>

<Material>Matl3<Material/>

<Items/>

When collect messages into a multiline container it will be based on source message. The multiline container will be looking like this:

vendor# Material#

vendor# Material#

vendor# Material#

after all the three records are collected.

What mapping from this point is required to get the output explaine above.

Please mention whether it is a step outside BPM or inside BPM.

When system encounters a multiline container does it process each message at a time or is the mapping applied to all the messages at a time.

Thanks in advance..

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Questions for you:

how do you know when to stop collecting the messages for a specific vendor - is there a time limit when vendor A stops sending you items or is the number always 3?

One option:

- collect in BPM (assuming you have a defined way to stop the collect)

- after all items are collected

- perform n-1 map and create the structure below or something basic, similar if it's java intensive

- send step in bpm (if above was something basic and you still need more mapping then map in your receiver determination in your send step)

sincerely,

--NM

0 Kudos

Thanks for sharing your views.

As I mentioned I will stop collection based on a counter.

Coming to my question again..

N : 1 Mapping..

Can you elaborate on N:1 mapping you are suggesting.

Here is what I did ..

One Msg... -


> Multine Line Mapping

abs similar to One msg source target

multiline abs target_abs..

Message Mapping details...this is what i use in Intf.Map..aplied above.

vendorx -


> VendorX

material1 1.1 -


> Material [1..n]

where the output I get is only the last item processed...

If I pass Output

Vendor1 - Matl1 Vendor - Matl3....

Vendor1 - Matl2

Vendor1 - Matl3

Where am I going wrong...

thanks.

Former Member
0 Kudos

Create a loop.

Create a correlation based on vendor number

Each message you receive will meet your correlation so append to your multi line object

when you exhaust loop (i.e. your counter is reached) you have multiple lines

execute a mapping step (this is n:1) that takes the multipline line and maps it to one. Your n:1 mapping is also triggered by you setting the unbounded flag in the interface mapping.

sincerely,

--NM