Skip to Content
avatar image
Former Member

BPM Collect Pattern.

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..

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jul 27, 2007 at 05:55 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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