Book Image

jBPM5 Developer Guide

By : Mauricio Salatino, Esteban Aliverti
Book Image

jBPM5 Developer Guide

By: Mauricio Salatino, Esteban Aliverti

Overview of this book

<p>jBPM5 is a well known open source Business Process Management System (BPMS) used for defining and executing business processes. Java developers can use jBPM5 to analyze, improve, and maintain business processes, which are integral to an organization’s management. This book guides you through each level of the jBPM5 platform, allowing you to model and build applications which will automate your business scenarios.<br /><br />The "jBPM5 Developer Guide" covers two important standard specifications that every software engineer must be familiar with; the BPMN2 specification and the WS-Human Tasks specification. BPMN2 defines a standard business language that will be used to model business scenarios throughout the book, and WS-Human Tasks will help you to define how real people execute the human elements of those processes. Both standard specifications are covered with in depth examples. Using these two specifications and understanding the BPM discipline will allow you to improve your software designs and guide successful implementations that will impact positively on performance. <br /><br />"jBPM5 Developer Guide" allows you to adopt quickly the BPM framework to help you achieve your business goals; reducing the amount of time that you need to master BPM concepts and all the individual components provided by the platform. The book is packed with applicable examples, BPM diagrams and step-by-step instructions to help you master jBPM5.</p>
Table of Contents (19 chapters)
jBPM5 Developer Guide
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

The jBPM5 Developer Guide book was written with the main goal of providing a comprehensive guide to understanding the main principles used by the jBPM project to build smarter applications using the power of business processes. This book covers important topics such as the BPMN 2.0 specification, the WS-HT specification, domain-specific constructs, and integration patterns. All these topics are covered with a technical perspective, which will help developers to adopt these technologies. The second half of the book is targeted at topics that are not usually covered by BPM systems. Topics such as business rules and complex event processing are introduced to demonstrate the power of mixing different business knowledge descriptions into one smarter platform.

What this book covers

Chapter 1, Why Do We Need Business Process Management?, covers an introduction to the BPM discipline. The content inside this chapter will guide you throughout the rest of the book, allowing you to understand why and how the jBPM project has been designed, and its constant evolution.

Chapter 2, BPM Systems Structure, goes in depth into understanding what the main pieces and components inside a Business Process Management System (BPMS) are. In this chapter, once we understand the basic concepts behind the BPM discipline, the concept of BPMS is introduced. The reader will find a deep and technical explanation about how a BPM system core can be built from scratch and how it will interact with the rest of the components in the BPMS infrastructure. This chapter also describes the intimate relationship between the Drools and jBPM projects, which is one of the key advantages of jBPM in comparison with all the other BPMSs.

Chapter 3, Using BPMN 2.0 to Model Business Scenarios, covers the main constructs used to model our business processes, guiding the reader through a set of examples that illustrate the most common modeling patterns. The BPMN 2.0 specification has become the de facto standard for modeling executable business processes since it was released in early 2011.

Chapter 4, Knowing Your Toolbox, gives an overview of all the tooling provided with jBPM 5.4.0.Final. This chapter describes each project feature and enumerates each project responsibility. This chapter also shows that different setups can be created, or components replaced, to fit into different scenarios.

Chapter 5, The Process Designer, covers a step-by-step tutorial on how to use the Web Process Designer provided by jBPM. The main idea behind this chapter is to help the user get comfortable with the modeling phase, providing in-depth examples of how to model our own business processes.

Chapter 6, Domain-specific Processes, covers the mechanisms provided by jBPM to extend the process diagrams and execution with domain-specific constructs, allowing the business and technical users to simpler and more and meaningful processes. One very important part of business processes is the ability to reflect how a company is doing its work.

Chapter 7, Human Interactions, covers in depth the Human Task service component inside jBPM. A a big feature of BPMS is the capability to coordinate human and system interactions. It also describes how to build a user interface using the concepts of task lists and task forms.

Chapter 8, Persistence and Transactions, covers the shared mechanisms between the Drools and jBPM projects used to store information and define transaction boundaries. When we want to support processes that coordinate systems and people over long periods of time, we need to understand how the process information will be persisted.

Chapter 9, Smart Processes Using Rules, gives a quick introduction to the Drools Rule Engine, and how we can use the inference power provided by Drools in conjunction with our business processes. Mixing business processes with business rules gives us the ultimate power to define advanced and complex scenarios.

Chapter 10, Reactive Processes Using Drools Fusion, covers the most important features of Drools Fusion, and how these features can be used to improve, monitor, and cover business situations that require temporal inferences. Drools Fusion adds the ability of temporal reasoning to the Drools Rule Engine.

Chapter 11, Architectural and Integration Tips, describes what the internal structure of our applications will look like, depending on the number of scenarios that we want to cover. A set of patterns is described in order to give the reader a comprehensive way to deal with different situations.

What you need for this book

This is a developer guide, and for that reason it is highly recommended that you read this book with a computer beside you, where you can try the examples and open, compile, and test the provided projects. The main idea behind the book is to get you up to speed in the development of applications or tooling that use jBPM, and for that reason this book spends a lot of time with code examples and unit tests to run.

Good programming skills are required to easily understand the examples presented in this book. Most of the chapters complement the covered topics with a set of executable Maven projects. A basic understanding of Maven, Java, and JUnit is required.

Who this book is for

This book is intended for Java developers and architects who want to start developing applications using jBPM. jBPM 5 is a very flexible framework; but with this flexibility comes architectural and design decisions that we need to make when we start using it. This book offers a complete reference to all of the components distributed with jBPM 5.4.0.Final community version, and it can be used as reference material to guide a team of developers in building efficient solutions using business processes, business rules, and complex event processing.

After reading this book, you will have a good understanding of jBPM 5 architecture and components. jBPM5 is a Red Hat lead open source community project and is fully supported through JBoss BRMS product. If you are interested in the BRMS Product you can find more details here: https://www.redhat.com/products/jbossenterprisemiddleware/business-rules/.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "We can include other contexts through the use of the include directive."

A block of code is set as follows:

public interface ProcessDefinition {
  public Map<Long, Task>getTasks();
  public void setTasks(Map<Long, Task> tasks);
  public void addTask(Long id, Task node);
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

public interface ProcessDefinition {
  public Map<Long, Task>getTasks();
  public void setTasks(Map<Long, Task> tasks);
  public void addTask(Long id, Task node);
}

Any command-line input or output is written as follows:

# cp /usr/src/asterisk-addons/configs/cdr_mysql.conf.sample
     /etc/asterisk/cdr_mysql.conf

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "clicking the Next button moves you to the next screen".

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

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 , 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 for all Packt books you have purchased from your account at http://www.PacktPub.com. 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 would 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/support, 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 on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

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 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 if you are having a problem with any aspect of the book, and we will do our best to address it.