cancel
Showing results for 
Search instead for 
Did you mean: 

Fork is not working - BPM

Former Member
0 Kudos

I have done 2 samples using fork and in both the cases it is not working. For each message new BPM is triggered and only one step (branch) gets completed and other branch steps remain in ready state forever.

1) I have tested standard BPM pattern BpmPatternCollectMultiIf

2) Simple process using fork - two branches using different inetrfaces (having different message types)

Integration process return code is 0 - runtime cache

I am testing on local sandbox (XI 3.0) with SP17.

Under SAP help only brief description available about fork. Please share if you have good references/samples about fork (BPM).

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Jai,

1)I expect following result in case of standard BPM pattern "BpmPatternCollectMultiIf"

Note: Here same message type for all 3 interfaces ( branches), no end condition, no of branches = 3

As all message types are same when I send first message only one branch will be executed and outbound status under sxmb_moni with be clock (Message being sent). When I send 2 message, second branch will be completed and status will be clock again. And when I send 3 rd message all branches will be completed and outbound status will be success flag (Message successful on outbound side). Under one process id three messages will be displayed

Actual result is every time status as clock. and for each message new fork instance is created. below are the processids for 3 messages

133721

133726 -


unexpected

133731 -


unexpected

Ideally when you send 3 messages all should be process under process ids 133721 to 133725

2) I have tried fork with 3 branches with different message types. When I send 3 messages ( here each payload is different as per message type ) I expect success flag after 3rd message. But in this case also always the status as clock. and every time new fork instance.

Is anybody successful to test BPM pattern -> BpmPatternCollectMultiIf?

Former Member
0 Kudos

Rujuta,

>>As all message types are same when I send first message only one branch will be executed and outbound status under sxmb_moni with be clock (Message being sent). When I send 2 message, second branch will be completed and status will be clock again. And when I send 3 rd message all branches will be completed and outbound status will be success flag (Message successful on outbound side). Under one process id three messages will be displayed

You are absolutely correct. You might have missed the correlation and hence your BPM not working as expected. I have tried the same scenario earlier and it worked as expected.

Regards,

Jai Shankar

Former Member
0 Kudos

Thanks for replies.

Let's discuss the standard pattern available under SAP BABIS

I am testing the same integration process (BpmPatternCollectMultiIf )as it is. You all can view that under namespace http://sap.com/xi/XI/System/Patterns.

In this case there are 3 interfaces but using same message type. While testing if I send 3 messages then all messages don't go for one fork but for each message new instance of BPM is triggered.

Later I have modified this pattern to configure with 3 different message types and while testing if I send 3 messages matching to 3 message types configured still 3 FORK instances are created with one step completed and other 2 in ready state.

My problem is I understood well fork functionality but while testing it is not giving correct results.

I have tested other patterns and working fine except fork.

Former Member
0 Kudos

Rujuta,

A fork step is used for parallel processing of a(<b>single</b>) message in N number of branches. For example, if you design a fork with 4 branches, each branch receives a copy of the msg(remember it is always single) and then the steps in each branch is carried out.

The fork step completes on union of all the branches or when the end condition specified in the step is reached.

In your case, if you are going to send 3 msgs, then each msg will create a new instance. The first msg will be copied and sent through all the branches in the fork. Since only one branch has the correct msg type it will get executed, the others will not execute.

Hope it clarifies...

Regards,

Jai Shankar

Former Member
0 Kudos

Hi,

If you need all of your branches in fork to execute then you should set the 'necessary branches' property of fork to the number of branches present.

This way the fork will end only when all your branches finishes executing.

So if you use 2 different interfaces you need to give both type if msgs as input. This will make both of your branches to execute.

Regards,

P.Venkat

Message was edited by:

Venkataramanan

Former Member
0 Kudos

Hi,

As you have specified:

<i>2) Simple process using fork - two branches using different inetrfaces (having different message types)</i>

Both the branches are using 2 different interfaces.

So, whichever interface matches the message that enters the fork, that branch gets executed.

Say for example, you have 3 branches in the fork, with 3 different MInterfaces specified. Say MI1,MI2 and MI3. Say, there is a message coming in to the BPM which corresponds to MI3.

So, when the message comes into the BPM, when it reaches the fork step, 3 copies of the message is made, so that the message passes into each of these 3 branches.

The first branch nor the second accept a message of type MI3, hence they donot do anything with the incoming message, and remain in status ready;while branch 3 accepts message of type MI3 and hence goes ahead with the processing.

Regards,

Smitha.

Former Member
0 Kudos

Hi,

Check if there is any end condition specified in fork.