Level: Intermediate Randolph (Randy) Williams (rpwillia@ca.ibm.com), Business Analyst, WebSphere Business Modeler/Monitor Development,
IBM
18 Apr 2007
Many business processes include the concept of batch processing business items because it can improve the performance and efficiency of a process. To understand the implications of batch processes on your process, you must first know how to model them in WebSphere® Business Modeler. This article shows you how to create batching constructs in WebSphere Business Modeler (hereafter called Modeler) so that you can simulate and evaluate batch processing implications on the processes you develop. It provides four batching patterns that you can use to extend your process models. This article does not address issues of batch size optimization or lead time implications.
Introduction
Batching is normally done in two ways, by:
- Quantity of Items (QoI)
- Quantity of Time (QoT).
If you think about a billing scenario; a company typically sends out their invoices at the end of each month. This type of batching is based on quantity of time, where all invoices to date are collected, created and sent at a point in time. The number of invoices may vary, but the time is predetermined.
Another example is a student enrollment scenario: an admissions clerk processes the enrollment forms only after receiving a certain number of forms. This type of batching is based on quantity of items, where a predetermined set of enrollment forms is collected before they are processed. The number of enrollment forms is predetermined, but the time to start processing may vary.
In addition, batching processes can involve processing all batched items as an entity or each individual item contained within the batch. If each item in the batch is to be processed individually, then you need to us a de-batching mechanism.
(sidebar)Batching and token bundles in Modeler are very different concepts. Batching is a process concept while Token bundle is a simulation construct used to control when and how many tokens get generated. Specifying Token bundles is not covered in this article.(endsidebar)
For simplicity, the following examples do not include resource specifications or associations. However, resources are an important aspect of any process model and will have implications for any process, including batch processes. You should include them in your process models.
In Modeler, batching constructs may include the multiplicity (Min/Max) settings on the inputs and outputs of the activity, repositories and timers. The following examples illustrate the use of these constructs in creating a batch process.
Quantity of item batching and de-batching
The first pattern, in Figure 1, describes creating a quantity of item batch process, and processing the batch as an entity. Figure 2 shows the Modeler sample project tree for this model.
Figure 1. The QoI Batching pattern
This pattern is used to model a process that creates batches of
Business items of set quantity that are then processed as a whole instead of individually. In this example, when running simulation, the number of process tokens must be 10 or a multiple of 10.
The Input and Output multiplicity for the QoI Batching process is set to Min-10/Max-10 and Min-1/Max-1 respectively.
In this sample, a Business item Batch contains 10 Business items.
The Input and Output multiplicity for the Batch Business Items task is set to Min-10/Max-10 and Min-1/Max-1 respectively.
The Input and Output multiplicity for the Process Business Item Batch task is set to Min-1/Max-1.
Figure 2. Sample Project Tree
We created the Business item and Business item Batch as separate items in the Business Items catalog along with their respective Global Repositories (The intent is to represent a Business item Batch as an entity that contains multiple Business items).
The input multiplicity on both the Batch Business Items task and the QoI Batching process are the same. The output multiplicity on both the Process Business Item Batch task and the QoI Batching process are the same. These correlations are required to ensure successful simulation (You can only set the multiplicity on the inputs/outputs et at modeling time. Changing the multiplicity in the simulation model is not supported).
Because of the multiplicity setting, the number of tokens for simulation should be a multiple of the multiplicity value (e.g. if the multiplicity is 10, the number of tokens should be 10, 20 or 30 etc.) The simulation will ignore tokens that are not part of the multiple (i.e. if Input min/max is 10/10 and you set Token creation to 38, the last eight tokens will be ignored by simulation).
The next pattern shown in Figure 3 is an extension of the previous pattern, and describes creating a quantity of item batch and then processing each item contained within the batch individually.
Figure 3. The QoI de-batching pattern
This pattern is used to model a process that de-batches a batch of Business items of set quantity that are then processed individually instead of a whole.
This pattern includes the Batching pattern which is used to first create the batch.
In this example, when running Simulation, the number of Process tokens must be 10 or a multiple of 10. The Input and Output multiplicity for the QoI De-Batching process is set to Min-10/Max-10.
In this sample, a Business item Batch contains 10 Business items.
The Input and Output multiplicity for the Batch Business Item task is set to Min-10/Max-10 and Min-1/Max-1 respectively.
The Input and Output multiplicity for the Process Business Item Batch task is set to Min-1/Max-1. The Input and Output multiplicity for the De-Batch Business Item Batch task is set to Min-1/Max-1 and Min-10/Max-10 respectively. The Input and Output multiplicity for the Process Business Item task is set to Min-10/Max-10.
The output multiplicity on the QoI De-Batching process now correlates to the output multiplicity of the Process Business Items task. This correlation is required to ensure simulation consistency.
The output multiplicity on the De-Batch Business Item Batch task should correlate to the multiplicity of the Business Item Batch. This correlation is required to ensure simulation consistency.
Quantity of time de-batching and batching
This example describes the pattern for creating a quantity of time batch and then processing each item contained within the batch individually at a specified point in time.
Figure 4. The QoT De-batching pattern
This pattern is used to model a process that creates/stores a batch of undetermined quantity of Business items which are then processed individually, beginning at a set time. The Input and Output multiplicity for the QoT De-Batching process is set to Min-1/Max-1.
The Timer is set to trigger the processing of the Business items.
In this example the Timer is set to trigger every hour using a predefined timetable.
The Global Repository stores the Business Items until they are ready for processing. Capacity is set to 'unlimited' and 'The items are unique'
The Input and Output multiplicity for the Process Business Items ask is set to Min-1/Max-1. The Repository Input is set to 'Read and remove' and to 'Read from the beginning'.
We used a Global Repository to store the Business items and a Timer to trigger the processing of these business items.
The Timer Setting reflects the timing requirements. In this example, we process all the Business items collected every hour. We created a Timetable with a Repetition period of an hour starting at midnight, and the Time interval also has a Start time of midnight with zero second Duration. Figure 5 shows the timetable specification.
Figure 5. The Every hour timetable specification
To model a Quantity of Time batch that processes the batch as an entity requires a variation of the previous example to include multiplicity as the mechanism for defining the quantity of the batch, as Figure 6 shows:
Figure 6. The QoT Batching pattern
This pattern is used to model a process that creates batches of Business items of set quantity, that are then processed as a whole instead of individually, beginning at a set time. In this example, when running Simulation, the number of Process tokens must be 5 or a multiple of 5. The Input and Output multiplicity for the QoT Batching process is set to Min-5/Max-5 and Min-1/Max-1 respectively.
In this sample, a Business item Batch contains 5 Business items. The Input and Output multiplicity for the Batch/Store Business Items task is set to Min-5/Max-5 and Min-1/Max-1 respectively.
The Repository Output is set to 'Overwrite ' and to 'Insert at the end'.
The Timer is set to trigger the processing of the Business items. In this example the Timer is set to trigger every hour using a predefined timetable.
The Global Repository stores the Business Item Batches until they are ready for processing. Capacity is set to 'unlimited' and 'The items are unique'
The Input and Output multiplicity for the Process Business Item Batches task is set to Min-1/Max-1. The Repository Input is set to 'Read and remove' and to 'Read from the beginning'.
The items being stored to the Repository are now represented as a Business Item Batch.
When using Repositories, it is important to define the Repository input and output specifications of the Source and Target activities so that the proper queue method is used. In this sample the Business Item Batch is inserted at the end of the repository file and is read and removed from the beginning of the file. This supports a first-in first-out queue method.
Conclusion
This article defined four patterns for correctly modeling batch processes in WebSphere Business Modeler. Using these Modeler batching constructs in your batch process models will help you to create and analyze processes that reflect real world business constructs. I’ve also provided a downloadable copy of my Modeler Batch Process Patterns project file, which you can import into WebSphere Business Modeler v6.0.2 to use as a reference.
Download | Description | Name | Size | Download method |
|---|
| Modeler project | batch_process_patterns.zip | 127KB | FTP | HTTP |
|---|
Resources Learn
Get products and technologies
About the author  | 
|  | Randy Williams is a business analyst at the IBM Toronto Lab in Markham, Ontario Canada. He works with the WebSphere Business Modeler/Monitor development team and provides consultation and guidance on tool functionality. |
Rate this page
|