Skip to Content

While configuring my scenarios, I encountered different properties of Business Process engine, of which one is Delivery mode. I came across much theoretical material however the practical behavior of BPM is not explained in any of those. I was very eager to know how it practically behaves hence I configured this scenario. I have made an attempt to explain the impact of delivery mode taking a very basic scenario; I hope it helps to get a clearer picture of the delivery process.

 

Business Process Engine supports three delivery modes:

 

1) Without Buffering.

2) Buffering Possible.

3) Without Buffering (Obsolete).

 

Third mode is not recommended, as it is available for the purpose of compatibility.

 

In this blog we will discuss the behavior of business process engine with respect to delivery modes.

 

I have configured a basic scenario in which two files are placed on an ftp. They are picked by file adapter and merged by a mapping in BPM. The merged file is placed on the ftp.

 

BPM design:

 

1)       First Receive step: abstract asynchronous interface used to receive a file

2)       Wait step: To introduce time lag between the two receive steps.

3)       Second Receive step: abstract asynchronous interface used to receive another file.

4)       Transformation step: To merge both the files.

5)       Send step: To send the merged file to an Ftp.

image 

 

Consider First Case Delivery Mode

 

Case 1: Buffering Possible.

 

   Step 1:  Go to transaction SWF_INB_CONF. Select your business process. In the Configuration area set the delivery mode to Buffering possible.

    The default value is buffering possible.

 

 

 

  image

 

Step 2 . Place the files into the folders of FTP for which you configured your scenarios

Step 3    Go to transaction SXI_MONITOR and check the status of BPM.

 

It will be successfully executed 🙂

 

When we place both the files on FTP, the file adapter picks them. A process instance is generated for the BPM. First receive step is encountered and the first file is received by it.

Reason for successful execution of BPM is, as there is a wait step before the second receive step, it is not encountered hence there is no open receive step available for the second file. However, as we have set the delivery mode to Buffering possible, second file gets buffered and is later delivered to the second receive step when it is encountered.

 

 image

 

Consider Second case delivery mode

 

Case 2: Without Buffering.

 

Step 1: Go to transaction SWF_INB_CONF. Select your business process. In the Configuration area set the delivery mode to Without Buffering.

 

image

 

Step 2. Place the files into the folders of FTP for which you configured your scenarios

Step 3 Go to transaction SXI_MONITOR and check the status of BPM.

This time BPM will not be successfully executed.

image

Click on the queue of the second message. The status of the queue displays SYSFAIL.

image

 

Double click on the status, we get a detailed message: Permanent error in BPE inbound processing.

image

 

 

The reason for this behavior is when we place the files in the respective folders both the files are picked up by the file adapter. Process instance is generated for BPM. First receive step is encountered and the file is received by it. But due to the wait step the second receive step is not open and hence the second file cannot be delivered to it. Unlike the first case, in this case as the buffering is deactivated the file is not buffered and hence the inbound processing of BPM fails for the second receive step.

 

There are many other scenarios in which you come across this behavior of BPM.

 

For e.g. when we have a receive step followed by a transformation step (wait step, send step, receiver determination step, control step throwing alert) inside a loop. In this case also buffering is mandatory as the receive step will not be open all the time.

 In this case you can avoid buffering by placing other steps outside the loop and allowing the receive step to be consistently open.

 

Benefits of Without Buffering.

 

It is generally recommended to set the delivery mode to without buffering as it increases the processing performance and it also provides a robust handover of messages to a running process instance. However,  in this case designer of BPM should design it in such a way that SYSFAIL is avoided. Without Buffering should be used only in those cases where we have Receive step that is consistently open.

 

References: http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c00d9465-ea97-2910-deac-f8aa681eef35

To report this post you need to login first.

4 Comments

You must be Logged on to comment or reply to a post.

  1. Paul Medaille
    Great blog, Milan –

    By giving a concrete example of this topic I think you make it much easier for people to understand.  good job!

    (0) 
    1. Bhavesh Kantilal
      Hello Milan
      As mentioned by Paul, a excellent description of this phenomenon.

      Maybe you can also think of a practical way of explaining the transactional behavior of a BPM.

      Regards,
      Bhavesh

      (0) 

Leave a Reply