thesis svancara

73
Masaryk University F aculty of Informatics                                                                     Extension of the iQ Workow Engine Master ’s thesis Bc. Dušan Švancara Brno, 2013

Upload: bongani-lungile-nameko

Post on 18-Oct-2015

18 views

Category:

Documents


1 download

TRANSCRIPT

  • 5/28/2018 Thesis Svancara

    1/73

    Masaryk University

    Faculty of Informatics

    Extension of the iQ Workflow

    Engine

    Masters thesis

    Bc. Duan vancara

    Brno, 2013

  • 5/28/2018 Thesis Svancara

    2/73

    Declaration

    Hereby I declare, that this paper is my original authorial work, which I have worked outby my own. All sources, references and literature used or excerpted during elaborationof this work are properly cited and listed in complete reference to the due source.

    Bc. Duan vancara

    Advisor: RNDr. Ing. Lucie Pekrkov

    ii

  • 5/28/2018 Thesis Svancara

    3/73

    Acknowledgement

    I would like to thank to RNDr. Ing. Lucie Pekrkov and colleagues at inQool, a.s.for their valuable input and encouraging words, to my girlfriend and friends for theirsupport, and, last but not least, to my family for constantly reminding me to work onthe thesis.

    iii

  • 5/28/2018 Thesis Svancara

    4/73

    Abstract

    This thesis addresses the issue of the initial steps in the business process life cycle, mainlythe simulation. For this purpose, it describes the three selected BPMN 2.0-compliantbusiness process management tools and compares their modeling and simulation fea-tures. Based on the output of the overview, an innovative simulation engine is proposed,designed and implemented. This is done by employing the characteristics of BPSim,a rather young simulation standard. In the end, the usage and capabilities are demon-strated on selected business processes.

    iv

  • 5/28/2018 Thesis Svancara

    5/73

    Keywords

    BPM, BPMN, business process management, business process model and notation, BP-Sim, process simulation, Bizagi, jBPM, Bonita

    v

  • 5/28/2018 Thesis Svancara

    6/73

    Contents

    1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Business process management . . . . . . . . . . . . . . . . . . . . . . . . . 4

    2.1 Business process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.1.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.1.2 Classification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

    2.2 Business process management . . . . . . . . . . . . . . . . . . . . . . . . . 52.2.1 BPM life cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

    2.2.2 Process development stakeholders. . . . . . . . . . . . . . . . . . . 72.2.3 Benefits of BPM . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

    2.3 BPMN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.3.1 BPMN elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

    2.4 Optimization and simulation . . . . . . . . . . . . . . . . . . . . . . . . . 112.4.1 Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.4.2 Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

    3 Business process tools overview . . . . . . . . . . . . . . . . . . . . . . . . 153.1 Bonita BPM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

    3.1.1 Modeling possibilities and ease of use . . . . . . . . . . . . . . . . 163.1.2 Palette of elements . . . . . . . . . . . . . . . . . . . . . . . . . . . 173.1.3 Import/export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173.1.4 Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

    3.2 jBPM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193.2.1 Modeling possibilities and ease of use . . . . . . . . . . . . . . . . 203.2.2 Palette of elements . . . . . . . . . . . . . . . . . . . . . . . . . . . 213.2.3 Import/export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223.2.4 Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

    3.3 Bizagi Process Modeler . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233.3.1 Modeling and ease of use . . . . . . . . . . . . . . . . . . . . . . . 243.3.2 Palette of elements . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

    3.3.3 Import/export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263.3.4 Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

    3.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283.4.1 Bonita BPM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283.4.2 jBPM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283.4.3 Bizagi Process Modeler . . . . . . . . . . . . . . . . . . . . . . . . 29

    4 Engine extension. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

    1

  • 5/28/2018 Thesis Svancara

    7/73

    4.1 iQ Workflow Engine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334.1.1 Activiti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334.1.2 What is missing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

    4.2 Solution proposal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

    4.2.1 BPSim. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344.2.2 REST service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

    4.3 Architecture and design . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364.3.1 API domain model . . . . . . . . . . . . . . . . . . . . . . . . . . . 364.3.2 REST API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374.3.3 Simulation engine API . . . . . . . . . . . . . . . . . . . . . . . . . 38

    4.4 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484.4.1 Technologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484.4.2 Key examples and features . . . . . . . . . . . . . . . . . . . . . . 50

    4.5 Simulation of selected processes . . . . . . . . . . . . . . . . . . . . . . . . 534.5.1 Manual invoice delivery . . . . . . . . . . . . . . . . . . . . . . . . 534.5.2 Loan request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

    5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65A CD content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

    2

  • 5/28/2018 Thesis Svancara

    8/73

    Chapter 1

    Introduction

    Nowadays, when the complexity of business operations grows beyond the boundaries ofsustainability, the companies need a structured collection of procedures and practicesthat help to maintain the complexity on a tolerable level. This is a job for the businessprocess management (BPM). BPM manages the life cycle of processes from their concep-tion to their death through design, modeling, execution, monitoring and optimization.The initial phases are accompanied by the immaturity and insufficiency of input datawhich causes the uncertainties and increases the process risks. Simulation is a powerfultool for eliminating these weaknesses and brings an overview on the process behavior.

    The first chapter of the thesis introduces the business process management, classifi-cation of processes and their life cycle. Next it deals with the usual actors in the processdevelopment, states the benefits of BPM and presents the standard notation for busi-ness process modeling Business Process Model and Notation (BPMN), specifically theBPMN 2.0. The chapter ends with the description of optimization and simulation.

    Business process tools are a crucial part of the BPM. The modeling and simulationcapabilities of three selected tools Bonita BPM Studio, jBPM and Bizagi ProcessModeler were reviewed in the second chapter. This includes their licensing, ease of use,

    palette of elements, BPMN 2.0 compliance, import, export and simulation process andsettings. The side-by-side comparison of these tools concludes the chapter.The beginning of the third chapter is dedicated to the iQ Workflow Engine a work-

    flow engine used and developed in inQool, a.s. which is the target for an extension,an innovative simulation engine. The extension solution is proposed in the next few sec-tions with the architecture and design description. Used technologies and few selectedimplementation details and features are dealt with in the middle part. Next, the enginepresents its capabilities on the chosen processes and a brief comparison of the resultsproduced by our engine and the tools from the review ends the chapter.

    Last but not least, the conclusion summarizes the work done on this thesis with thefuture prospects of the engine.

    3

  • 5/28/2018 Thesis Svancara

    9/73

    Chapter 2

    Business process management

    Everyday we face a challenge of planning and organizing events, holidays, free time ac-tivities and so forth. Similarly, companies and organizations around the world requireprecise management and systematic process of defining their goals and ways to achievethem. Both these challenges could be described as processes with definitive set of repet-itive tasks and transitions between them. Level of repetition is a good indicator whetherthe process should be studied, modeled and optimized. Business process management(BPM) provides us with best practices and set of tools for doing just that.

    2.1 Business process

    What exactly is business process management? In the not-so-many decades of its exis-tence, there has not been given a unified definition of the term. In order to understandBPM, we should start with a business process definition.

    2.1.1 Definition

    According to Hammer and Champy[1], a business process is

    a collection of activities that takes one or more kinds of input and

    creates an output that is of value to the customer; a business process

    has a goal and is affected by events occurring in the external world or

    in other processes

    Johansson[2] defined a business process as

    a set of linked activities that take an input and transform it to create

    an output. Ideally, the transformation that occurs in the process should

    add value to the input and create an output that is more useful and

    effective to the recipient either upstream or downstream.

    Another definition was coined by Davenport[3]and it says that a business process is

    a structured, measured set of activities designed to produce a specified

    output for a particular customer or market. It implies a strong empha-

    sis on how work is done within an organization, in contrast to a product

    focuss emphasis on what. A process is thus a specific ordering of work

    4

  • 5/28/2018 Thesis Svancara

    10/73

    2. Business process management

    activities across time and place, with a beginning, an end, and clearly

    identified inputs and outputs: a structure for action.

    It can be seen that there are some minor differences, but they agree on these points

    about a business process: it consists of a set of activities having a specified order, a beginning and an end

    it transforms an input to a value-adding output, both being clearly identified

    Moreover, for a process to be applicable, it should be reproducible and use resources. Tosum it up, a business process can be defined as an ordered set of activities with a begin-ning and an end, that transforms specified input into value-adding output reproduciblywith the use of resources.

    2.1.2 Classification

    Imagine a typical car factory. Its main goal is to produce and sell cars. However, thiswould not be possible if there were no transportation and supplier services, accounting,etc. It is obvious that they form an integral part of the factorys business process, buttheir role is different. We can divide processes into three basic categories according totheir role in the business strategy[4]:

    primary processes the business is built around them and they produce valu-able output desired by external customer (e.g. car factory produces cars)

    secondary processes they provide additional activities by processing sec-ondary output from primary processes (e.g. car company resells engines to other

    companies)

    supporting processes other processes depend on them (e.g. accounting)

    2.2 Business process management

    Now when we know what exactly a business process is, BPM can be understood moreeasily. According to Gartner Research[5]:

    Business process management (BPM) is a process-oriented manage-

    ment discipline. It is not a technology.

    This definition from jBPM5 Developer Guide[6]goes into more detail and says that:

    BPM is an iterative discipline that defines multiple stages that are

    executed in repeated cycles, which provides us a path of continuous

    business process improvements. BPM can also be seen as a set of best

    practices with a lot of focus on improving the way the company does

    its job.

    5

  • 5/28/2018 Thesis Svancara

    11/73

    2. Business process management

    Let us add another definition by van der Aalst et al. [7], who describe BPM as:

    Supporting business processes using methods, techniques, and software

    to design, enact, control, and analyze operational processes involving

    humans, organizations, applications, documents and other sources ofinformation.

    Those are three very different views on BPM. From the managements point of view, ithelps us to improve processes continuously and to promote efficiency and effectiveness.But technical aspect is what interests us more. From this point of view, BPMs goal isto manage life cycle of the process.

    2.2.1 BPM life cycle

    Figure 2.1: Business process management life cycle[8].

    In order to create a fully functional and usable business process, it has to go throughseveral stages of development. The life cycle consists of five stages[9]as shown in figure2.1:

    Design the first step in the cycle. It is crucial to identify what is the main goaland what is important for the customer. Possible organization changes should bediscussed. These activities are based on appropriate collected data and detailedanalysis of the company. Key performance indicators are stated.

    Modeling the business process is fully specified and validated, analysis istransformed into formalized graphical and textual models. Modeling tools areused, models are comprehensible for common consumer but still embracing anddetailed for experts in the field.

    6

  • 5/28/2018 Thesis Svancara

    12/73

    2. Business process management

    Execution the process is implemented, tested and deployed, often using a busi-ness process management system (BPMS). Process definition language is usedfor implementation.

    Monitoring the process is being monitored. Shortcomings and drawbacks arebeing identified based on key performance indicators evaluation.

    Optimization monitoring phase results are interpreted and new businessneeds are taken into account. The requirements are incorporated into the op-timized analysis. After the phase is done, the cycle continues with the first step.

    2.2.2 Process development stakeholders

    Life cycle of the process is managed by a group of people and every step requires a special-

    ist in the field. Following roles are needed in order to develop high-quality solution withas little shortcomings as possible: process analyst, process architect, process developerand process owner.

    2.2.2.1 Process analyst

    An analyst should be able to create minimal yet operational process model. Thereforehe needs to understand business quite well. He is required to document the process indetails, collaborate with other stakeholders and model high-level process definition.

    2.2.2.2 Process architectAn architect needs to be process definition language expert, at least from the businesspoint of view. He should be detail oriented and understand business as well. He is re-sponsible for ensuring high fidelity of the process, making implementation choices andprocess models analysis.

    2.2.2.3 Process developer

    Skills involve high technical knowledge of process definition language, web services, XMLand enterprise applications. Developer is required to implement processes, user interfaces

    and empower the analysts.

    2.2.2.4 Process owner

    The owner of the process is responsible for the process as a whole and defines processmetrics which are important for the evaluation. He is responsible for process analysis,performance and business alignment.

    7

  • 5/28/2018 Thesis Svancara

    13/73

    2. Business process management

    2.2.3 Benefits of BPM

    Formal definition of processes, graphical models and thorough analysis can bring detailedinsight into how the process works. Usually there is a large potential in identification ofpreviously unknown problems, bottlenecks and even improvements. The most noticeablebenefits are as follows[10]:

    increased visibility and knowledge of companys activities,

    increased ability to identify bottlenecks,

    increased identification of potential areas of optimization,

    reduced lead-times,

    better definition of roles and duties in company,

    good tool for fraud prevention, auditing, and assessment of regulation compli-ance.

    Adoption of BPM introduces well-documented activities into operation that promotesworkflow and prevents a total collapse of the business.

    2.3 BPMN

    Phases of the business process life cycle incorporated process definition language andbusiness process model. There have been attempts to standardize unified notation forbusiness process definition. Some more successful than others1.One of the most successful

    efforts is the creation of the BPMN Business Process Model and Notation.BPMN was developed by the Business Process Management Initiative (BPMI) in

    2004. BPMI later that year merged with Object Management Group (OGM) and theycontinued developing BPMN to provide a notation that is readily understandable by allbusiness users, from the business analysts that create the initial drafts of the processes,to the technical developers responsible for implementing the technology that will performthose processes, and finally, to the business people who will manage and monitor thoseprocesses[11]. In January 2011, official specification of BPMN 2.0 was released and itbecame what we now know as BPMN.

    2.3.1 BPMN elements

    The notation consists of a great number of constructs, it is therefore important to dividethem into different groups of modeling detail. Shapiro, in his presentation on updates inBPMN[12], stated four classes of constructs (see fig.2.2):

    1. Another well-known industry standard is Web Services Business Process Execution Language (WS-BPEL) https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=wsbpel

    8

    https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=wsbpelhttps://www.oasis-open.org/committees/tc_home.php?wg_abbrev=wsbpel
  • 5/28/2018 Thesis Svancara

    14/73

    2. Business process management

    Simple elements that can be used to create simple models with start and endevents, sequence flows, tasks, sub-processes and gateways. A common usage ofthe class is process capture.

    Descriptive adds more refined elements, such as message start event, textannotation, association. . . Class extends previous one and adds details to theprocess capture, e.g. extends routing logic or adds information about resource orrole requirements.

    DODAF an architecture framework of the United States Department of De-fense, elements for enterprise architecture based on design primitives and pat-terns.

    Complete all-encompassing class of elements.

    Figure 2.2: BPMN categories according to Shapiro[12].

    Only the first two classes are interesting for us and sufficient for our purposes. BPMNdefines four basic categories2 of graphical elements flow objects, connecting objects,

    swimlanes and artifacts.

    2.3.1.1 Flow objects

    This category is formed by a small group of key elements:

    2. Classes form cross-section of categories elements from one category can be in any class.

    9

  • 5/28/2018 Thesis Svancara

    15/73

    2. Business process management

    Eventis represented by a circle. An event occurs when something happenedand influences the flow of the business process. There are three types of eventsbased on the relationship with the process: start event, intermediate event andend event.

    Activity is represented by a rectangle with rounded corners. An activity sym-bolizes some work unit, that must be done in order for process to continue. Thereare two types of activities task and sub-process. The symbols are similar, exceptthat sub-process contains plus mark in the middle of the rectangle.

    Gatewayis represented by a diamond shape with an internal symbol. The sym-bol indicates type of the gateway, either converging, or diverging. Gatewayscontrol interaction among flows within a process.

    2.3.1.2 Connecting objects

    Flow objects within a process must are connected together to represent orchestration ofthe process definition. This is ensured by the connecting objects:

    Sequence flowis represented by a full arrow. It connects activities, gatewaysand events within one pool. Obviously, the orientation of the arrow is given bythe direction of the flow.

    Message flowis represented by a dashed arrow. It is used to send a message ora signal from one pool to another.

    Association is represented by a dotted arrow. It is used to connect an objectwith an additional piece of information (artifact, data or text).

    2.3.1.3 Swimlanes

    Swimlanes are used for grouping purposes. Flow objects grouped together may be asso-ciated with a specific role in an organization or represent entire building that is involvedin the process. . . There are two types of flow objects:

    Pool is represented by a rectangle with a label aligned to the left if spreadhorizontally or to the top if spread vertically. It usually indicates borders of theprocess all the objects from one process are placed inside the pool.

    Lane is represented similarly to the pool and must be placed inside the pool.The lane often groups together objects that have been assigned the same owner,role, etc.

    2.3.1.4 Artifacts

    BPMN was created with the flexibility in mind. Additional information, details andextensions are represented by the artifacts:

    10

  • 5/28/2018 Thesis Svancara

    16/73

    2. Business process management

    Figure 2.3: Sample of a BPMN diagram.

    Data objectis represented by a pictogram of a single sheet of paper. It is usedto designate that certain data are used or produced by an activity.

    Group is represented by a rectangle with rounded corners that is drawn witha dashed line. It provides a visual mechanism to group diagram elements infor-mally.

    Text annotationis represented by an open rectangle with solid line. It is usedto provide additional information to the connected element.

    2.4 Optimization and simulation

    Every business process costs money, human resources or time. These are crucial elementsthat can break a seamless business operation when in shortage. Therefore every man-ager must strive for the best process definition possible and optimal employment of theresources. Optimization plays a significant role in this case.

    2.4.1 Optimization

    Optimization is one of the main five parts that make up business process life cycle. Itis the last segment of the cycle, but on the other hand, it greatly influences the process

    11

  • 5/28/2018 Thesis Svancara

    17/73

    2. Business process management

    design and modeling. There are several kinds of optimization based on the amount ofimpact it has on the process structure and on the continuity of the process performanceimprovement.

    2.4.1.1 Continuous process improvementAs can be seen from the name, continuous process improvement (CPI) is a technique thatimproves the process performance continuously. It does not interfere with the processstructure and achieves its goal by redefining used and adding new resources. Picturea loan application process. The applicant must first manually fill out a complicated formand send it to the validation unit. If successful, there is no delay and application proceedsforward in the process. But in many cases, the form contains some discrepancies andmust be returned to the applicant. This can be solved at least partially by introducinginformation system to the process. Validation of the form is instant and the applicantcan see his mistakes immediately so that the amount of wrong form submissions drops

    significantly.

    2.4.1.2 Business process reengineering

    Business process reengineering (BPR) stands for a technique that is process-invasive,that means the process structure is changed. Boundaries of the process stay the same,but the arrangement and definition of the activities inside the process changes. Definitiongiven by Hammer and Champy[1]says, that BPR is

    the fundamental rethinking and radical redesign of business processes

    to achieve dramatic improvements in critical contemporary modern

    measures of performance, such as cost, quality, service, and speed.

    For example, a loan application validator becomes responsible for rejecting the loan ifsome conditions have not been met. This change saves time for approval committee andan invalid loan application does not go through the activities pointlessly.

    2.4.1.3 Business process redesign

    Business process redesign (BPRD) is similar to BPR in terms of continuity of improve-ment. They both introduce step changes in the performance. However, BPRD operateson the top level of the process structure, changing boundaries and arrangement of theprocesses themselves. In the context of the loan application process, BPRD may intro-duce direct connection between the process and loan approval process, for example, theloan can be automatically approved when the applicant is a spouse-less woman with twochildren and mortgage.

    2.4.2 Simulation

    CPI, BPR and BPRD change the process or processes locally and bring performanceimprovements in some places. But they disrupt the balance of the process structure and

    12

  • 5/28/2018 Thesis Svancara

    18/73

    2. Business process management

    the total value added by their usage does not have to be always positive. To protect theoverall health of the process, a technique is needed to comprise the process performancein general. Such a mechanism is brought by simulation.

    Business process simulation (BPS) embodies the concept that a process consists

    of discrete events that are interconnected and their occurrence depends on resourceavailability, probability distribution and defined quantities.

    2.4.2.1 How simulation works

    BPS may be executed when a process model is complete. The simulation needs a couple ofadditional attributes, like resource availability (accountants work time is between eightoclock in the morning and four oclock in the afternoon), resource quantity (we havetwo such accountants), typical activity duration, maximum activity duration. . . Whenthere are exclusive gateways, the probability of each branch or the conditional expressionshould be defined, so that the simulator knows what path to choose. Number of individual

    process executions is also important as it eliminates common variation errors in numbers.The simulation may be accompanied by an animation which helps visualize the pro-

    cess. Also real-time graphs can be generated in order to show key performance indicatorsduring the simulation run. These include spread of different characteristics related tocosts or resource usage over time.

    As a result, the simulation outputs various statistical data, performance measures,that can be further analyzed and compared. Then a useful and correct conclusion canbe drawn. The simulation does not ensure that the business process is optimized, but itgives us a tool to find strengths and weaknesses in our model.

    2.4.2.2 Simulation modelFrom a technical point of view, business process simulation is a complex process andrequires a specific attention. Tumay proposed a model[13]that simplifies the view of thesimulation. The model consists of four basic building blocks (see fig. 2.4):

    Entities flow objects, tokens or transitions, these are the objects that areprocessed by resources. They may have also attributes. Examples are products,documents and applications.

    Resources they are the units that add value to entities. For example servicerepresentatives, surgery tools and transportation vehicles are resources.

    Activities they are linked by connectors to represent the flow of the entitiesthrough the simulation model. Examples are branching, assembly, split, join, etc.

    Connectors connectors are used for linking processes and activities. They arehelpful for defining parallel flows and rework situations based on deterministic,probabilistic, or conditional decision rules.

    13

  • 5/28/2018 Thesis Svancara

    19/73

    2. Business process management

    Figure 2.4: Building blocks of a simulation model[13].

    14

  • 5/28/2018 Thesis Svancara

    20/73

    Chapter 3

    Business process tools overview

    Business process management is a tremendously growing field and new BPM suites areemerging at a high rate. There is plenty of available suites and tools for business analysts,most of them are commercial, some are free and some are even open-sourced. Free andopen-source BPMN 2.0-compliant BPM tools were chosen for comparison as they arenot only feature-rich and sufficient for common use, but they can compete with the

    proprietary solutions backed by large companies.We selected the following three suites, based on their popularity, ease of use andrange of features: Bonita BPM Studio, jBPM and Bizagi Process Modeler. The first twoare open-source solutions and the third is free as long as you need the modeler only.

    Following text presents several views on the chosen BPM platforms. The main focusis on the simulation capabilities, but other aspects, that directly or indirectly influencesimulation options, are taken into account as well. These aspects involve modeling possi-bilities and ease of use, palette of supported BPMN elements and export/import options.The comparison is a basic stone for the development and extension of the current processengine used by inQool.

    3.1 Bonita BPM

    Bonita BPM is developed by Bonitasoft company founded in 2001 by Miguel ValdsFaura. The companys aim is to provide competitive alternative to existing commercialsolutions. Their success was confirmed in 2011 when number of downloads surpassed1 million and number of paying customers reached 250.

    Even though the suite is free of charge and the source code is available online underthe GPLv2 license, Bonitasoft offers different levels of paid subscriptions. They provideadditional features such as SQL wizard, documentation generation, engine performanceoptimization, LDAP synchronization and so on. The suite is available for all the major

    platforms (MS Windows, Linux, Mac OS) and architectures (32-bit, 64-bit).Bonita BPM comprises three solutions: Bonita BPM Studio for graphical process

    design, Bonita BPM Portal for task management and process monitoring and BonitaBPM Engine, which serves as a workflow engine and integration tool. Together theycreate complex system for the whole business process life cycle. From the simulationpoint of view, only BPM Studio is relevant and reviewed. The version of the BPMStudio used is 6.0.3.

    15

  • 5/28/2018 Thesis Svancara

    21/73

    3. Business process tools overview

    Figure 3.1: Bonita BPM Studio screenshot.

    3.1.1 Modeling possibilities and ease of use

    BPM Studio is an Eclipse-based1 desktop application with user interface intuitive enougheven for the people unfamiliar with the Eclipse platform. The main window is in the basicconfiguration divided into 4 views: modeling canvas in the top right corner being thelargest, palette of elements on the left, tree view/overview in the bottom left corner and

    properties tabs in the bottom right corner. User composes the diagram by dragging theelements of choice from the palette and dropping them onto the canvas or by selectingthem in the palette and clicking on the desired spot in the canvas. The latter inducesthe impression of sluggishness, the rendering seems quite slow. It may be caused by theeditor trying to help the user align the elements, but the visual guidelines (which wouldback up the assumption) appear only after a while. When there is at least one elementin the diagram, it can serve as a starting point for the further expansion. This is allowedby the presence of additional markers right next to the selected element. They representall possible kinds of elements that can be added to the diagram with the input transitiongoing from the source element.

    Graphical representation of elements conforms to the BPMN diagram specificationand selected colors are quite intuitive.Overall the modeling could be a painful experience, especially when refactoring and

    moving elements around too much. On the other hand, it is very intuitive and simplewhen the users know exactly what they want.

    1. Eclipse is a Java-based IDE and also a platform that provides basic infrastructure and buildingblocks for developing general purpose applications (seehttp://wiki.eclipse.org/Platform).

    16

    http://wiki.eclipse.org/Platformhttp://wiki.eclipse.org/Platform
  • 5/28/2018 Thesis Svancara

    22/73

    3. Business process tools overview

    3.1.2 Palette of elements

    The palette is simple and comprehensible, but does not fully support the descriptive (see2.3.1) model. Supported flow objects are:

    tasks human, script, abstract, receive, send, service and call activity

    sub-processes event sub-process

    gateways exclusive, parallel, inclusive

    events

    start: event (basic), signal, message, error, timer

    end: event (basic), signal, message, error, timer

    intermediate: event (basic), timer, throw message, catch message, throw

    signal, catch signal, catch error, throw link, catch link, non-interruptingboundary timer event

    As can be seen, the flow objects are quite complete and do not lack any common element.On the other hand, connecting objects palette is incomplete as it does not contain

    message flow and thus it consists only of the sequence flow and association. This isa great limitation such that diagrams created in Bonita BPM Studio do not visuallycapture the connection between message events from different pools.

    Number of supported artifact types is also quite low: the palette contains only textannotation. Data object and group artifact are not included.

    Modeler supports both swimlane and pool so the elements can be logically (and

    visually) grouped.

    3.1.3 Import/export

    Bonita uses its own format for storing diagrams and process properties. It is an XMI2

    compatible XML document that contains process definition, connectors, data and sim-ulation properties, layout information etc.

    3.1.3.1 Import

    When importing a process definition, the user is offered several input formats:

    Bonita 6.x processes designed with Bonita Studio of version 6 and higher Bonita BAR 5.9/5.10 processes designed with Bonita Studio 5.9 or 5.10

    BPMN 2.0 processes defined in BPMN 2.0

    2. XMI XML Metadata Interchange, standard proposed by OMG for exchanging metadata infor-mation

    17

  • 5/28/2018 Thesis Svancara

    23/73

    3. Business process tools overview

    XPDL 1.0 processes defined in XPDL (compatible with Bonita 4)

    jBPM 3.2 processes designed in jBPM 3.2

    The most important is the possibility to import BPMN definition, Bonita enables the

    user to choose between .bpmnand .xmlfile suffix. Import is seamless and the graphicalalignment of elements is almost identical to the original (provided the original storesinformation about the layout).

    3.1.3.2 Export

    There are two kinds of export available for the user.The first and the more accessible one is the internal Bonita export. It offers the

    possibility to transfer the project between different installations of the suite, thereforeit is not suited for non-Bonita users. After the export button is clicked, the dialogwindow containing several configuration options (destination path, selecting resources,properties, dependencies. . . ) pops up. The extension for this export is.bos.

    The second and the more useful one is the Export as feature. It does not come withtoo many output formats, but it supports standard BPMN 2.0 export (also the exportto image is available). This enables the designer to create the diagram in BPM Studioand use it further in other suites.

    3.1.4 Simulation

    The point of excellence for BPM Studio is the simulation and its features. The simula-tion process setup could be divided into three steps: resource management, load profiledefinition and simulation settings for diagram elements.

    Resource management is used for definition of resources available to the process ex-ecution simulation. The definition aggregates the general resource information (resourcename, quantity, target quantity), resource cost (cost unit currency, cost per use fixedcosts, time cost per time unit of choice) and resource calendar (definition of time peri-ods in which the resource is available). The resource calendar is defined on a weekly basis,which means that it is possible to make the resource available lets say every Wednesdayfrom 8 AM to 4 PM, but there is no way of adding any exception to the rule (for exampleit is impossible to define that the sledge is not available on the December 24th, becauseSanta Claus is using it for delivery). Either way, the calendar is quite sufficient.

    Load profile defines the process instance injection during the simulation. The defini-

    tion consists of the profile name and the injection periods. At least one period must bepresent. The periods properties are: the beginning (date and time), the end (date andtime), number of instances and repartition type. The repartition type can take on twovalues:

    Constant the instances are dispatched in a constant way along the period

    Direct all the instances are injected at the start of the period

    18

  • 5/28/2018 Thesis Svancara

    24/73

    3. Business process tools overview

    There could be multiple load profiles. They are independent from the process definitionsso they can be reused.

    Simulation attributes for elements are set in the properties panel of the BPM Studio.There are four groups of elements that have different simulation settings:

    Pools the estimated time for a single instance of the process and the instancesimulation data

    Connecting objects the probability of taking the transition or the transitioncondition

    Flow objects exclusivity of outgoing transitions, whether the task is contiguous,execution time, estimated time, maximum time, data and resources (resource,quantity, duration)

    Other objects there are no settings

    When all the needed properties and attributes are set, the simulation can be executed.Before the actual execution the user sets the sampling interval which is a duration intervalused to collect data for the report.

    The simulation report output is created in two versions - HTML version and PDFversion. Regardless of the format they are identical. The report mainly consists of graphsthat show execution times, waiting times and resource costs. First the complete processresults are shown, then there are details of all the activities of the process and resourcesused through the simulation.

    3.2 jBPM

    jBPM project is a BPM solution developed by JBoss. Actually, jBPM itself is just a mod-ule inside Business Logic integration Platform, but its installation provides all the toolsneeded for the business process life cycle management. The version of the reviewedproject is 5.4.0. By default, the installation contains following software: JBoss Applica-tion Server3, Drools Guvnor, jBPM5 GWT process server, jBPM5 GWT console, webprocess designer and Eclipse with jBPM5 plugin. The focus of the review is not on the

    jBPM process engine, but on the web process designer jBPM Designer 2.4.0.Final thatcomes with the package. Eclipse with the jBPM5 module contains BPMN designer as

    well, but its capabilities are not nearly as complete as of the Web process designer andit does not support simulation.The platform is open-source so the user contribution is possible and even encouraged.

    Web nature of the project enables it to run on multiple platforms, it is possible to useany Java application server of choice, the JBoss Application Server is not mandatory.

    3. JBoss AS has been recently renamed to WildFly

    19

  • 5/28/2018 Thesis Svancara

    25/73

    3. Business process tools overview

    Figure 3.2: jBPM Designer screenshot.

    3.2.1 Modeling possibilities and ease of use

    Web process designer is based on the Oryx designer, which is a popular BPMN designerused throughout the business process suites. The popularity of the designer is arguably

    caused by the fact that it is written in JavaScript, so it is extremely easy to extend,improve and fix even for the less experienced.In order to create a process definition the user has to navigate through Drools Gu-

    vnor repository to the knowledge bases and click on the Create new New BPMN2Process link. After a while loading times can be a little annoying after some time the designer shows up in the right panel of the view. Width of the view can be adjustedso that it takes up all the horizontal space which can not be said about the verticalspace. Fortunately, the editor has a full screen mode and a very simple user interface(UI).

    The main region of the view is taken up by the modeling canvas. There is a palette ofthe elements on the left and properties panel on the right. Then there are two toolbars

    an upper toolbar with all the controls and a lower toolbar with export buttons.The actual modeling is done by dragging the elements from the palette and dropping

    them on a desired place in the canvas. It is possible to move the elements around thecanvas, the rendering speed is much better then that of Bonita BPM Studio. Selectedelement contains a context menu with the controls that help to make the modeling easier for example there are shortcuts for adding proper elements to the flow. There are twobasic color schemes prearranged, they are both well-grounded and adjustable color

    20

  • 5/28/2018 Thesis Svancara

    26/73

    3. Business process tools overview

    scheme of each element can be changed individually.Overall experience with the modeling is very pleasant, on the other hand the visual

    integration with Drools Guvnor is a bit clumsy and rough. The full screen mode solvesthis only partially as it is impossible to save the diagram without the interaction with

    the Guvnor interface.

    3.2.2 Palette of elements

    As it was mentioned before the palette occupies left side of the designer view. It can behidden so that there is more space for the modeling canvas.

    The user can choose from two perspectives that can be changed via the combo box:jBPM BPMN2 (Full) and jBPM BPMN2 (Minimal), which is just a subset of the fullperspective. The full perspective is almost complete descriptive set of elements. The flowobjects contain:

    tasks human task, manual task, script task, send task, receive task, servicetask, business rule task, reusable sub-process, embedded sub-process, ad-hocsub-process

    gateways exclusive, parallel, inclusive, event-based

    events

    start: event (basic), message, timer, escalation, conditional, error, com-pensation, signal

    end: event (basic), message, escalation, error, cancel, compensation, sig-nal, terminate

    intermediate: event (basic), message (throw, catch), timer, escalation(throw, catch), conditional, error, signal (throw, catch)

    The supported connecting objects are: sequence flow, undirected association and uni-directional association. The only swimlane representative is the lane, the pool is notsupported. Additional information can be introduced by these artifacts: data object,text annotation and a group. Some patterns became an established part of the analystsdictionary. Selection of these can be found in the palette in the Workflow Patternssection. Namely: arbitrary cycles, deferred choice, exclusive choice, implicit termina-

    tion, multiple instances without synchronization, parallel split, sequence, simple merge,synchronization, synchronization merge and XOR split.

    Although the palette offers rich variety of flow objects, it does not support messageflows and pools. The reason for this is that collaborations are not supported by the

    jBPM runtime[14]. This indicates that the support should not be expected in the nearfuture and when the users need to create a collaboration diagram, they should use someother tool instead.

    21

  • 5/28/2018 Thesis Svancara

    27/73

    3. Business process tools overview

    3.2.3 Import/export

    The jBPM Designer uses BPMN-like XML with some extensions (simulation proper-ties. . . ) document for storing the modeled process. This ensures smooth conversion be-tween relevant process definition formats.

    3.2.3.1 Import

    There are two formats of process definition that can be imported into the designer. Thefirst one is a proprietary JSON format that works only in the jBPM itself it can beused to transfer the process definition from older jBPM version to a newer one. Thesecond is a genuine BPMN 2.0 format and this should work generally with any otherplatform that supports BPMN 2.0 export. However, during the testing, many attemptsto import outputs generated by various tools were not successful.

    3.2.3.2 Export

    The bottom toolbar in the main designer view serves as a holder of the export buttons.There are exactly six buttons: ERDF, JSON, PDF, PNG, BPMN2, SVG. Each of theserepresents an output format for the process definition export. The selection looks spec-tacular, but only a couple of them are really handy: BPMN2 and JSON. Remainingfour are not suitable for further use. JSON format was mentioned here before it isa proprietary format used across the history of jBPM and is useful when transferringthe model between versions. BPMN2 export is much more beneficial as it is supportedall over the BPMN suites.

    3.2.4 Simulation

    jBPM 5.4 was the first release to include simulation features directly in the web-baseddesigner[15]. The simulation controls and properties are subtle and well hidden for a com-mon user. The main toolbar contains a small button with an icon of a light bulb fromthere the user is able to execute the simulation. Simulation properties for the processcan be set in the properties panel.

    There are six types of elements for which the simulation settings differ:

    The process itself it is possible to set the base currency4 and base time unit(milliseconds, seconds, minutes, hours, days, years)

    Start event wait time and time unit Intermediate event time unit and distribution type and based on the distribu-

    tion type, there are these choices:

    normal mean processing time and standard deviation

    4. ISO 4217 format for example EUR, USD. . .

    22

  • 5/28/2018 Thesis Svancara

    28/73

    3. Business process tools overview

    uniform, random maximum processing time and minimum processingtime

    Poisson mean processing time

    End event time unit, distribution type, minimum, maximum and mean pro-cessing time and standard deviation (all of these settings are shown, but onlysome of them are used based on the selected distribution type)

    Sequence flow probability in %, 0 meaning the transition will never be usedand 100 meaning the transition will always be used

    Task cost per time unit, currency, staff availability, time unit, working hours,distribution type and processing time settings based on the distribution type(see Intermediate event item)

    When the settings are complete, the user can run the simulation. It is based on theexecution of paths in the process and their probability. These paths can be shown byclicking on the light bulb button and Process Pathsoption. Beware of the loops in thediagram as they create an infinite number of different paths and make process pathscomputation and even simulation impossible. Before the actual simulation run, desirednumber of instances, injection interval and interval must be set.

    The results are shown in the new tab of the designer window. They are formed bythree perspectives: process, activities and paths.

    The process perspective focuses on the execution of the process. It shows the exe-cution time (minimum, maximum and average) and number of instances by activity incomprehensible charts. There are several kinds of charts available: bar chart, horizontal

    bar chart, pie chart, table, timeline and line chart.The activities perspective shows the results activity by activity. Detailed charts areavailable showing execution and waiting times, resource utilization and resource cost each of these comes in three variants: maximum, minimum and average. Selection ofgraphs is not as rich as in previous perspective, there is only a bar chart and a table.

    And finally the paths perspective: it shows the path image and path instance execu-tion pie chart (or a table) compared to other paths.

    While the presentation of the results is impressive, the simulation itself works onlysometimes and its complicated setup may become annoying after a couple of executions.The complexity (in a good way) of settings can barely compare to those of Bonita Studio,especially the resource availability customization is not sufficient.

    3.3 Bizagi Process Modeler

    The last of the reviewed BPM tools is the Bizagi Process Modeler. The name suggeststhat it is not a complete suite, however the aim of the analysis is on the modeling andsimulation capabilities and they are fully supported in the modeler. With over 20 yearsin the business, Bizagi is a company with strong background and customer base. The

    23

  • 5/28/2018 Thesis Svancara

    29/73

    3. Business process tools overview

    Figure 3.3: Bizagi Process Modeler screenshot.

    modeler is a part of the Bizagi BPM Suite and serves as a development tool for the initialstage of the business process life cycle. Although the suite is paid, the modeler itself isfree of charge. It comes only in the MS Windows version, which is a big limitation forcompanies using multiple platforms.

    3.3.1 Modeling and ease of use

    First thing that strikes the eye of the user when the application starts is the ribbontoolbar similar to those used by Microsoft in their latest applications. The toolbar con-tains all the controls organized into series of tabs. Other than that, the view is almostidentical to every other tool available for the same purpose modeling something. Thereis a palette toolbar on the left and large canvas in the middle.

    The modeling is basically the same as in the jBPM designer drag and drop frompalette and context menu with reusable elements. The responsiveness of the designer isalso at the same level with the aforementioned designer. The only thing that separatesthem is the ease of settings it is more complicated to change the type of the object in

    the Bizagi process modeler.

    3.3.2 Palette of elements

    Bizagi designer offers the richest palette of the selection. It is divided into five sections:Flow, Data, Artifacts, Swimlanes and Connectors. The names speak for themselves, butlet us list all the elements.

    24

  • 5/28/2018 Thesis Svancara

    30/73

    3. Business process tools overview

    3.3.2.1 Flow

    This section contains the flow elements of the BPMN specification. There are six basiccomponents with several subtypes available:

    Task (none), manual, human, service, receive, script, send and business rule.It is also possible to define loop types: none, standard and multi-instance. Theseevents can be attached to tasks: message, timer, error, compensate, conditional,single, multiple, parallel multiple and escalation

    Sub-process sub-process and reusable sub-process. As the sub-process is con-ceptually the same as task, it has the same loop types and attachable events.

    Gateway exclusive, parallel, inclusive, event-based, exclusive event-based, par-allel event-based, complex

    Start event (none), conditional, timer, signal, message, multiple and parallelmultiple.

    Intermediate event (none), timer, message (catch, throw), signal (catch, throw),link (catch, throw), conditional, compensate, escalation, multiple (catch, throw),parallel multiple.

    End event (none), terminate, message, signal, compensate, escalation, error,cancel and multiple.

    3.3.2.2 Data

    The data section contains the data artifacts data object and data store.

    3.3.2.3 Artifacts

    The artifacts offered in Bizagi Process Modeler are by far the most complete and diverse.This section contains: group, annotation, image, header, formatted text and customartifact.

    3.3.2.4 Swimlanes

    Swimlanes in the modeler are present in their entirety. Beside the common pool and lane

    element, there is a milestone it serves as a sub-partition within a process.

    3.3.2.5 Connecting objects

    Last but not least, the connecting objects are also complete. The palette contains se-quence flow, association and finally a message flow. This means that the Bizagi ProcessModeler is the only one that can capture the collaboration diagram.

    25

  • 5/28/2018 Thesis Svancara

    31/73

    3. Business process tools overview

    3.3.3 Import/export

    The Bizagi Process Modeler uses their own format for storing modeled processes and theirproperties. It is an archive containing set of XML files, for example the diagram is definedin XPDL5 and the simulation properties are stored following the BPSim standard6.

    3.3.3.1 Import

    Import is accessible from the Export/Import tab in the main toolbar. It offers threeoptions: import from Visio, from XPDL and Attributes import. Non-existence of directimport from BPMN is a letdown, however conversion between XPDL and BPMN canbe conducted in external tools.

    3.3.3.2 Export

    The designer is consistent in the export possibilities as it offers the same options as the

    import and adds only image export.

    3.3.4 Simulation

    As it was mentioned before, the simulation model is driven by the BPSim standarddefinition. It is an advantage since the standard was developed in cooperation withmany BPM authorities. It also enables easy interchangeability and interoperability.

    The simulation properties and scenario definition process may confuse the first-timeusers from the start as it is different as in other tools. Nevertheless, it does not necessarilymean a bad thing. On the contrary, the wizard, which appears after the click on theSimulation Viewbutton, presents a comprehensive way of setting simulation properties.

    The whole operation is divided into four steps Process Validation, Time Analysis,Resource Analysisand Calendar Analysis.Process Validationdoes not have much in common with the actual process validity

    and executability. At this step the user defines two basic properties:

    Start event maximum arrival count this number is the upper limit of how manytimes the process simulation begins in the selected start event. It is set on thestart event.

    Split probability when the process contains multiple possible paths, the splitprobability needs to be defined for the simulation to determine the number ofeach individual simulation runs on the specific path. It is set on the exclusive

    gateway or in a non-standard case on any other element that has multipleoutgoing transitions.

    5. XPDL stands for XML Process Definition Language and it is a interchange format for businessprocess definitions.6. BPSim is a WfMC standard. It defines a specification for the Parameterization and Interchangeof process analysis data allowing Structural and Capacity Analysis of a process model providing forPre-execution and Post-execution optimization[16].

    26

  • 5/28/2018 Thesis Svancara

    32/73

    3. Business process tools overview

    In addition, this is the first step that enables the scenario properties definition. Theseproperties include name of the scenario, description, author, version, start (date), dura-tion, base time unit, base currency unit, replication and seed.

    The next step is Time Analysis. This is where the time spent on tasks is set. There

    are several ways of defining the time property:

    Duration a duration defined using the ISO 8601 standard. It consists of days,hours, minutes and seconds.

    Constant a floating point or integer value specifying the amount of base timeunit.

    Continuous distribution normal, truncated normal, uniform, triangular, log-normal, beta, negative exponential, gamma, Erlang and Weibull distribution.

    Discrete distribution binomial or Poisson distribution.

    Beside the task properties, the intermediate events arrival intervals are defined hereas well. They represent the interval after which a specific event occurs and will keepoccurring every time interval until the arrival count is reached.

    The definition of resources is present in Resource Analysis. The user can manipulatesimulation resources, change their type (entity or role), set their quantities, fixed costsand costs per hour. The resources are then available in the diagram for the detailedspecification for the individual tasks. Usage of multiple resources for single task is deter-mined based on logical conjunction or disjunction whichever is selected in the resourceeditor. The costs are defined for the separate tasks as well. The time analysis is enrichedwith wait time property which is defined exactly as the processing time.

    The last step of the wizard is Calendar Analysis. While in the previous step theresources were set up, this step includes defining their availability over time. This isenabled by creating the resource calendar via the Calendarsbutton in the toolbar. Thecalendar has various properties, such as:

    Name name of the calendar.

    Start time start time in hours and minutes.

    Duration miscellaneous values from minutes, through hours, up to four weeks.

    Recurrence pattern the repetition frequency of the calendar (days, weeks,months and years).

    Range of recurrence boundaries of the recurrence, the start is mandatory, theend is optional.

    The availability of resources should be defined for every single calendar. The defaultvalue for each resource is the one defined as quantity in the previous step.

    27

  • 5/28/2018 Thesis Svancara

    33/73

    3. Business process tools overview

    Once the required data is defined, the simulation can be run. It is done by clickingon the Runbutton and then on the Start button. The real time analysis accompaniesthe execution. It consists of: status of resource usage, number of tokens completed,average time per activity, total processing time for each activity and average waiting

    time for each activity. When the simulation is complete, the outcome may be viewedvia the Results button. It shows the usage percentage, total fixed cost and total unitcost for each resource. The process statistics are displayed in a table which is dividedinto rows by the individual activities. Each row contains these columns: name, type,tokens completed, tokens started, minimum time, maximum time, average time, totaltime, minimum time waiting, maximum time waiting, average time waiting, standarddeviation waiting, total time waiting and total fixed cost. The statistics can be exportedto Excel.

    3.4 Summary

    The following tables (3.1,3.2and3.3) represent the most relevant features and theircomparison for the three BPMN modeling and simulation tools. They are divided intofive sections one general and four for each sub-section of the overview (modeling,palette, import/export and simulation).

    3.4.1 Bonita BPM

    Bonita BPM is a poor candidate when it comes to modeling the processes. The palettedoes not offer such variety of elements as the competition. This could be forgiven asmost of the time the selection of elements is sufficient and in fact the only necessaryelement that is missing is the message flow. What is not so forgivable is the renderingspeed and sluggishness of the graphical interface.

    Apart from the fact, that it does not support BPSim standard, the simulation abilitiesare the best of the reviewed tools. Importing external processes works just fine, so theBonita BPM is a great candidate for simulating processes modeled elsewhere and usingWindows is out of the question.

    3.4.2 jBPM

    Modeling in jBPM designer is a delight and the palette supports much more elements

    than Bonita BPM. But still the message flow is absent. If this is not the issue, thedesigner is well-suited for its purposes. Moreover the application is web-based so it canbe deployed everywhere where JBoss AS (or any other suitable application server) runs.

    On the other hand the simulation is the weakest point of the designer. Especiallythe resource utilization definition is almost non-existent. Another big flaw is that thesimulator can not handle loops in the process it operates only on finite paths.

    The designer is suitable for process modeling, but not so much for the simulation.

    28

  • 5/28/2018 Thesis Svancara

    34/73

    3. Business process tools overview

    3.4.3 Bizagi Process Modeler

    Modeling in Bizagi Process Modeler is almost as easy as in jBPM designer, the paletteoffers the best selection of elements and it finally supports message flows. From thispoint of view, this tool is on par with jBPM designer and maybe a little ahead whileBonita BPM barely catches up.

    Simulation features are rich, very well organized and easy to use. The support ofBPSim standard is sufficient, missing only expression evaluation, interruptible tasks andtask priority.

    As a whole, the Bizagi Process Modeler is the best candidate for the initial partof the business process life cycle. But poor export options restrain its use as a singlepurpose tool. Combined with the dependency on the Windows platform this might resultin a decision to rather use Bonita BPM (which is ahead in simulation options) or BonitaBPM together with jBPM designer jBPM designer for modeling and Bonita BPM forsimulation.

    29

  • 5/28/2018 Thesis Svancara

    35/73

    Bonita BPM jBPM

    General

    Release 6.0.3 5.4.0.Final License GPL GPL Deployment type Desktop Web Platform Windows, Linux, OSX Windows, Linux, OSX Modeling

    BPMN 2.0 Yes Yes Drag and drop Yes Yes Element context menu Yes Yes Color schemes default default, high contrast, customNotes Sluggish interface and render-

    ingThe modeler is a part of the

    jBPM deployment and cannobe used without the DroolGuvnor

    Table 3.1: General and modeling features comparison

    30

  • 5/28/2018 Thesis Svancara

    36/73

    Bonita BPM jBPM

    Palette

    Tasks abstract, call activity, human,

    receive, script, send, service

    business rule, human, manual,

    receive, script, send, serviceSub-processes event ad-hoc, embedded, reusable Gateways exclusive, parallel, inclusive exclusive, parallel, inclusive,

    event-based

    Start events error, message, signal, timer compensation, conditional, er-ror, escalation, message, sig-nal, timer

    Intermediate events catch error, message (catch,

    throw), link (catch, throw), non-interrupting boundary timer,signal (catch, throw), timer

    conditional, error, escala-

    tion (catch, throw), message(catch, throw), signal (catch,throw), timer

    End events error, message, signal, timer cancel, compensation, error,escalation, message, signal,terminate

    Connecting objects sequence flow, association sequence flow, association

    Swimlanes pool, lane lane Artifacts text annotation data object, group, text anno-

    tation

    Workflow patterns No Yes

    Table 3.2: Palette features comparison31

  • 5/28/2018 Thesis Svancara

    37/73

    Bonita BPM jBPM

    Import/export

    Import Bonita 6.x, Bonita BAR5.9/5.10, BPMN 2.0, XPDL1.0, jBPM 3.2

    BPMN 2.0, JSON

    Export Bonita (internal), image,BPMN 2.0

    ERDF, JSON, PDF, PNG,BPMN 2.0, SVG

    Simulation

    Standalone simulator No No BPSim support No Noa

    Scenarios Yes No

    Resource management Yes No Expressions Yes No Distribution-based values No Yes Real-time preview No No Graphical reports Yes Yes Report output PDF, HTML internal Additional notes Simulation does not sup-

    port loops

    a. Newer versions added this support

    Table 3.3: Import/export and simulation features comparis

    32

  • 5/28/2018 Thesis Svancara

    38/73

    Chapter 4

    Engine extension

    4.1 iQ Workflow Engine

    InQool1 is a young software company based in Brno, formed predominantly by formeror current students of Faculty of Informatics, Masaryk University. Its activity can bedivided into two groups custom-made software solutions built on various technologiesand own ready-made products that serve as first class software products or as a platform

    for custom-made solutions.iQ Workflow Engine2 falls into the second category, mainly as a platform for further

    extensions that result from analyzing the clients requirements. The goal of the engineis to streamline business processes and reduce their complexity by means of ensuringthe workflow, task checking, key performance indicators measurement, reporting anddocument workflow. This can only be achieved with a first-class quality process manage-ment platform. The Activiti BPM Platform is a basic and the most important buildingelement of the iQ Workflow Engine.

    4.1.1 Activiti

    The Activiti project was started in 2010 by Tom Baeyens and Joram Barrez, the formerfounder and the core developer of jBPM, respectively[9]. It is funded by Alfresco3 andintegrated into the Alfresco system to provide necessary process engine features, but itsdevelopment is independent.

    The tool stack in Activiti BPM Platform consists of five individual components thatmanage major part of the business process life cycle:

    Activiti Engine the core component of the stack that performs the operationsdirectly related to business process execution, such as BPMN 2.0 process parsing,validation, execution and workflow task management.

    Activiti Explorer a web application that serves as a control room for processdeployment, execution, modeling, task and user management.

    Activiti Modeler a web-based business process modeler for creating BPMN

    1. http://www.inqool.cz/en2. http://www.inqool.cz/en/products/iqworkflow3. Alfresco is known for its document management system. Seehttp://www.alfresco.com

    33

    http://www.inqool.cz/enhttp://www.inqool.cz/en/products/iqworkflowhttp://www.alfresco.com/http://www.alfresco.com/http://www.inqool.cz/en/products/iqworkflowhttp://www.inqool.cz/en
  • 5/28/2018 Thesis Svancara

    39/73

    4. Engine extension

    2.0-compliant diagrams built on Signavio Core Components code, now part ofActiviti Explorer. It does not have simulation capabilities[17].

    Activiti Designer an Eclipse plugin used similarly as Activiti Modeler to

    create BPMN 2.0-compliant diagrams, but offers additional features, such asJava service task and execution listeners, process unit testing, etc. It does nothave simulation capabilities.

    Activiti REST a REST interface on top of the Activiti Engine.

    4.1.2 What is missing

    Except for Activiti REST, the iQ Workflow Engine makes use of all the Activiti com-ponents and adds tweaks, tools and product-specific customizations on top. When wetake a look at the list of Activiti components, it is clear that the modeling phase as wellas the optimization phase of the process life cycle suffer from the absence of a process

    simulation tool. This is why we, at inQool, decided to propose a new simulation engineas a part of the practical section of this thesis.

    4.2 Solution proposal

    In the business process tools overview (see chapter3), we looked into the selected BPMmodeling and simulation tools. The discoveries made there lead to an idea to implementour own standalone BPMN 2.0-compatible process simulation engine based on the BP-Sim standard. To summarize the proposal, we want to build an engine that meets thefollowing requirements:

    BPMN 2.0-compatible engine

    Partial compliance with the BPSim standard with respect to extending the en-gine to the full support in the future

    Standalone simulation with as little dependencies on other systems as possible

    Advanced resource availability definition support

    Simple expressions support, especially in conditional transitions

    These requirements should be confirmed in the section that presents the functionalityon given set of BPMN processes.

    4.2.1 BPSim

    BPSim (Business Process Simulation) is a fairly new standard that came to light earlierthis year. The version 1.0 is dated to February 7th,2013. It is a result of joint effort coor-dinated by Denis Gagne and Robert Shapiro under the Workflow Management Coalition(WfMC) supervision. According to the specification[18]:

    34

  • 5/28/2018 Thesis Svancara

    40/73

    4. Engine extension

    The specification is meant to support both pre-execution and post-executionoptimization phases of business process life cycle.

    The specification consists of an underlying computer-interpretable representa-

    tion and an accompanying electronic file format to ease the transfer of the databetween different tools.

    BPSim framework is a standardized specification that allows business processmodels captured in BPMN 2.0 (or XPDL) to be augmented with information insupport of rigorous methods of analysis.

    The BPSim meta-model is captured using Unified Modeling Language (XML)and the interchange format is defined using an XML Schema Definition (XSD).

    Priority was given to ensure that the interchange format is human readable. This

    has side effects that the format does not adhere to all the best object orientedpractices.

    Meta-model and interchange format allow for the capture of both inputs andoutputs of the process analysis.

    When implemented correctly, the BPSim framework should bring us the support forresource management based on iCalendar format4 and expressions in desired places.

    4.2.2 REST service

    Representational State Transfer (REST) is a set of architectural practices by whicha Web service can be designed with focus on the resource as a corner-stone upon whichthe architecture is built[20]. It follows four basic principles:

    Use HTTP methods (GET, POST, UPDATE. . . ) explicitly.

    Be stateless.

    Expose directory structure-like URIs.

    Transfer XML, JavaScript Object Notation (JSON) or both.

    The simplicity of these principles enables quick and easy development of standalonemodule that serves as a Web service for process simulation. We can consider the BPMN2.0 model plus the accompanying BPSim model to be a resource around which we canbuild a RESTful service.

    4. iCalendar is a data format for representing and exchanging calendaring and scheduling in-formation[19]

    35

  • 5/28/2018 Thesis Svancara

    41/73

    4. Engine extension

    4.3 Architecture and design

    The application structure will be divided into three modules: API, implementation andREST API. This section deals with the API and the REST API module, the implemen-

    tation will be analyzed in another section.

    4.3.1 API domain model

    There are three separate domains to be concerned with: the BPMN 2.0 data model, theBPSim data model and the simulation data model, which groups previous two modelstogether.

    Figure 4.1: Simulation data model.

    BPMN 2.0 data model is defined in the XSD documents accessible on the Object

    Management Group website5. The model does not need to be adjusted in any way, asthe structure comprised within the document is fully sufficient for the simulation needs every relevant BPMN element has its own class so the categorization within simulationcan be done easily. Transformation from the XSD to a set of classes will be describedlater.

    5. http://www.omg.org/spec/BPMN/2.0/

    36

    http://www.omg.org/spec/BPMN/2.0/http://www.omg.org/spec/BPMN/2.0/
  • 5/28/2018 Thesis Svancara

    42/73

    4. Engine extension

    BPSim data model is also defined in the relevant XSD available on the BPSim stan-dard website6.Transformation from the XSD to a set of classes will be described later.

    Containing data model (see4.1) is made up of only six classes in order to simplifythe overall simulation model. The Elementclass is the base class and the parent of the

    other five classes. It embodies any element of the BPMN model to which simulationproperties can be bound and contains the accessor methods for common attributes:

    String getId() this method is not visible on the class diagram since it isinherited from a common package private class. It returns the id of the element,it should be the same as the id defined in the BPMN model.

    void setId(String id) setter method for the previous getter. It is not visiblein the diagram for the same reason.

    ElementParameters getElementParameters()ElementParametersis a com-mon class of BPSim model which contains all the simulation properties for the

    given element. This method returns the ElementParametersof the element. void setElementParameters(ElementParameters e) setter method for the

    previous getter.

    The next class in the hierarchy is the Definition class. It corresponds to theDefinitions element of the BPMN model, the uppermost element containing defini-tions of processes. Besides accessors to the collection of BusinessProcess instances itcontains collection of resources as defined in the simulation properties and the scenarioby which the simulation will be driven. The Scenarioclass belongs to the BPSim datamodel.

    BusinessProcess class represents the definition of a single process in the model

    containing accessor methods to the starting node, collection of all nodes and collectionof all transitions.

    Sequence flows inside the process are represented byTransitionclass. It contains ac-cessor methods to the BPMN representation (SequenceFlow) and source and destinationnode.

    Flow objects are reflected in the Node class. It contains accessors to the BPMNrepresentation (FlowNode), all the boundary event nodes that are bound to this node,and accessors to the collection of incoming and outgoing transitions.

    The last class is the SubProcessclass. It combines the behavior of Nodeand Busi-nessProcess.

    4.3.2 REST API

    The REST API basically uses two kinds of resources XML files for BPMN and BPSimdefinitions and results and JSON model for storing hyperlinks to these files. Listing4.1shows such JSON object with these properties:

    6. http://www.bpsim.org/schemas/1.0/

    37

    http://www.bpsim.org/schemas/1.0/http://www.bpsim.org/schemas/1.0/
  • 5/28/2018 Thesis Svancara

    43/73

    4. Engine extension

    id id of the resource.

    definition location of the input BPMN and BPSim XML definition.

    result location of the result of the simulation, is is an XML file structured

    like the input document with addition of requested result values.

    Listing 4.1 Example of a JSON resource returned by the REST API.{

    id: 8,

    definition: http://example.com/simulations/8/definition,

    result: http://example.com/simulations/8/result

    }

    Sequence diagram in the figure4.2shows the basic communication sequences within

    the REST service. The order of the calls does not matter. As the REST is all aboutresources, there is no standard way of specifying an operation on a resource. Thatis why the command to run the simulation is wrapped inside the resource creation.In fact we are creating a simulation result resource. The table 4.1 describes the APIcalls in detail. context stands for the root context of the web service, for examplehttp://bpmn.inqool.cz/simulator/rest .

    URL Method Description

    {context}/simulations POST Create the simulation resource byposting the BPMN and BPSim def-inition as multipart/form-data

    {context}/simulations/{id} GET Get the JSON resource identified byid structured as the one describedin the listing4.1

    {context}/simulations/{id}/definition GET Get the BPMN and BPSim defini-tion XML identified by id

    {context}/simulations/{id}/result GET Get the result XML identified withid

    {context}/simulations/{id} PUT Up date the simulation resourceidentified by id by posting theXML

    {context}/simulations/{id} DELETE Delete the simulation resource andrespective files identified by id

    Table 4.1: Detailed description of the REST API calls.

    4.3.3 Simulation engine API

    The structure of the API can be best seen from the sequence diagrams of the single sim-ulation run. This operation is the core and the most important feature of the simulationengine. It is divided into two views based on how deep the method calls go.

    38

  • 5/28/2018 Thesis Svancara

    44/73

    4. Engine extension

    Figure 4.2: Communication sequences within the REST service.

    The top-level view (see figure4.3) can be interpreted as the REST API calling theengine API. The call begins with the simulator, which is a virtual role and in this caseit can be substituted with the REST service. All the other participants in the sequencediagram are actual interfaces and now we will go through them in detail.

    The BPMNDefinitionReaderis an interface that transforms an XML file containingBPMN definition into a structure of objects with Definitionsas the parent object. Itcontains the only method Definitions read(URI uri) which takes a URI of theXML file as a parameter and returns the Definitions when successful. Otherwise itthrows a runtime exception BPMNDefinitionParseException.

    Next interface is the SimulationDataReaderand its purpose is to transform an XML

    file containing BPSim definition into an object structure with BPSimDatabeing the rootelement. It also contains only a single method BPSimData read(URI uri) whichtakes a URI of the XML file as a parameter and returns the BPSimDatawhen successful.Otherwise it throws a runtime exception SimulationDataParseException.

    When both the BPMN and BPSim definitions are ready and a proper scenario isselected, the SimulationDefinitionTransformer comes into play and creates a datamodel described in the API domain model section (see4.3.1). This interface contains only

    39

  • 5/28/2018 Thesis Svancara

    45/73

    4. Engine extension

    a single method Definition transform(Definitions def, BPSimData s, StringscenarioId) which takes three arguments: BPMN definition, BPSim definition andID of the desired scenario, respectively. It returns a Definition model which is theinput for a simulation execution.

    The most important item from the first sequence diagram is the SimulationRunner.It is also an imaginary boundary dividing the two levels of abstraction when looking intothe simulation engine. Scenario runSimulation(Definition d)is the only method ofthis interface. It takes a Definitionas an argument and returns the resulting scenarioof a single simulation run.

    The last item on the list is the ResultWriter, which serves as a counterpart to thereaders it converts the BPMN definition and simulation data with simulation resultsto a BPMN-compliant XML output.

    Figure 4.3: Top-level view of simulation run.

    The low-level view (see figure4.4) exposes the internal workings of the Simulation-Runners only method runSimulation()in standard implementation. This might seemas an implementation detail, but it is crucial for better understanding of all the API inter-faces. The flow begins with the external entity calledSimulatorand goes through someabstracted communication layers to the SimulationRunner. The method starts with cre-ating the simulation context represented by the SimulationContextinterface, which is

    described later in the text. Next the visitors come into play. There are four kinds of vis-itors: DefinitionVisitor, ScenarioVisitor, BusinessProcessVisitorand NodeIn-stanceVisitor. The runner manages collection of instances for each kind of visitor andemploys them in various phases of the simulation. Let us walk through these phases.

    The first phase begins with the DefinitionVisitor. The runner applies all theinstances of the classes that implement this interface at the beginning of the simulationrun. The interface contains a single method void visit(Definition definition,

    40

  • 5/28/2018 Thesis Svancara

    46/73

    4. Engine extension

    SimulationContext c) which may and should be used to process important data atthe start. The outcome is then applied to the simulation context.

    Then the scenario visitors come into play. The ScenarioVisitoris an interface verysimilar to the previous one, except its methodvisit(..)takesScenarioas an argument

    instead of Definition. The outcome of this method is applied to the simulation context.This concludes the preparation and evaluation of properties that are valid globally forall the process executions in a single simulation run.

    Every BPSim scenario may define a replication, which is a number of repeated runsof the whole simulation process. It defaults to one. When no random values and distri-butions are used in scenario definition, the results of the replications should be the same.The SimulationRunner loops n-times7 and does the following in each loop:

    1. For each top-level BusinessProcessin Definitionand each BusinessProcess-Visitor, thevoid visit(BusinessProcess process, SimulationContext c)method is executed. It should serve mostly for scheduling the start events of the

    process.2. The nodes that are prepared to be executed as a part of single process simulation

    are wrapped into the NodeInstance interface. The interface provides accessormethods for the actual nodeNode, parent NodeInstance, a timer boundary eventthat will be triggered, starting time, duration and id of the run (id of the singleprocess simulation). The scheduled instances are held in the ProcessingQueueand queried in order of their scheduled starting time. While the queue is notempty, the NodeInstanceVisitor is utilized. This interface has two methods,the first is void visit(NodeInstance n, SimulationContext c), which doesthe desired processing with the outcome applied to the simulation context and

    boolean supports(NodeInstance node, Phase p). This method determines,whether thevisit(..)method of the visitor should be called on a givenNodeIn-stance and in a given phase. There are three phases of a visit of the singleNodeInstance, they are passed in the following order:

    (a) Prepare the first phase of the node visits, the visitor should do only basicpreparation operations, specifically preparation of the context (setting theclock...).

    (b) Execute the second and the most important phase. This is where the ac-tual execution should happen, for example the expressions evaluation, actualstarting time (with the wait time) and duration computation, resource uti-

    lization...(c) Schedule the last phase. The visitor should examine the transitions and

    schedule all the valid nodes that follow the visited node in the process.

    Each visitor, regardless the phase, may operate with the statistics and update the

    7. n number of replications

    41

  • 5/28/2018 Thesis Svancara

    47/73

    4. Engine extension

    results. It is recommended that a single NodeInstanceVisitor implementationsupports only one phase.

    Figure 4.4: Low-level view of simulation run.

    What happens during the simulation is a matter of SimulationContext (see4.5).

    This interface defines the context, which is managed during the simulation and severalhelper classes that enable easier evaluation of simulation parameters. The Simulation-Contextprovides us with the setter and getter to the identifier of the current simulationreplication. Moreover it offers getters to these classes: Definition the definition of thesimulation, ProcessingQueue,WaitingRoom, ResourceManager, RandomGenerator,Ex-pressionEngine, ExpressionContext, StatisticsHolder, Clock, ParameterEvalu-atorand ElementParameterEvaluator.

    42

  • 5/28/2018 Thesis Svancara

    48/73

    4. Engine extension

    Figure 4.5: Simplified SimulationContextdiagram

    4.3.3.1 ProcessingQueue

    This interface was introduced before, let us summarize it. It serves as a container ofscheduled NodeInstanceinstances. The queue in the name might be misleading, as itshould not be a FIFO8 container, but more of a priority queue, with starting time of the

    NodeInstance as a priority indicator the lower starting time means higher priority. Itconsists of these methods:

    void queue(NodeInstance node) adds the node to the queue.

    boolean hasNext() indicates whether the queue contains at least one node.

    8. FIFO stands for First In, First Out

    43

  • 5/28/2018 Thesis Svancara

    49/73

    4. Engine extension

    NodeInstance getNext() returns the node with the highest priority (loweststarting time) and removes it from the queue.

    4.3.3.2 WaitingRoom

    Scheduling nodes is not a trivial process. Sometimes, the nodes can be scheduled onlywhen the source nodes of all the incoming transitions have been processed (a join parallelgateway is an example of such node). These nodes are set aside to the Wa