on 07-27-2007 6:35 PM
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..
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.