cancel
Showing results for 
Search instead for 
Did you mean: 

Stateful message processing for async scenario

former_member296836
Participant
0 Kudos

Dear all,

my async scenarios:

1. RFC -> PI -> File

2. File -> PI -> RFC

Following facts:

- The second message is a response to the first one. Both message are separted and async.

- Scenario 2 can be send some hours after Scenario1.

- A response should only be send if a specified field in the message of first scenario is filled.

For example: Message in scenario has a field <ResponseNeeded>YES</ResponseNeeded>

This field does only exist in message of scenario 1.

- Both message have an ID field (e.g. <ID>4711</ID>) which can be used to identified the

corresponding message.

Questions:

- Is it possible to use stateful message processing for this scenario? Or do I need BMP + Correlation?

- A service interface with pattern "stateful" can only be used synchronously. So is it

possible to use this stateful for async message processing at least?

I would assume that I will need a BPM that sends the messsage and keep alive until a

response will be sends with same ID. After this I would check message of scenario1 and

send (or even not) the message of scenario2 to receiver depending on <ResponseNeeded>.

Thanks in advanced.

Chris

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Chris,

Although BPM is possible here, I would not recommend you to use one here for the reason,

>>Scenario 2 can be send some hours after Scenario1.

This means you are keeping a process alive for so long which is not a good thing to do.

You could end up with a lot of open/live process instances.

Having said that, if you still wish to go ahead with BPM, the steps would be

1. Receive async (RFC req) - start process, correlation based on ID.

2. Switch step (Evaluate ResponseNeeded)

branch 1(True): a. Send asynch step - File

b. Receive async - File correlation - ID.

c. Send async - RFC call.

branch 2(false) a. Send async -File

3. Stop process.

Regards

Jai

maciej_jarecki
Contributor
0 Kudos

Hi Christian,

Use ASAM(adapter specific message attributes) and when you download file name it with some pattern that consist of somename, ID and response needed. than receiving system will know what is ID and is it neccesary to anwser it. In my opinion very simply solution.

Regards

Maciej

former_member296836
Participant
0 Kudos

Thanks to your answers.

If someone else have some experiences with BPM (Correlation/Stateful message processing) I would be interessted to hear.

Regards

Chris

Shabarish_Nair
Active Contributor
0 Kudos

Store the data i.e ID and Response required in a table in ECC.

During the 2nd flow, when you receive the file, use a RFC lookup and retrieve if the response is required or not for the particular ID. Then take care of the flow as required.