Enabling Batch Processing in BPMN Processes

1. Vision

Business process automation improves organizations’ efficiency to perform work. Therefore, a business process is first documented as a process model which then serves as blueprint for a number of process instances representing the execution of specific business cases. In existing business process management systems, process instances run independently from each other. However, in practice, instances are also collected in groups at certain process activities for a combined execution to improve the process performance. Currently, this so-called batch processing is executed manually or supported by external software.

Our work addresses the described issues by providing a basic concept, called batch activity. It allows an explicit representation of batch processing configurations in process models and provides a corresponding execution semantics, thereby easing automation. The batch activity groups different process instances based on their data context and can synchronize their execution over one or as well multiple process activities. The concept is conceived based on a requirements analysis considering existing literature on batch processing from different domains and industry examples.

In the following, literature references, and material for the validation and technical evaluation of the batch activity concept are provided. For its validation, the batch activity was applied to different use cases in a simulated environment. The simulation results imply cost-savings for business processes when a suitable batch configuration is used. The simulation files, the reports, and the analysis of the results can be found in Section 3.

Further, a prototypical implementation in an existing open-source BPMS shows that with a few extensions, batch processing is enabled. A screencast can be found in Section 4 and details on the implementation are given in Section 5.

2. Screencast

The screencast shows how batch processing for BPMN processes was enabled in the open-source Camunda BPM platform.

3. References to Literature

  • Pufahl, Luise; Weske, Mathias: Requirements Framework for Batch Processing in Business Processes. In Enterprise, Business-Process and Information Systems Modeling. pages 85--100, Springer, Cham, 2017.
  • Pufahl, Luise; Weske, Mathias: Batch Activities in Process Modeling and Execution. In Service-Oriented Computing. pages 283-297, Springer Berlin Heidelberg, 2013.
  • Pufahl, Luise; Meyer, Andreas; Weske, Mathias: Batch Regions: Process Instance Synchronization based on Data. In Enterprise Distributed Object Computing (EDOC). pages 150--159, IEEE, 2014.
  • Pufahl, Luise; Weske, Mathias: Batch Processing Across Multiple Business Processes Based on Object Life Cycles. In International Conference on Business Information Systems. pages 195--208, 2016.
  • Pufahl, Luise; Herzberg, Nico; Meyer, Andreas; Weske, Mathias: Flexible batch configuration in business processes based on events. In Service-Oriented Computing. pages 63--78, Springer, 2014.
  • Pufahl, Luise; Bazhenova, Ekaterina; Weske, Mathias: Evaluating the Performance of a Batch Activity in Process Models. In Business Process Management Workshops. pages 277-290, Springer International Publishing, 2014.
  • Pufahl, Luise; Weske, Mathias: Enabling Batch Processing in BPMN Processes.. In BPM (Demos). pages 28--33, 2016.

4. Validation

For the validation, two different use cases - an administrative use case and an online retailer use case - were simulated to compare their process performance regarding time and cost in the case of batching and no batching. For the simulation, an extensible BPMN process simulator was developed which supports the simulation of batch activities.

The simulation files, the simulation reports, and the analysis of the simulation results can be found in the following:

5. Implementation

For the implementation of the batch region, the Camunda BPM platform in version 7.4 was selected, a Java-based, lightweight, and open source process engine specifically tailored for a subset of BPMN.

The deployed engine with batch processing capabilities is provided together with the online retailer example process in a tomcat (Please unzip, start the tomcat, and login with demo pw: demo). The code can be found on github.

Further, the Camunda modeler bpmn.io was adapted to enable a quick design of batch regions by adding the batch-element template. More information on the concept of element template is provided here. In specifically, the sub-process element was extended as shown in the following figure.


Fig.1 Extension of the bpmn.io modeler with the batch region

With its configuration parameters (visualized in the right panel of Fig. 1), the process designer is able to specify the condition for the batch execution. Those are:
  • (1) a grouping characteristic to cluster process instances to be processed in one batch based on data attributes
  • (2) an activation rule, currently the threshold rule, to determine when a batch is activated while balancing the trade-off between waiting time and cost savings
  • (3) the maximum batch size indicating the maximum number of instances in a batch

For each user activity in a batch region, a JSON-variable called batchCluster which can be used for the user form design. For example, we can create with the following code a table with all items in the JSON variable as visualized in Fig. 2.

<form role="form" name="form">
  <script cam-script type="text/form-script">
    camForm.on('form-loaded', function() {
    camForm.on('variables-applied', function() {
//JSON variable which is a string variable has to be parsed first  
     $scope.caseList = JSON.parse(camForm.variableManager.variableValue('batchCluster'));  


  <h2>Order Overview</h2>

  <!--table heading-->
        <td>Customer Name</td>
        <td>Customer Adress</td>
        <td>Order Item</td>
   <!--table content, loop reads out the JSON variable content-->
    <tr ng-repeat="(key, value) in caseList track by $index">   
  <!--transport variable, including the 'batch' in the -->
         <div class="form-group">
      <label for="inputtransport">Logistics Provider</label>
      <div class="controls">
        <input class="form-control"
               ng-maxlength="20" />


Fig.2 User form for the Ship order activity of the online retailer example with a table visualizing all orders

Batch Processing across Process Model Boundaries based on Object Life Cycles


Batch processing is a means to synchronize the execution of multiple process instances for a predefined set of activities to improve process performance. Current batch processing concepts in business process management focus only on single process models. However, in practice, large process model repositories exist in which activities are reused in multiple process models. If these perform compatible data manipulations, corresponding process instances of multiple processes can be synchronized as well. In this work, we introduce a concept to specify batch processing parameters in centrally given object life cycles, which contain information about possible data manipulations in order to identify candidates for batch processing during run-time across multiple process models and propose them to the user. Based on the user decision, a work item batch to synchronize the instances of various process models is created. We proof applicability of this concept by implementation for an open source BPM platform.

Example Scenario

Our example organization is active in the waste management domain and operates a process model repository containing the process model with respect to the business operations. These process models are not only used for documentation purposes, they are also executed in a BPMS. Fig. 1 and Fig. 2 represent two processes of this repository which we use to illustrate our work. The processes were designed with the camunda Eclipse Plugin for creating BPMN 2.0 diagrams.

invoiceProcess.png Fig.3 Invoice Process

Fig. 3 shows the process of creating and sending an invoice to a customer either electronically or by a traditional postal service. If an Invoice is required, it first gets prepared. After preparation, an electronic invoice is directly sent as represented by the Message sent end event. In case of a non-electronic invoice, the Invoice is printed resulting in a Customer Letter that is then sent to the customer.

customerInformingProcess.png Fig.4 Customer Information Process

The Customer communication process in Fig. 4 is started when some information shall be provided to the customer. For example, a customer shall be informed that, in future, the waste container is picked-up on Tuesday instead of Monday. This process consists of a sequence of first creating the Information, then printing it resulting in a Customer Letter, and finally sending the Customer Letter to the customer.

customerLetter.png Fig.3 Object life cycle of the customer letter

From these two process models, the object life cycle given in Fig. 3 can be derived for data objects of type Customer Letter. The actions used for transitioning from one state to another directly map to activities in the corresponding process models. While process models can be created using the contained camunda modeler, the object life cycles can be created in extension of the process editor project and the generated XML can be loaded into the extended camunda engine.


The screencast visualizes the batch processing across process model boundaries based on object life cycles. It can be downloaded here (right click, save as).


For our prototypical implementation, we utilized the camunda engine in Version 7.1 to show that our approach can be implemented in a standard BPMS without direct support for data objects.

The camunda engine does not handle data nodes annotated in process models out of the box and allows access to process data through process variables only. Thus, we first extended the parser to consider annotated data nodes and their data associations. For representing object life cycle information within the engine, we extended the jBPT library with additional data state transition information, i.e. a Boolean value specifying whether it is a batch transition, a set of Strings specifying the grouping characteristic referencing process variables, and a set of connected transitions. Further, we also added a parser to retrieve the information from the object life cycles.

ChooseTask.JPG BatchActivity.JPG Fig.4 Screenshots of the extended camunda engine showing the Choose-Task and the Work Item Batch .

Second, we extended the engine itself. In the remainder of this section, we detail our implementation of user tasks. The remaining activity types can be handled similarly (see above). When a user task gets enabled, its related data state transitions are checked whether one of them is a batch transition. If yes, all currently enabled user tasks are retrieved. Based on the input and output data nodes of their related activities, it is checked which user tasks reference the same batch transition as the newly enabled one or a connected batch transition. All positively identified user tasks are pre-selected. Next, the grouping characteristic of them is checked. Therefore, the values of the given process variables in the grouping characteristic are retrieved for the current user task. These are compared to the corresponding values for the pre-selected user tasks. A matching data view adds the corresponding user task to the set of selected user tasks. If some matching user tasks were found, they are provided to the task performer in a _Choose-Tasks_-form as shown in Fig.4. A _Choose-Tasks_-form presents the just enabled user task and all selected ones. It asks for assignment to a work item batch. A work item batch is created, if one or more user tasks are selected by the user in the presented form. In such work item batch, all form variables are shown in one view and can be terminated by one click on complete task (see Fig.4).

Our implementation shows that work item batches can be created and executed and several work item batches can run in parallel. Further, it shows that if the Choose-Tasks-form is not yet executed, new user tasks can be added dynamically, and that an existing batch activity can be combined with a new user task.

The tomcat with the extended camunda engine can be downloaded here. For executing the tasks of the example scenario, a user kermit has to be created. If you are interested in the code, please contact us.


Luise Pufahl

Mathias Weske