levi - project design document
DESCRIPTION
Levi – the Native BPMN 2.0 Execution EngineProject Design DocumentTRANSCRIPT
PROJECT DESIGN DOCUMENT
Levi – the Native BPMN 2.0 Execution Engine
Version 1.0
Levi | Project Design Document i
PROJECT SUPERVISORS
Ms. Vishaka Nanayakkara
Dr. Sanjiva Weerawarana
Mr. Milinda Pathirage
GROUP MEMBERS
Index No Name E-mail
070468D Eranda Sooriyabandara [email protected]
070206B Ishan Jayawardena [email protected]
070138R Keheliya Gallaba [email protected]
060501P Umashanthi Pavalanathan [email protected]
Levi | Project Design Document ii
REVISION HISTORY
Date Version Description Authors
12/01/10 Draft Draft version All members
12/02/10 0.9 Pre-final All members
12/03/10 1 Final All members
Levi | Project Design Document iii
TABLE OF CONTENTS
1. Introduction ........................................................................................................................... 1 1.1 Purpose ........................................................................................................................... 1 1.2 Scope .............................................................................................................................. 1 1.3 Document Overview ...................................................................................................... 1 2. Architectural Overview .......................................................................................................... 2
2.1 System Overview ........................................................................................................... 2 2.2 Architectural Representation ......................................................................................... 3 3. Architectural Goals and Constraints ...................................................................................... 3 3.1 Assumptions and Dependencies .................................................................................... 3
3.3 Goals and Guidelines ..................................................................................................... 4 3.4 Development Process ..................................................................................................... 5 4. System Design ....................................................................................................................... 6
4.1 High Level Design ......................................................................................................... 6 4.2 Deployment Design for Business Process Execution in the Process Engine ................. 8 4.3 Class Diagrams .............................................................................................................. 8 5. Use-Case View..................................................................................................................... 13
5.1 Use-Case Realizations ................................................................................................. 13 6. Logical View ........................................................................................................................ 17 7. Process View ........................................................................................................................ 18
8. Development View .............................................................................................................. 19
9. Physical View ...................................................................................................................... 20 4 Supporting Information ......................................................................................................... 21 4.1 Definitions, Acronyms, and Abbreviations ................................................................. 21
4.2. References ................................................................................................................... 22
Levi | Project Design Document iv
TABLE OF FIGURES
Figure No Description Page No 2.1 Example of a private business process ......................................................................................... 4
2.2 Example of a public process ............................................................................................................. 4
2.3 An example of a collaborative process ......................................................................................... 5
2.4 An example of a choreography ........................................................................................................ 6
2.5 An example of a Conversation diagram ....................................................................................... 6
3.1 A simple business process ................................................................................................................. 8
3.2 The Purchaser process and its collaborations with other service provider
processes ................................................................................................................................................. 9
3.3 Incident Management with human-driven and system-driven pools ...........................11
3.4 This rather simple diagram is all we have to show to the account manager .............12
3.5 This is the only part of the whole collaboration we will execute in Levi .....................13
3.6 Multiple outgoing Sequence Flows ..............................................................................................14
3.7 The Lifecycle of a BPMN Activity ..................................................................................................15
3.8 The Parallel Gateway .........................................................................................................................17
3.9 The Exclusive Gateway ......................................................................................................................17
3.1 The Inclusive Gateway ......................................................................................................................18
3.11 The Event-Based Gateway ...............................................................................................................18
3.12 The Complex Gateway .......................................................................................................................29
3.13 Sample Web User Interface for deploying a BPMN process ..............................................26
3.14 Sample Web User Interface for a user to manage his tasks assigned by the
Process Execution Engine ................................................................................................................27
Levi | Project Design Document 1
1. Introduction
1.1 Purpose
This Design Document provides a comprehensive architectural overview of the project Levi -
the native BPMN 2.0 execution engine, using a number of different architectural views to depict
different aspects of the system. This document is intended to capture and convey the significant
architectural decisions about the system to the members of the project team and the
supervisors, both internal and external, who will participate in the implementation phase of the
project and verify the architectural significance of the system. As Levi being an open source
project based on Apache ODE, this document also intends to convey the architectural details of
the project to interested audience and will be made available publicly.
1.2 Scope
Levi is a native BPMN 2.0 execution engine, which can be used to execute business process
models that conform to the BPMN 2.0 specification. And most importantly, it will serve as a
proof of concept for exploring the possibilities of using Apache ODE (Orchestration Director
Engine) and JACOB (Java Concurrent Object Framework) to execute BPMN 2.0 processes. This
engine will be capable of deploying, persisting, navigating, and executing business processes
claiming BPMN 2.0 execution conformance. The major objective of BPMN 2.0 standard is to
provide a high level overview of business processes and their execution to the business people
who do not have much technical expertise. We allow businesses to have automated, efficient
process flows and eventually increase their productivity by facilitating the execution of these
modeled business processes in Levi.
1.3 Document Overview
Section 2 describes the architectural overview of Levi and the method of architectural
representation used in this project design document to present different views of architecture,
which are the aspects of the system in the perspective of different stakeholders. Section 3 briefs
the architectural goals of Levi and the identified constraints; it also has an overview about the
development process to be used to implement the system.
Details about the proposed system design are depicted and described in section 4. System
design is presented using high level design, deployment design and class diagrams. The BPMN
constructs to be implemented in the Levi engine are also identified and depicted as a class
diagram in section 4. Section 5 presents the use case view of the system using use case
realization.
Section 6 to 9 contains the four different views of architecture. These four different views are
explained in the context of this project, using different types of UML diagrams. Section 6
describes the logical view of the system using sequence diagrams and section 7 describes the
process view of the system using activity diagram. A comprehensive package diagram is used in
section 8 to describe the development view of the system and section 9 describes the physical
or implementation view of the Levi business process engine.
Levi | Project Design Document 2
2. Architectural Overview
2.1 System Overview
The project Levi is based on Apache ODE with the goal of implementing a native BPMN 2.0
execution engine. The initial version of Levi will serve as a proof of concept for exploring the
possibilities of using Apache ODE and JACOB to execute BPMN 2.0 processes. Figure 1 shows the
high level architecture of Levi engine based on Apache ODE.
The current scope of this project is indicated in figure 1, using dotted lines. Integration layer and
implementation of integrating web services will be added to the system in the later stages. The
input to the system is the BPMN process diagrams and WSDL definitions. An object model is
generated using the OM Model Generator component and the process definition is given as
input to the ODE BPMN runtime. The ODE BPMN runtime component handles the execution of
the input business process using the JACOB framework and data access objects. Process states
are persisted using the persistence capabilities of the JACOB framework.
BPMN Process Definitions, WSDL
Compiled Process Definition
OM Model Generator
ODE BPMN Runtime Instantiation of Processes Implementation of BPMN Constructs Routing of Incoming Messages
ODE Data
Access Objects
JACOB Persistency of Execution States Concurrency Navigation
ODE Integration
Layer
Web Services
DBMS
Figure 1- Proposed Architecture for Implementing BPMN 2.0 Based on JACOB Framework
Levi | Project Design Document 3
2.2 Architectural Representation
The 4+1 View model of architecture is used for the purpose of describing multiple aspects of the
system in different stake holders’ perspective. Figure 2 shows the 4+1 view model as a diagram
indicating the stakeholders interested in each view. The four views are logical, process,
development and physical view. In addition use case scenarios are used to illustrate the
architecture serving as the ‘plus one’ view.
3. Architectural Goals and Constraints
The execution model used by Levi consists of different stages where each stage is responsible of
a precise, predefined task. In the initial stages it converts the supplied business process model
into an executable intermediate format that is understandable internally, and then in the final
stage, it executes this model by employing the concepts such as orchestration, choreography
and intermediate web services invocation layer. In addition to that, Levi’s internals are designed
in such a way that it possesses the ability to be expanded to support choreography modeling
conformance, process modeling conformance, better error handling and debugging
methodologies.
3.1 Assumptions and Dependencies It is assumed that the user of Levi will use a suitable editor which complies with BPMN 2.0 modeling conformance, to model a business process in BPMN 2.0, which, in turn, can be fed as the input to Levi.
Levi’s architecture heavily depends on the JACOB framework and other reusable components of Apache ODE, as will be elaborated in the coming sections of this document. Since ODE depends on the Java Runtime, indirectly, Levi will require the user to have the Java Virtual Runtime installed.
Figure 2 - 4+1 View Model of Architecture
Levi | Project Design Document 4
3.2 General Constraints
Levi targets the business community, especially business analysts and managers who are
seeking to improve process efficiency and quality of their enterprise. Business users can model
and execute business processes in the areas of Customer Relationship Management, Supplier
Relationship Management, Logistics, Supply Chain Planning, Financial Accounting, Project
Management, Human Resources and others. Since the users are considered as having
considerable experience in the workflow domain, the users are not considered as novice
computer users. As the open source practice, Levi’s source code will be made available to the
public, so the interested developer level users can customize and further enhance the code base
to fit their requirements.
Levi has to have a good security infrastructure. Since this service is used by various people in an
organization, it is required to have a good authorization and authentication system. For
example, tasks that belong to the management should not be exposed to other workers. Also the
outsiders should not be allowed to a system owned by an organization, which may cause a
considerable amount of loss for the organization.
Since this engine is based on Apache ODE and JACOB, ODE’s virtual process machine, there is a
higher risk of inheriting most of the complexities and shortcomings of their architecture. Since
BPEL being the process execution language of Apache ODE, and BPMN 2.0 being that of Levi,
they have many fundamental differences. For instance, BPMN 2.0 XSD makes heavy use of
inheritance, unlike in BPEL. Because of this reason, the existing XSD parser of ODE cannot be
reused. Therefore, it will be required to write an XSD parser for Levi anew.
The BPMN 2.0 standard consists of a number of constructs for business process modeling and
only a subset of that fall into the executable category. Due to this, the project’s scope limits itself
to a proof of concept scenario as only a subset of the executable components will be
implemented. This project is at an experimental level that explores the web services domain and the business
process modeling domain. Hence a considerable amount of research and study has to be carried
out in this project, making the unique challenges of being one of the first native BPMN engines
in the BPM sphere.
3.3 Goals and Guidelines
One can model an executable business process using a BPMN 2.0 modeling tool and execute it in
Levi. When modeling such processes, the person who models the process must consider all the
necessary interactions with external entities (e.g. the service requests that are sent to the
external service providers) and include them in the process definition appropriately, to make
the model executable. However, that level of modeling is not directly indicated with BPMN 2.0
diagrams, rather, that is a responsibility of the editing tool.
Levi | Project Design Document 5
3.4 Development Process
Throughout the project, we use an agile development methodology. There are many specific
agile development methods. Most promote development, teamwork, collaboration, and process
adaptability throughout the life-cycle of the project. But, we are not restricted to only one of
those approaches; rather, we are practicing a combination of all these methods in various
extents.
As it is primarily based on iterative and incremental development, where requirements and
solutions evolve through collaboration between stakeholders, we are planning to complete the
implementation of BPMN 2.0 constructs in few iterations, as depicted in figure 3. The initial
simple iteration will cover all the basic constructs, and act as a proof-of-concept for a native
BPMN 2.0 implementation via a process virtual machine.
SIMPLE
SequenceFlow
Task
SubProcess(embed)
ExclusiveGateway
Parallelgateway
StartEvent
EndEvent
DESCRIPTIVE Pool
Lane
MessageFlow
UserTask
Re-usable Subprocess
DataObject
DataInput
TextAnnotation
Association
DataAssocication
DataStore
MessageStartEvent
MessgeEndEvent
TimerStartEvent
TermiateEndEvent
DODAF
Plus 29 elements
COMPLETE
Plus 50 elements
Figure 3 - Iterative Development of BPMN 2.0 Constructs
Levi | Project Design Document 6
4. System Design
4.1 High Level Design
Figure 4 shows the major building blocks of a BPMN execution engine. The following sections
give a brief description of each major blocks of the system.
4.1.1 Modeling Tool
A business process is modeled using the modeling tool, using the standard BPMN 2.0 constructs
4.1.2 Process Model
Based on the business process modeled using the modeling tool, a process model is generated.
BPMN 2.0 compliant modeling tool produces the process model according to the standardized
XML interchange schema. That means it is possible to create a BPMN model in one tool with
confidence that it can be opened in different tool.
4.1.3 Process Engine
The business process execution engine receives the process model as input and executes the
executable part of the input business process model. Execution sates are persisted in the
process database. Process engine interacts with humans and other applications in order to
execute the business process.
Modeling Tool
Applications
Levi - Process Engine Process
Database
Process Model
Build time
Runtime
Figure 4 - Major Building Blocks of the Levi Process Engine
Levi | Project Design Document 7
Figure 5 shows a representation of BPMN 2.0 core and layer structure, the basic principles of
layering that can be composed in well defined ways. The approach uses formalization constructs
for extensibility that are applied consistently to the definition. The additional effect of layering
is that compatibility layers can be built, allowing for different levels of compliance amongst
vendors, and also enabling vendors to add their own layers in support of different vertical
industries or target audiences. In addition, it provides mechanism for the redefinition of
previously existing concepts without affecting backwards compatibility, but defining two or
more non-composable layers, the level of compliance with the specification and backwards
compatibility can be achieved without compromising clarity.
The BPMN specification is structured in layers, where each layer builds on top of and extends
lower layers. The core or kernel includes the most fundamental elements of BPMN that are
required for constructing BPMN diagrams: Process, Choreography, and Collaboration. The Core
is intended to be simple, concise, and extendable, with well defined behavior.
Figure 5 - A Representation of BPMN 2.0 Core and Layer Structure
Levi | Project Design Document 8
4.2 Deployment Design for Business Process Execution in the Process Engine
Figure 6 shows the deployment design of the Levi process engine. During deployment, the
process model is translated in to another format which can be executed by the process engine.
Multiple instances of the same process can be created and it is navigated using an imaginary
token flow mechanism. The important intermediate states of the process instances are persisted
to the process engine database for future use.
4.3 Class Diagrams
The core elements of the BPMN 2.0 specification is are sub-packaged as shown in figure 7. The
Core contains three (3) sub-packages:
1. Foundation: The fundamental constructs needed for BPMN modeling.
2. Service: The fundamental constructs needed for modeling services and interfaces.
3. Common: Those classes which are common to the layers of Process, Choreography, and
Collaboration.
<process …>
<sequence>
….
<flow>
….
</flow>
</sequence>
</process>
Instance Cache
….
Model Cache
Navigator
Navigation Logic
Activity Name ID Cond.. …
Control Link Name ID Cond.. …
Activity Instance Name ID Cond.. …
………
Process Engine Database
Deployment
Figure 6 - Deployment Design of the Process Engine
Levi | Project Design Document 9
Figure 8 depicts the class diagram, showing the organization of the core BPMN elements.
Figure 8 - Class Diagram Showing the Organization of the Core BPMN Elements
Figure 7 - Class Diagram Showing the Core Packages
Levi | Project Design Document 10
The following class diagrams represent the major classification of major BPMN 2.0 constructs, Event, Gateway and FlowElement. Figure 9 shows the Event class diagram and figure 10 shows the FlowElement class diagram.
Figure 9 - Event Class Diagram
Figure 9 - FlowElement Class Diagram Figure 10 - FlowElement Class Diagram
Levi | Project Design Document 11
Figure 11 shows the Gateway class diagram.
Figure 11 - Gateway Class Diagram
Figure 12 and Figure 13 represents the class diagram for the core of the Levi engine, including
the major BPMN 2.0 constructs to be implemented. This class diagram serves as an overview of
the implementation of Levi engine.
Figure 12 - Class Diagram of BPMNRuntime in Levi
Levi | Project Design Document 12
Figure 13 - Class Diagram of Levi
Levi | Project Design Document 13
5. Use-Case View A description of the use-case view of the software architecture. The Use Case View is important input
to the selection of the set of scenarios and/or use cases that are the focus of an iteration. It describes
the set of scenarios and/or use cases that represent some significant, central functionality. It also
describes the set of scenarios and/or use cases that have a substantial architectural coverage (that
exercise many architectural elements) or that stress or illustrate a specific, delicate point of the
architecture.
5.1 Use-Case Realizations
Figure 14 depicts the use cases in the system for the Actors 'User' and ‘Super User’ in a generic
scenario of working with Levi. In a typical business environment, management will model and deploy
business processes for monitoring, managing and helping out employees’ daily chores.
Figure 14 - Generic Use Case Diagram of Levi
Levi | Project Design Document 14
Figure 15 is the use case diagram for automating the incident management process, we
discussed in the System Requirement Specification to be executed in a process engine.
Figure 15 - Sample Use Case for Automated Incident Management System
Levi | Project Design Document 15
An e-tender (the "Purchaser" process) which sends a request for quote to multiple service
providers (e.g., warehouse storage) in a marketplace was also discussed in the System
Requirement Specification. It sends out requests to each service provider and anticipates their
response through three Choreography Activities. Figure 16 show its use case diagram.
Figure 16 - Sample Use Case Diagram for 'e-tender' Purchase Application
Levi | Project Design Document 16
“Post a Job” use case discussed in the previous document includes the business department and the human resources department. The process starts when an employee is required. The business department reports this job opening. Then the human resources department writes a job posting. The business department reviews this job posting. It is depicted in figure 17.
Figure 17 - Sample Use Case for Job Posting Application
Levi | Project Design Document 17
6. Logical View
System sequence diagrams in this chapter illustrate how certain tasks are done between users
and components in Levi, Native BPMN execution engine. These tasks may include repetitive,
simple, or complex tasks. The purpose is to illustrate the use case in a more clear visual format
for the reader. In figure 18, how a super user logs into the system and does basic tasks like
deploying and starting processes is depicted.
Figure 18 - Sequence Diagram for Generic Process Deployment
Levi | Project Design Document 18
7. Process View Activity diagram in this chapter illustrate how an example business process execute in Levi, Native BPMN execution engine, which represent workflows of stepwise activities and actions with support for choice, iteration and concurrency. The figure 19 shows a private process of producing an advertisement done by an advertising agency. This activity diagram contains the detailed process which contains number of activities and loops which are not relevant to the customers of the agency such as archiving, reviewing and reworking. The customers are only involving in Ordering including text for the advertisement and confirm whether the advertisement is satisfy their needs, which are shown here as the message flows.
Figure 19 - Activity Diagram Depicting Sample Process Deployment and Execution
Levi | Project Design Document 19
8. Development View
The development view illustrates the system from the perspective of the stakeholders who
design and implement the system, the project team and the supervisors in this case. UML
package diagram is used to represent the development view.
Figure 20 shows the different packages which will be used for implementation. The package
“org.levi.bpmn” will contain the sub packages, Java classes and configuration files used to build
the Levi engine. It uses the external packages “org.apache.ode.jacob” and “omg.spec”; JACOB
framework resides in the “org.apache.ode.jacob” package is the base for implementation of Levi
engine; “omg.spec” package contains the schematic representation of BPMN 2.0 constructs and
it is used for the purpose of building the object model from the BPMN 2.0 process model.
Figure 1 shows the component structure of the proposed architecture for Levi engine and it is
useful for the perspective of the development team of the project. It shows each component of
the system and section 2.1 describes each of them.
Figure 20 - Package Diagram Showing Implementation View
Levi | Project Design Document 20
9. Physical View
Figure 21 depicts a BPMN process engine deployment in a real world enterprise. Different roles
can be assigned for employees of different departments with different privileges such as
deploying a process, starting a process, assigning tasks, claiming tasks and claim completion of
tasks. Levi engine can be deployed in a distributed environment; it also can be integrated with
existing cloud infrastructure to add more reliability and availability with less cost.
Figure 21- BPMN Process Engine Deployment in a Real World Enterprise
Levi | Project Design Document 21
4 Supporting Information
4.1 Definitions, Acronyms, and Abbreviations
BPMN 2.0 : Business Process Model and Notation version 2.0 beta
BPDM : Business Process Definition Metamodel
BPEL : Business Process Execution Language
BPEL4People : WS-BPEL Extension for People
BPM : Business Process Modeling
UML : Unified Modelling Language
RDF : RDF Vocabulary Description Language 1.0
SOAP 1.2 : Simple Object Access Protocol
UDDI : Universal Description, Discovery and Integration
URI : Uniform Resource Identifiers
WSBPEL : Web Services Business Process Execution Language
WSDL : Web Services Description Language
XML : eXtensible Markup Language
XPath : XML Path Language
XSD : XML Schema Definition
Levi | Project Design Document 22
4.2. References [1] BPEL Vs BPMN2.0 Should you care? By Prof. Frank Laymen at 2nd Intl. Workshop BPMN 2010, 28th Nov. 2010, http://www.slideshare.net/bpmn2010/frank-leymann-bpmn-2010 [2] Creating Use Case Diagrams, 29 Nov. 2010, http://www.developer.com/design/article.php/10925_2109801_2/Creating-Use-Case-Diagrams.htm [3] Principles behind the Agile Manifesto, 30 Nov. 2010, http://www.agilemanifesto.org/principles.html [4] Sequence Diagram in UML, 2 Dec. 2010, http://www.developer.com/design/article.php/3080941
[5] T. Allweyer, BPMN 2.0 - Business Process Model and Notation, BoD, 2010.
[6] M. Havey, Essential business process modeling, O'Reilly Media, Inc., 2005.
[7] Business Process Model and Notation (BPMN) Specification, Version 2.0 - Beta 2, May 2010 http://www.omg.org/spec/BPMN/2.0/
[8] OMG Group, “BPMN 2.0 by Example,” OMG Group, vol. 0, May 2010. http://www.omg.org/spec/BPMN/2.0/examples/PDF
[9] Bruce Silver. “BPMN 2.0 Status Update”, blog, 5 Oct. 2010, http://www.brsilver.com/2009/07/06/bpmn-20-status-update-2/
[10] BPEL 2.0 Standard, 5 Oct. 2010, http://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.pdf
[11] OASIS, 5 Oct. 2010, http://www.oasis-open.org
[12] BPM FAQs, 5 Oct. 2010, http://www.bpmodeling.com/faq
[13] ODE-793, 5 Oct. 2010, https://issues.apache.org/jira/browse/ODE-793
[14] ODE-794, 5 Oct. 2010, https://issues.apache.org/jira/browse/ODE-794
[15]Process Modeling Notations and Workflow Patterns, paper by Stephen A. White of IBM Corporation (2006) http://www.bpmn.org/Documents/Notations_and_Workflow_Patterns.pdf
[16] Decker, G., Kopp, O., Leymann, F., Weske, M.: BPEL4Chor: Extending BPEL for modeling choreographies. In: ICWS 2007, IEEE Computer Society (July 2007)
[17] Wohed, P., WMP van der Aalst, M. Dumas, AHM ter Hofstede, and N. Russell: On the Suitability of BPMN for Business Process Modelling. Technical report, Queensland University of Technology (QUT), http://www.bpm.fit.qut.edu.au/projects/babel/docs/BPMN-eval- BPM06.pdf, 2006.
[18] Russell, N.: Workflow Resource Patterns. Beta, Research School for Operations Management and Logistics, 2005.
Levi | Project Design Document 23
[19] Russell, N., W.M.P. van der Aalst, A.H.M. ter Hofstede, and D. Edmond: Workflow Resource Patterns: Identification, Representation and Tool Support. Proceedings of the 17th Conference on Advanced Information Systems Engineering (CAiSE 05), 3520:216–232.
[20] Kloppmann, M., D. Koenig, F. Leymann, G. Pfau, A. Rickayzen, C. von Riegen, P. Schmidt, and I. Trickovic: WS-BPEL Extension for People– BPEL4People. Joint white paper, IBM and SAP, July, 2005.
[21] Wohed, P., WMP van der Aalst, M. Dumas, AHM ter Hofstede, and N. Russell: Pattern-based Analysis of BPMN-An extensive evaluation of the Control-flow, the Data and the Resource Perspectives. BPM Center Report BPM-05-26, BPMcenter. Org, 2005.
[22] Aalst, WMP van der and A. Kumar: A reference model for team-enabled workflow management systems. Data & Knowledge Engineering, 38(3):335– 363, 2001.