Enabling Batch Processing in BPMN Processes


Business process automation improves organizations’ efficiency to perform work. The single executions of process models, called process instances, are usually executed independently in business process management systems (BPMS). In practice, we can observe examples in which the synchronized execution of groups of instances for certain activities, called batch processing, can lead to an improved process performance. For example, online retailers can pack and ship several orders of the same customer to save shipment costs. Batch regions is a concept to allow batch processing in business processes.This demo presents the implementation of the batch region concept in an open-source BPMN engine. It shows how, with a few extensions only, batch processing is enabled in a BPMS and how the consolidated view of several work items in one user form, leads to an improved work efficiency for task performers.


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


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 costs 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