cancel
Showing results for 
Search instead for 
Did you mean: 

BPM - correlation query.

Former Member
0 Kudos

Hi All,

I have a BPM scenario involving 3 messages types - A, B, C. Messages A and B are actually 2 files to be received from two different sources with the condition that A is received before B. Further, there is a N:1 mapping where source messages are A and B, and the target message is C.

The BPM looks like this -

Receive A --> Receive B --> Transformation (A & B are mapped to C) --> Send C.

Now I assigned message A container to first Recieve step. However, when I assigned message B container to second receive step, the 'Use Correlations' field in that step is shown up as mandatory. In this scneario, there is essentially no correlation between messages A and B. So I want to know what's to be done here and how I can avoid correlation.

Regards,

Shankar

Accepted Solutions (1)

Accepted Solutions (1)

justin_santhanam
Active Contributor
0 Kudos

Shankar,

You can do workaround to achieve this , but before that make sure the following things.

- Make sure you have only one file for each channel at the source [I believe you are not using * in File Scheme]

You can't avoid Correlation, but you can achieve it by creating dummy correlation. Create the correlation container, assign Messages , in Properties choose Constant =1 for first message , then Constant=1 for second message. Basicall keep any constant value as u like.:-)

This will always be success, coz the correlation will always be true.

Try it and let us the know the feedback.!!

raj.

Answers (5)

Answers (5)

henrique_pinto
Active Contributor
0 Kudos

To merge two informations into another one, you have to actually create some association between the two original information sources in order to choose the proper messages to be merged.

The messages are time-dependent data-containers and hence, without correlation, at a given point of time, you could have two uncompletely unrelated messages going into the same bpm instance.

For example, suppose you have purchase order and sales order documents going into the bpm to be merged and create delivery order.

Each sales order document is associated uniquely to a purchase order. You cannot merge two unrelated documents (purchase order X and sales order for purchase Y) and hence, some correlation between the documents is necessary.

Maybe if you described your business scenario a little further, you could receive further help.

Best regards,

Henrique.

Former Member
0 Kudos

Thanks everyone for your responses. Let me explain the scenario in more detail.

We have an asynchronous scenario involving a source system thats daily sends one XML file containing multiple records. It is then converted into a flat file and sent to receiver system. In the source message there is one field which says whether the record belongs to SAP or JDE. Thus it can have any one of these two values. However the flat file does not contain any field to have these values mapped, because the receiver system doesn't care whether the record is for SAP or JDE.

Now, later on, the receiver system returns an error file in case there is an error in processing the records sent earlier. This file of course contains some fields which are common with the source file. This will be a file sender channel to pick up the error file.

I want to segregate the records from the error file depending on whether they belong to SAP or JDE. For this I am taking help of the original source file which has this information.

Going back to the terminology,

Message A - Error File sent by receiver

Message B - Source file sent by sender

Message C - Error File with additional field populated with SAP / JDE.

Hence I designed the BPM as given above. If message A doesn't arrive, then there is no need of executing the BPM.

Raj - your trick worked. I put dummy correlation and it is not giving error.

However, I am now getting a different (may be unrelated) error. When I specified the containers (from abstract interfaces) in the transformation step, the error is shown that "the expression must return an interface of type <interface name>". Why it is so even if I have defined and activated all the abstract interfaces and all ?

Regards,

Shankar

Former Member
0 Kudos

hi shankar,

i have a query-just for my curiosity!! . why do you want message A to be received before message B? Is there some other logic also in your BPM or only that u have mentioned? because once you receive message A your process instance is practically doing nothing but waiting for the other message and straight after that u have transformation and as u said there is no link between the two msgs. So for this particular requirement it does not matter which message is received first.

regards,

latika.

Former Member
0 Kudos

Hi Shankar.

As I understand your scenario, you are trying to combine two different messages (i.e., A & B) into one message and sending it to the target.

In this case, when there is no correlation between the messages, it would not be possible to merge / combine them. The correlation would definately fail in this case.

The workaround method that I can suggest you is, fetch the messages A & B and send them to a file in the local directory of the XI Server. Here, the File Transfer Mode of the receiver file adapter should be Append.

Now, both the messages will be collected into one file. Now you can fetch this file and then do the processing that you want to do with it.

Hope this would help you.

Regards,

Hari.

Former Member
0 Kudos

Hi,

Check the Links for BPM concepts.

/people/krishna.moorthyp/blog/2005/06/09/walkthrough-with-bpm

/people/shabarish.vijayakumar/blog/2005/08/03/xpath-to-show-the-path-multiple-receivers

/people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit

/people/sravya.talanki2/blog/2005/08/24/do-you-like-to-understand-147correlation148-in-xi

/people/michal.krawczyk2/blog/2005/09/04/xi-do-you-realy-enjoy-clicking-and-waiting-while-tracing-bpm-steps

/people/sudharshan.aravamudan/blog/2005/12/01/illustration-of-multi-mapping-and-message-split-using-bpm-in-sap-exchange-infrastructure

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/daea5871-0701-0010-12aa-c3a0c...

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/e8515171-0701-0010-be98-e37be...

Regards,

Phani

Reward points if Helpful

VijayKonam
Active Contributor
0 Kudos

Whats your mode of receiving in these steps? If Async, the correlation should not be a required field. Are you doing a sync receive??

VJ