cancel
Showing results for 
Search instead for 
Did you mean: 

BPM process calling another BPM process synchronously

former_member200267
Participant
0 Kudos

Hi,

When have a BPM (SCENARIO_1) that receives a request.

The BPM makes a SYNC call to another BPM (SCENARIO_2_SYNC_SEND). The second BPM should return the sync response to the first BPM. The second BPM has been implemented as a SYNC/ASYNC bridge. .........This scenario is NOT working.

We have independently tested the second BPM and can confirm that it works correctly and as expected when it is NOT called by another BPM.

design steps of BPM

1. BPM (SCENARIO_1)

start -> receive(async) - >send(sync - calls 2nd BPM) -> stop

2. BPM (SCENARIO_2_SYNC_SEND). (this BPM is invoked by first BPM (SCENARIO_1)

start ->receive(sync -open SA bridge) ->send(sync - calls webService) ->send(closes SA bridge)

Is SAP PI supports synchronous call from one BPM to another BPM???

rgds,

RDS

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Shankar,

Check all the steps for the second BPM, especially the response coming from receiver system(web service)

There is a possibility that receiver system is not able to give the response in the given time and so,

all the steps are getting delayed response and hence, the first BPM is throwing timeout error.

-Supriya.

Answers (1)

Answers (1)

samiullah_qureshi
Active Contributor
0 Kudos

Is SAP PI supports synchronous call from one BPM to another BPM???

I never tried that but logically there should not b a problem. When a BPM is calling another BPM with Sync/Asyn bridge, it is like any other system is calling the BPM with sync/async bridge.

former_member200267
Participant
0 Kudos

I also though the same way...but it is not behaving the way we thought.

The first BPM started OK

When the sync SEND step is reached, the first BPM goes into a WAITING state.

Once the CHECK_FOR_ASYNC_RESPONSE_TIMEOUT limit has been reached, the first BPM throws a TIMEOUT Error.

Its at this stage that the second BPM start its execution.

the second BPM has SA bridge which is not able to close because the first BPm already timeout...

Any idea how to fix this

Edited by: Shankar Raju Devadoss on Aug 25, 2010 5:39 AM

henrique_pinto
Active Contributor
0 Kudos

How is the delivery mode of your BPMs?

Also, is the 2nd BPM an instance of the same integration process as the 1st one?

Usually, it is not so recommended to do that (BPM calling another one), specially due to performance reasons (you'll have two queued workflows instead of one). Anyway, I have succesfully done BPM to BPM integration in the past, but majorly with async integration, never with sync integration.

You meant the 2nd BPM just starts after the 1st one closes??? Are you sure about that?

That is a strange behavior. Are they being executed thru a single queue??

BR,

Henrique.

former_member200267
Participant
0 Kudos

Hi Henrique,

we also done the BPM calling another BPM asynchronousl;y, which is working fine.

In this case, I designed BPM like follows (as initially mentioned)

1. BPM (SCENARIO_1)

start -> receive(async) - >send(sync - calls 2nd BPM) -> stop

Note : In 'send' step, I selected 'Create New Transaction'.......if I don't select this property then system dumping without invoking the second BPM, When I select this property the second BPM is invoked after the 1st BPM completes i.e it waits for CHECK_FOR_ASYNC_RESPONSE_TIMEOUT (default value 60 secs) to elapse. during this time an entry in the outbound queue (smq2) appears

2. BPM (SCENARIO_2_SYNC_SEND). (this BPM is invoked by first BPM (SCENARIO_1)

start ->receive(sync -open SA bridge) ->send(sync - calls webService) ->send(closes SA bridge)

how do we check whether it using more than one queue??

we have only looked at smq1 & smq2.

We see an entry in SMQ2 which stays there for the timeout period of the first BPM.

It seems as if the second bpm doesnt see it until the first BPM closes.

I might think this is appropriate behaviour to stop the engine processing the same message more than once which would explain the behaviour we are seeing. However this would mean PI would not support BPM synchronously calling BPM which is what we are trying to determine if it is supported.

We cant find any documentation saying this is possible and alot of documentation indicates workarounds.

Have you ever seen this scenario implemented.

<removed by moderator>

Hi supriya,

There is no problem in getting the response from webservice, the problem is the BPM which calls webservice itself invoked after the timeout of first BPM.

Edited by: Shankar Raju Devadoss on Aug 25, 2010 7:21 AM

Edited by: Shankar Raju Devadoss on Aug 25, 2010 7:32 AM

Edited by: Prateek Raj Srivastava on Aug 25, 2010 11:24 AM

prateek
Active Contributor
0 Kudos

Is there a specific requirement due to which you are using 2 BPMs? Can't you merge it to 1?

Have you tried increasing value of parameter CHECK_FOR_ASYNC_RESPONSE_TIMEOUT to 120?

Its at this stage that the second BPM start its execution.

Do you mean after the timeout?

Regards,

Prateek

henrique_pinto
Active Contributor
0 Kudos

Shankar,

I wouldn't be so surprised if this is not supported, even if the documentation doesn't state anything specific.

That being said, I would try to investigate whether changing the delivery mode in SWF_INB_CONF would change the behavior anyhow.

You said that in SMQ2, you see one entry for BPM1, then later for BPM2.

But the name of the queues are the same??

Should be different, based on workflow ID (something like. XBQO?PE_WSXXXXX).

Check this article: http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/c00d9465-ea97-2910-deac-f8aa681eef35

Additionally, during the execution of BPM1, how does the message appear in SXMB_MONI?

Can you see a sync message with BPM1 identified as sender & BPM2 identified as receiver?

BR,

Henrique.

former_member200267
Participant
0 Kudos

Hi Henrique,

This is really strange, but our problem got resolved.

The behaviour of BPM is really strange,

case 1:

when the 'create new transaction' is not selected in the BPM 1 then BPM1 is dumping instead of invoking the BPM2

Q?? why we need to select create new transaction when we do synchronous call to another BPM???

case 2:

when the 'create new transaction' is selected the BPM1 invoked BPM 2 after the timout of BPM,

during this time an entry was there in SMQ1(outbound queue) waiting for the timout.

So what we did was....Basis ppl just deleted the RFC Destination Queue WORKFLOW_LOCAL_100 was in 'WAITCONN' status and recreated it, after then the entry waiting in SMQ1 disappeared....after then it was executing as expected.

I don't understand this weird behaviour.

Anyway just have in mind that when we want to invoke another BPM synchrnously the we need to select the 'create new transaction' and check the queue's and also check SMQS for status of queue

regards

RDS

Edited by: Shankar Raju Devadoss on Aug 26, 2010 12:53 AM

Edited by: Shankar Raju Devadoss on Aug 26, 2010 1:07 AM

henrique_pinto
Active Contributor
0 Kudos

Hi Shankar,

are you sure that the only thing the Basis guy did was to recreate the RFC Dest?

Because theoretically, when you create the RFC Destination, you need to register it in SMQS, and there you assign a max number of connections. It might be the case that before this max number was set to 1, and after recreating it was changed?

BR,

Henrique.

former_member200267
Participant
0 Kudos

Yes Basis ppl deleted and recreated the RFC destination WORKFLOW_LOCAL_100......nothing else was did

samiullah_qureshi
Active Contributor
0 Kudos

Thanks for sharing the info.