Mastering jBPM 5 - Simone Fiorini - E-Book

Mastering jBPM 5 E-Book

Simone Fiorini

0,0
47,99 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

If you are a designer or developer who wants to build and operate business process-centric applications, then this book is for you. Knowledge of the basic concepts of application development in Java will be helpful in following the concepts covered in the book, but is not necessary.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 343

Veröffentlichungsjahr: 2015

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

Mastering jBPM6
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Business Process Modeling – Bridging Business and Technology
Business process management
Human interaction management
Business activity monitoring
Business process simulation
The business process model and notation
Core elements
Flow Objects
Data
Connecting Objects
Swimlanes
Artifacts
Business process management as applied in industry
Supply chain management
Banking and financial services
Design patterns in business process modeling
Sequence
Parallel split
Synchronization
Simple merge
Exclusive choice
Implicit termination
Deferred choice
Multiple instance without synchronization
Synchronized merge
Arbitrary cycle
Introducing jBPM
The KIE workbench
Process Designer
Operation management
Eclipse tooling
Core engine
The knowledge repository
The business logic integration platform
Drools Guvnor
Drools Expert
Drools Fusion
Working together
Summary
2. Building Your First BPM Application
Installing the jBPM tool stack
Customizing the installation
Changing the database vendor
Manually installing the database schema
Creating your first jBPM project
Business Process Modeling
Building and deploying the project
Running your first process
Embedding jBPM in a standalone Java application
Modeling the business process using Eclipse tooling
Creating a jBPM project using Eclipse
Deploying the process programmatically
Writing automated test cases
Change management – updating deployed process definitions
Summary
3. Working with the Process Designer
Web-based tooling
Process modeling
The Object Library
The process canvas
Properties editor
Toolbar
Problem visualization
The Metadata tab
Data object modeling
Form modeling
Creating a form
Setting the field properties
Setting a default value
Inferring field values
Subforms
Multiple subforms
Process simulation
Process paths
Simulation parameters
Process-level parameters
Task-level parameters
Flow element parameters
Running simulation
Simulation results
Eclipse-based tooling
Importing a project created using web-based tooling
Process modeling
Data object modeling
Form modeling
Process simulation
Saving changes to the knowledge repository
Summary
4. Operation Management
An overview of the KIE workbench, Git, and Maven
Working with Git
Cloning a remote repository
Making changes and committing
Pushing to the remote repository
New repository
Managing assets – managed repositories
Governance workflow
Git cloning and managed repository
Asset management example
Promoting assets
Releasing
Building (single project)
Asset versioning history
Managed repository and Maven
Governance process definitions
A final note
An overview of the kie-config-cli tool
Connecting (online mode)
Creating an organizational unit
Creating a repository
Defining role-based access control rules
Adding jBPM console users
Adding the repository to an organization
Pushing changes to system.git
More on the system.git repository
KIE deployments
Artifacts and KIE modules
Deployment options
Deployment by example – the Pizza projects
The process definition – pizzadelivery
Deploying pizzas
Git and project configuration
Deploying the dependency
Providing artifacts
Deploying
Adding a KIE module manually
Process and task management applied – the PizzaDelivery process
Starting the Process
Undeployment
User management
Task management
Managing jobs and asynchronous commands' execution
Creating, scheduling, and launching a new Job
Process definition conversion
Process definition versioning and instance upgrading
BAM
BPM and BAM
Default history logs
BAM and Dashbuilder – the pizza maker's performance index
Example projects
Configuring persistence
Generating audit data – ProcessBAM unit test
Writing the business query
Adding the data provider
Creating a new dashboard page and the KPI panels
Notes
Summary
5. BPMN Constructs
Parameters, variables, and data
Sequence flow
Gateways
Parallel (AND) gateway
Conditional branching
Drools
Exclusive (XOR) gateway
Inclusive (OR) gateway
Event-based gateways
Instantiating gateway
Complex gateway
Events
Start events
None Start event
End events
(None) End event
Terminate End event
Boundary events
Signal events
Scope
Signal ID and signal name tips
Signal data mapping
Start Signal event
Intermediate Signal event
Boundary Signal event
End Signal event
Message events
Message data mapping
Start Message event
Intermediate Message event
Boundary Message event
End Message event
jBPM throwing message implementation
Timer events
Start Timer event
Intermediate Timer event
Boundary Timer event
Error events
Boundary Error event
Error Start event
Error End event
Compensation
Intermediate Compensation event
Boundary Compensation event
Compensating activity
Triggering compensations with signals
End Compensation event
Multi-instance compensation
Escalation
Conditional events
Activities
Task
User Task
Human roles
State transitions
Deadlines and escalations
Task reassignment
Notifications
Delegation
Forward
Suspend/resume
Skip
Release
Script Task
Service Task
Rule Task
Send/Receive Task
Manual Task
Ad hoc (Custom or None) Task
Async tasks
Call Activity Task
Subprocess
Ad hoc subprocess
Multiple instances
Lanes
Data objects
Summary
6. Core Architecture
The KIE API
KieServices
KieContainer – KIE modules and KieBase(s)
The KIE builder API
KieResources
KieModule
KieBuilder
Repositories and scanners
KieScanner
KieLoggers
KieStoreServices
RuntimeManager service and the engine
Runtime strategy
Choosing the right strategy
The RuntimeEnvironment class
Runtime Context
KieSession
Stateless KieSession
Globals
The CommandExecutor interface
Batch execution
Event listeners
Channels
Human Task service
CommandService
TaskCommand and UserGroupCallback
The TaskContext command
Transactions and interceptors
Notification service
The TaskFluent class
Audit and history logs
AuditLoggerFactory
Custom logger
Persistence and transactions
Local transactions with Bitronix
Managing transactions
Locking
Summary
7. Customizing and Extending jBPM
Custom process nodes
Workitem and handlers
Life cycle
Cacheable and closeable interfaces
Handlers in action
Direct handler registration
Declarative kmodule.xml handler configuration
Handler configuration file
Handler definition file
Workitem handler implementation
Handling input parameters
Returning results to the process
The PizzaTweet example
The main project (the KIE module)
Process and task parameter mappings
Handler project (pizzahandlers)
Model project (pizzamodel)
IDE customization
Console test run
Standalone test run
Service repository
Custom service repository
jBPM identity management
User callback configuration
The DBUserGroupCallbackImpl class
The LDAPUserGroupCallbackImpl class
jBPM serialization
Marshalling
Persisting variables
Strategies
Configuring a marshalling strategy
Persisting variables
Summary
8. Integrating jBPM with Enterprise Architecture
Setting the context
Services provided by jBPM
Creating custom workitem handlers
Integrating with JEE
EJB remote interfaces
The EJB local interface
Integrating in SOA and EDA environments
Integrating with REST services
The REST service
The client – REST handler configuration
The SOAP WebService
The JAX-WS service
The client – process and service task handler configuration
Process definition
Service task handler
The WebServiceWorkItemHandler class
jBPM as a remote service
The REST API
Authentication
The remote Java API
Dependencies
The REST client
Client for jBPM JMS service
Server JMS configuration
JMS client implementation
The SOAP API
Transactions
Summary
9. jBPM in Production
Scalability
Scaling the business process modeling facility
Scaling the process runtime
Factors and considerations
Number of processes/process instances
The number of user interactions
Flavors of runtime manager
Task service
Number of timer events
Availability
Applicability to workbench
Applicability to continuous improvements in processes
Applicability to the process runtime
Security
Securing the access of application assets
Securing the process runtime
Access security specific to human tasks
Audit logging
Maintainability
Fault tolerance
Exception handling in process definitions
Exception handling for domain-specific processes
Summary
A. The Future
Business programming
Convergence of enterprise architectures for real-time and predictive analytics
B. jBPM BPMN Constructs Reference
Tasks
User
Send
Receive
Manual
Service
Business rule
Script
None
Subprocesses
Reusable
Multiple instances
Ad hoc
Embedded
Events
Start events
End events
Catching intermediate events
Throwing intermediate events
Gateways
Data-based exclusive (XOR)
Event-based gateway
Parallel
Inclusive
Data objects
Swimlanes
Lane
Artifacts
Group
Annotation
Index

Mastering jBPM6

Mastering jBPM6

Copyright © 2015 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: June 2015

Production reference: 1220615

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham B3 2PB, UK.

ISBN 978-1-78328-957-8

www.packtpub.com

Credits

Authors

Simone Fiorini

Arun V Gopalakrishnan

Reviewers

Ruben Andres Ghio

Jerónimo Ginzburg

Federico Weisse

Commissioning Editor

Rukhsana K

Acquisition Editor

Vinay Argekar

Content Development Editors

Anand Singh

Sweny M. Sukumaran

Technical Editor

Tanmayee Patil

Copy Editor

Tani Kothari

Project Coordinator

Vijay Kushlani

Proofreader

Safis Editing

Indexer

Rekha Nair

Graphics

Valentina D'silva

Jason Monteiro

Production Coordinator

Aparna Bhagat

Cover Work

Aparna Bhagat

About the Authors

Simone Fiorini is a seasoned professional with 20 years of software development experience, specializing in large-scale software systems, mission critical applications, and project management in a wide variety of computing environments and platforms, with a focus on EAI, BPM, and integration-oriented tools. His latest efforts are focused on an online reservation system for a large Middle East railway company and a scalable, reactive, financial market data server for a leading Italian banking group's investment bank.

A graduate of both Università di Parma (earth science) and University of Milan (engineering of computing systems), Simone resides near Brescia, where he's trying to grow roses and other fragrant flowers for his wife, Giuliana, and their two sons.

I'd like to thank my wife, Giuliana, and my sons as they support everything I do any way I do it, my parents, my brothers, and all the people who made this book possible.

Arun V Gopalakrishnan has more than 9 years of experience in creating architecture, designing, and developing enterprise applications used in the domains of BFSI, supply chain management, and telecom businesses.

He graduated as a bachelor of technology in electronics and communications and holds a master's degree in software systems. Currently, he is playing the role of a software architect in designing and developing an enterprise middleware platform.

He is well versed in service-oriented, event-driven architectures and has experience in integrating jBPM with enterprise architecture. He is passionate about learning new technologies and improving his knowledge base and expertise in JEE, OOAD, SOA, EDA, expert systems, and distributed computing.

Along with this technical expertise, he enjoys engineering software applications and is an avid follower, practitioner, and mentor of agile and continuous delivery models. He believes in tools and is well versed in creating, using, and extending DevOps tools, such as Eclipse, Maven, Git, Gerrit, Jenkins, Sonar, JIRA, and MediaWiki, to enhance the efficiency of development teams.

First and foremost, I would like to thank the editors Vinay Argekar, Sweny Sukumaran, Tanmayee Patil, and Anand Singh for their immense support and help in getting this book ready for publishing. They made the process smooth and enjoyable and were patient and cheerful with those painful follow-ups when I missed deadlines. I would like to take this opportunity to thank the technical reviewers, Federico Weisse, Jerónimo Ginzburg, and Ruben Andres Ghio, for their feedback, which helped shape this book.

Authoring a book with an already tight regular job always calls for long weeks. Without my supportive family, I could not have taken yet another step in my career.

My mentors and colleagues were always my source of confidence and energy. I would like to thank them for the knowledge, experience, and goodwill that they share with me. It has always been great working with you.

Sincere gratitude goes to the open source community, particularly the jBPM community, which has supported me a lot in understanding technologies and tools. I am grateful for working with them and hope that their members will find this book useful!

To the Almighty, for surrounding me with these beautiful people and enjoyable opportunities.

About the Reviewers

Ruben Andres Ghio was born on June 5, 1981, under the zodiac sign of Gemini in the city of Quilmes, Argentina. When he was 2 years old, he moved to Villa Gesell, a small city over the sea. This place was his home for almost 11 years. After that, he returned to Buenos Aires, where he got a high school degree with a specialization in economics.

At the age of 22, he graduated as a system engineer from the National Technological University of Buenos Aires.

As a River Plate fan, Ruben has practiced a lot of different sports, but he has always had special feelings for his two favorites: tennis and soccer, which he still practices. You can follow him on Twitter at @rubenghio.

Ruben has been working with technology since 2002, starting as a Visual Basic developer for one of the most important banks in Argentina. After 2.5 years, he moved to one of the biggest technology companies in the world, where he started working as a Java developer, and after almost 3 years, he started to focus on his career as an IT architect, a skill he developed for the next 4 years. Currently, he is working as a senior IT architect at one of the biggest open source companies in the world, developing and building modern and innovative projects for government and private companies across Latin America.

I would like to thank my wife, who always supports me in all the things I do, suggesting, encouraging, and helping me out.

Jerónimo Ginzburg works at Red Hat as a senior architect in the consulting team. He has a computer science degree from the University of Buenos Aires (UBA) and over 15 years of experience in developing Java Enterprise applications. He is a strong believer in open source and agile software development. Jerónimo joined Red Hat in 2008 and, since then, has helped many Latin American companies adopt Drools and jBPM. He has co-written several software engineering articles published in refereed conferences and journals, and he was also the technical reviewer for the book jBPM Developer Guide, Packt Publishing.

I would like to thank my beautiful wife, Mariana, and my newborn son, Ramiro, for their love, patience, and support during this revision.

Federico Weisse was born in Buenos Aires, Argentina. He has over 15 years of expertise in the IT industry. In his career, he has worked with several technologies and programming languages, such as C, C++, ASP, and PHP; different relational databases (Oracle, SQL Server, DB2, and PostgreSQL); platforms (AS400, Unix, and Linux); and mainframe technologies.

In 2002, he adopted Java/J2EE as his main technology. He has been working with it since then and has become a specialist in this field. A couple of years later, he got involved with BPM systems and has been working with JBPM since 2009.

Nowadays, he is a J2EE architect at one of the most important healthcare providers in Argentina.

www.PacktPub.com

Support files, eBooks, discount offers, and more

For support files and downloads related to your book, please visit www.PacktPub.com.

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at <[email protected]> for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

https://www2.packtpub.com/books/subscription/packtlib

Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.

Why subscribe?

Fully searchable across every book published by PacktCopy and paste, print, and bookmark contentOn demand and accessible via a web browser

Free access for Packt account holders

If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view 9 entirely free books. Simply use your login credentials for immediate access.

Preface

jBPM is a leading open source BPM and workflow platform whose development is sponsored by Red Hat under Apache Software License (ASL) licensing. The jBPM product has been around for almost 10 years; its strongest points rely on flexibility, extensibility, and lightness, and it is a modular, cross-platform pure Java engine that is BPMN2 compliant.

It features a robust management console and development tools that support the user during the business process life cycle: development, deployment, and versioning. It integrates with widely-adopted frameworks and technologies (SOAP, REST, Spring, Java EE CDI, and OSGi) and provides off-the-shelf support to Git and Maven.

It fits into different system architectures and can be deployed as a full-fledged web application or as a service; it can be tightly embedded into a classical desktop application or loosely integrated into a complex event-driven architecture. In its default configuration, jBPM can be hosted by the enterprise class application server Red Hat EAP 6.x or the bleeding-edge Red Hat WildFly 8 server.

Mastering JBPM6 takes you through a practical approach to using and extending jBPM 6.2. This book provides a detailed jBPM 6.2 overview; it covers the BPM notation supported by the engine and explains the advanced engine and API topics focusing, as much as possible, on several working practical examples.

The book presents the user with solutions to common real-time issues like BAM (which stands for business activity monitoring) and production scenarios.

What this book covers

Chapter 1, Business Process Modeling – Bridging Business and Technology, gives the user an overview of the BPM environment, introduces the jBPM world and give insight to the big picture of business logic integrated platform.

Chapter 2, Building Your First BPM Application, starts by taking the user straight to the jBPM tool stack by providing the reader with a hands-on product installation and configuration tutorial, and then, it tackles beginner topics such as business process modeling and deployment.

Chapter 3, Working with the Process Designer, digs deep into web-based jBPM tools to illustrate to the user the main jBPM web designer features: user forms, scripting, and process simulation.

Chapter 4, Operation Management, describes the new jBPM artifacts architecture, focusing on Maven repositories (modules and deployment), engine auditing and logging analysis, jobs scheduling, and a full working BAM customization example (with Dashboard integration).

Chapter 5, BPMN Constructs, illustrates the BPMN2 constructs implemented by jBPM and provides insights and caveats about their usage by commenting a contextually ready-to-use source code example.

Chapter 6, Core Architecture, covers all the jBPM modules (for example, human task service, persistence, auditing, and configuration) by elaborating on how to leverage engine functionalities with the help of several source code examples.

Chapter 7, Customizing and Extending jBPM, explores engine customization areas with a practical approach; it provides the user with explanations on how to customize persistence, human task service, marshalling mechanism and the work item handler architecture.

Chapter 8, Integrating jBPM with Enterprise Architecture, describes how jBPM can integrate with external applications through SOAP, REST, or JMS either as a client or a server. It offers insights on how to leverage its services in a Java EE application.

Chapter 9, jBPM in Production, explores the jBPM system features when dealing with service availability, scalability, and security; it provides tips and techniques related to engine performance tuning in production environments.

Appendix A, The Future, briefly details the trends and future of Business Process Modeling.

Appendix B, jBPM BPMN Constructs Reference, is a quick reference for the BPMN constructs supported by jBPM.

What you need for this book

You will need the following software to be installed before running the code examples:

jBPM requires JDK 6 or a higher version. JDK 6 or newer versions can be downloaded from http://www.oracle.com/technetwork/java/javase/downloads/index.html. There are installation instructions on this page as well. To verify that your installation was successful, run java –version on the command line.

Download jbpm-6.2.0.Final-installer-full.zip from http://sourceforge.net/projects/jbpm/files/jBPM%206/jbpm-6.2.0.Final/. Just unzip it in a folder of your choice. The user guide (http://docs.jboss.org/jbpm/v6.2/userguide/jBPMInstaller.html) includes instructions on how to get started in a simple and quick manner.

The jBPM setup requires Ant 1.7 or later (http://ant.apache.org/srcdownload.cgi).

The additional required software is as follows:

Git 1.9 or later (http://git-scm.com/downloads)Maven 3.2.3 or later (http://maven.apache.org/download.cgi)

The preferred development IDE to run the examples is the Eclipse Kepler distribution, which can be automatically downloaded and pre-configured with the BPMN installation process.

Who this book is for

This book is primarily intended for jBPM developers, business analysts, and process modelers, and, to some extent, for project managers who must be exposed to the jBPM platform features. The book assumes that you have prior knowledge of business analysis and modeling, and, of course, Java; basic knowledge of jBPM is also required.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to <[email protected]>, and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at <[email protected]> with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at <[email protected]> if you are having a problem with any aspect of the book, and we will do our best to address it.

Chapter 1. Business Process Modeling – Bridging Business and Technology

"All business does IT" (Information Technology). This was a superlative but a futuristically interesting tweet I came across recently. The impact of information technology on business in recent years has been overwhelming. They are like two large galaxies in our universe, colliding and merging. The current state of this merger can be defined by one term - collaboration. Businesspeople collaborate with information technology (IT) people and use IT services to continuously improve and deliver commercially viable and profitable product/services to their customers.

Collaboration quintessentially needs effective communication, and Business Process Modeling smoothly fits into this scenario. Business process modeling is not new; business people have always used it. Models were developed in mind, and then, they were written down as text or depicted as diagrams. With IT embracing business, these models evolved into standard flow charts and activity diagrams. However, there was ambiguity; the diagrams and text provided by business as requirements were interpreted by the technical people and they had their own representation, architectural models, requirement documents, and design. This was duplication of effort and people, intensive, often with a line of meetings between business stakeholders and information technologists negotiating, and arriving at conclusions about the business requirements. This being the scenario, what improvement does business process modeling bring to the table? Business process modeling brings in the concept of a common artifact between business and information technologists.

Business models are prepared by business analysts and shared with technologists. They collaborate and improve on the model and arrive at an artifact that is executable. Further, technologists as always reduce their work by automating their involvement; that is, we are moving largely to software systems where business people can configure the business process and execute it without the intervention of an information technologist.

Concluding the philosophy, let us jump to the larger context of Business Process Management (BPM) and discuss it in detail. This chapter covers the following concepts:

Business process management conceptsThe standard – business process model and notation (BPMN 2.0)Use cases of BPM as applied in the industryDesign patterns in the BPM worldA brief introduction to jBPMBusiness logic integration platform, the bigger picture

Business process management

BPM involves the designing, modeling, executing, monitoring, and optimizing of business processes. A specialized software system that helps achieve these objectives completely is called Business Process Management System (BPMS). Most of the IT infrastructure used in business is in fact part of one or more business processes, and a BPMS should have the capability to manage the complete life cycle of a business management process. Further, jBPM provides a complete BPMS.

A business process consists of a set of activities, organized to complete a specific business objective, which varies from creating a product to delivering a service. A business process model also provides a visual representation of the business processes. The activities in a business process (also called tasks) are connected to represent the execution flow of a business process; further, these activities can be categorized.

jBPM helps its users to define and model business processes by using its process designers. Business users can in fact design the business process online, and efficient versioning and history capabilities help in making the activity of modeling business processes collaborative. There are provisions to simulate how a business process might behave during runtime. jBPM also provides capabilities to migrate the process definition to an updated version when business changes stipulate process improvements.

The defined business process models are deployed to BPM software, where instances of these process definitions are created to execute the process. jBPM provides the capability of executing business processes and has complete operation management capabilities such as tracking, controlling, and maintaining the history of the life cycle of all process instances.

Human interaction management

An important concept that we need to discuss in detail while explaining BPMS is Human Interaction Management (HIM). The activities that form business processes can be broadly classified into automatic and manual. Automatic activities are those that can be completed by the software system without any manual intervention. For example, in a banking transaction process, the customer has to provide the details of the transaction, such as the bank account number to which the money needs to be transferred and the amount to be credited into this account. This is a manual activity. In contrast, if an SMS alert needs to be sent to the customer's mobile as part of this process, no manual intervention is needed; the software can fetch the mobile number registered with the customer's account and send the SMS automatically. An SMS alert is an automatic activity in the banking transaction process.

Therefore, human tasks are in fact human interactions in the business processes or, in a broader sense, human interactions with the software system in place. Usually, human activities are physical tasks that are performed outside the software system and the results or conclusions are then fed as input into the software system. Technically, from the perspective of the system, we can say that the associated human activities would provide an input to the business process and there would be scenarios where the business process would be able to continue only after manual decisions. For example, in a banking transaction business process, the customer has to provide a one-time password to continue the process.

A Human Interaction Management System (HIMS) should have the capability to handle the life cycle of a human activity, which includes notifying the users who are associated with the activity, collecting information or results from the users, and keeping track of the history of the tasks. The information collected from human interactions is used in process execution and decision making. jBPM has an in-built human task service and can be integrated with any other HIMS. The in-built human task service of jBPM is in compliance with the WS-Human Task specification.

jBPM also provides a form modeling feature that helps business analysts to design user interface forms that can be attached to the jBPM user task, using which information about the completion of the user task (if any) can be collected.

Business activity monitoring

Business Activity Monitoring (BAM) provides online monitoring capabilities for business activities and enables businesses to arrive at key performance pointers by slicing and dicing the activity event data. BAM refers to a general software system that can monitor business processes, but attaching BAM with a BPM-based software system is relatively easy and powerful. In general, BAM software has the capability to show business data using dashboards, enabling business users to create customer reports and charts for performance indicators and trend analysis.

The jBPM core engine stores the process and task history and provides APIs to perform the BAM operations. Further, the jBPM tooling includes the dashboard builder, which enables its users to create custom dashboards from the business process history.

Consider a banking transaction process where a customer carries out a transaction from his/her account to another account. By analyzing the process history logs, the business user can create trend analysis reports of the peak hours of the day at which the maximum number of transactions took place. This analysis can be used to optimize related IT costs.

Another more frequent use case where BAM is applied is the optimization of a business process by avoiding process bottlenecks. Process bottlenecks can be caused by various problems including resource shortage (insufficient supply of staff) or a system not performing up-to-the-mark. A resource shortage problem would be quite obvious, but a system inefficiency may not be very apparent. For example, suppose that the One-Time Password (OTP) activity in a banking transaction process is often delayed. Let us say it takes more than one minute, which prompts users to perform the transaction again (or use the resend option) and leads to customer dissatisfaction. This also leads to wastage of resources by sending multiple OTPs; in other words, a delayed OTP confuses the customer and the bank further loses its credibility. Such issues are often noticed by banks when diligent customers notify them about the issues. BAMs can make the corrections of these issues more proactive, leading to increased customer satisfaction.

Business process simulation

Business process simulation provides the business user with the ability to see how the business process model created by them would work during runtime. Simulation is a term that goes hand-in-hand with modeling. A model designer would really love to have a simulator to test his model and understand the runtime impacts of his/her model. Business process simulation is the capability to analyze the runtime behavior of business processes. It helps in the optimization of business process models for quality, performance, and resource utilization.

Comparing business process simulation with the more regular models of testing these processes, we find that the user has to manually test these processes after deploying them in a Quality Assurance (QA) environment. Further, for automated verification, the user would have to rely on a programmer to script the automated test cases. In both cases, the process of verification is not carried out locally with the modeling process and delayed results mean iterations for corrections, adding to the cost of process improvements.

Business process simulation provides business users with the ability to see how the business process model created by them would work during runtime. The users can provide the simulation information, which includes the input to the processes, interrupts, and resource information to be used in the simulation mode. While executing the simulation, the software collects the statistical information about the running process, and this information can be analyzed by the users to optimize their business model.

jBPM is an early adopter and implementer of the Business Process Simulation Interchange Standard (BPSim). BPSim provides a standardized specification that allows business process models to be analyzed using a computer interpretable representation or a meta model. Using jBPM, the end user can provide the metadata for simulation by using the process designer and execute simulations to view the execution paths and the performance metrics associated with the various execution paths.

The business process model and notation

Business Process Model and Notation (BPMN) is the widely accepted standard for business process modeling and provides a graphical notation for specifying business processes in a Business Process Diagram (BPD). It is based on a flowcharting technique very similar to the activity diagrams of Unified Modeling Language (UML). BPMN is maintained by Object Management Group (OMG), and the current version is 2.0 (released in March 2011).

The primary goal of BPMN is to provide a standard notation readily understandable by business stakeholders. These include business analysts who create and refine the processes, technical developers responsible for implementing these processes, and operation managers who monitor and manage the processes. Consequently, BPMN serves as a common language, bridging the communication gap that frequently occurs between business process design and implementation. BPMN also serves as a communication medium between organizations who partner for achieving common business goals, to share functional processes and procedures.

One of the main differences between BPMN and other process definition standards such as Business Process Execution Language (BPEL) is that BPMN supports human interaction. Human interaction support provides completeness to business process modeling, as humans are the primary actors in any business organization. Being a specification of visual programming notations, BPMN places considerable emphasis on diagrammatic representations of the elements of the business process model. So, a reader of a BPMN diagram can easily recognize the basic type of elements and understand the business process. BPMN conformance ensures a common visual representation, although it allows variations without dramatically changing the basic look and feel of the diagram.

The detailed explanation of the BPMN 2.0 specification can be found in the specification document.

Note

BPMN specification documents can be found at http://www.bpmn.org/.

Conformance to standard BPMN specification defines four types of conformance:

Process modeling conformance: Tools claiming conformance must support BPMN core elements, human interactions, pools, and message flows.Process execution conformance: Tools claiming conformance must support and interpret operational semantics and activity life cycle as stated in the specification.BPEL process execution conformance: A special type of process execution conformance that supports BPMN mapping to WS-BPEL.Choreography modeling conformance: Tools claiming conformance must support choreography diagrams and their elements. Choreography diagrams focus on the collaboration of different groups in activities and the message flow between them.

A jBPM implementation partially claims the first two types of conformance, namely process modeling conformance and process execution conformance. Although jBPM supports all core elements in process modeling, it does not support all the elements described in the specification.

Core elements

The chief constituents of a BPMN diagram, BPMN elements, can be broadly classified into five categories:

Flow Objects: These objects define the behavior of a business processData: This represents the data associated in the business processConnecting Objects: These objects are used to connect the flow objects to each otherSwimlanes: This is used to categorize the flow objectsArtifacts: These provide additional information about the process

Flow Objects

Flow objects are the meat of BPMN; they are used to define how the business process would behave. The following are the major types of flow objects:

Events: An event is something that happens in the course of a business process. These events affect the flow of the model and usually have a trigger for and an impact on the business process. Some examples of events are Start, Stop, and Error. A Start event triggers the start of a process instance and is triggered using an explicit trigger, a message, or a timer. Events can be either signaled from a process (thrown) or can be waited upon (catch).Activities: Activities are actions performed within a business process. They can be either atomic (called Tasks) or compound (Sub-processes). An example of an activity is a user task or a service task. A user task indicates a human interaction and the action has to be taken manually to complete this task. A task can be complete upon being triggered or can wait for completion (a wait state); for example, a service task is triggered and completed, while a human task is triggered and waited upon for a user to complete the action.Gateways: Gateways are used as controllers for the branching, merging, forking, and joining of execution paths within a business process. An example is the parallel gateway, which can be used to split the execution path into multiple outgoing branches, with all outgoing branches activated simultaneously. Parallel gateways can also be used to merge branches; they wait for the completion of all incoming branches to complete before triggering the outgoing flow.

Data

Business process execution results in the production of data; for example, in the banking transaction process, the transaction details are data provided by the user regarding the transaction. This data would have to be saved or transferred to another activity for further processing. The following elements are the core of data modeling in BPMN.

Data Object: Data objects are data created as part of a business activity. They can be used for informational purposes to indicate that the activity produces such data.Data Input: Data inputs specify the input needed for an activity for its completion. For example, an OTP sending task in the banking transaction process would need the details of the customer to send the SMS. So, the input of this activity is mapped from the output of the previous activity or from data that is globally associated with the process instance.Data Output: Data outputs are data resulting from an activity that have to be mapped to a global process variable or to serve as input to a subsequent activity.Data Store: A data store provides a mechanism for activities to retrieve or update stored information that persists beyond the scope of the process.

Connecting Objects

Flow objects are connected to each other by using connecting objects. The following are the types of connecting objects:

Sequence Flows: A sequence flow is the basic element used to represent a connection. It is used to connect flow objects and defines the execution order of activities.Message Flows: Message flows are used to represent information flow across organizational boundaries (a group of activities within an organization or a department, or a role of users).Associations: Associations are used to represent the association of data or an artifact to a flow object.

Swimlanes

Swimlanes are a visual mechanism for organizing and categorizing activities and form the basis of cross-functional charts using BPMN. They represent an organization, a role or, a system. They are basically of the following two types:

Pools: A pool represents the higher-level categorization of