jBPM Developer Guide


Author(s): Mauricio Salatino
ISBN: 1847195687
Published: December 2009
Relevance: 4/5
Readability: 5/5
Overall: 4/5

More Packt Publishing Books Reviews …

A comfortable way to learn and work with jBPM and jPDL, letting you have a better idea about how apply BPM in your future projects. This book offer solid basis for beginners in jBPM.

Furthermore you going to read a good amount but not overloading theory and a lot of valuables images to get an excellent understanding.

Therefore I recommend this book, even if cover a jBPM 3.x series.

This Book is available here

Chapter 01: Why Developers Need BPM?

Practically based in pure theory. We start with the section Business Process, why should I know about that? where the author offer an explanation about Business Process (BP) including a sample about the steps for A sequence of tasks that happen in a repeatable order. Something useful is the follow covering for executed by humans and/or systems which include an interesting explanation for a company in charge of recycling used paper, processing it, and storing, therefore the author offer us a detailed page about each task with its explanation, then we have an image about all these steps/activities in the prior described process related together.

A section called BPM stages is available too, based with descriptive theory for each stage and even more, a very important image to represent all these stages together. Therefore the author follow to cover BPM stages in a real-life scenario where the example of the previous company case is used here to explain how BPM works or fit in such situation about the company.

The covering for BPM improvements is available too which cover many areas, the most important would be:

  • Global understanding of our processes
  • Reduce paperwork
  • Real-time process information
  • Process information analysis

based in concrete theory.

The follow section is BPM and system integration history doing a brief covering for Workflows, Business process improvements and System integration furthermore doing mention about SOA (Service Oriented Architecture), BPEL (Business Process Execution Language), also known as WS-BPEL—Web Services BPEL, and ESB (Enterprise Service Bus). The follow part section is Some buzzwords that we are going to hear when people talk about BPM where is practically pure theory, including some terms like:

  • Theoretical definitions
    • Integration (system integration)
    • Workflow
    • Service Oriented Architecture (SOA)
    • Orchestration
  • Technological terms
    • Workflow
    • Enterprise Service Bus (ESB)
    • BPEL (WS-BPEL)

Chapter 02: jBPM for Developers

Here we start quickly with the section Graph Oriented Programming almost of one page about pure concrete theory. Then we follow with the section Common development process, based in well theory and including an interesting image about Development Process which includes these steps:

  • Requirements
  • Analysis and Design
  • Implementation
  • Test

the image is practically understandable by itself, the author includes too concrete theory the follow:

  • Database model
  • Business logic
  • User interfaces

The follow section is Decoupling processes from our applications starting quickly with an image about Implementation but inside of this image the author did a question about Where do Business Processes fit here?, the answer appear in other image almost equals like the previous shown but changed about including BPM System. Both images are practically understandable by themselves. Of course that each image has its respective explanation to complete the idea.

Other section available is Implementing Graph Oriented Programming on top of the Java language… where the author create and shown some of his own Java implementation of important components in this world about BPM, like Nodes, Definition, Transition, Execution. The code is tested for execution purposes of course. A good amount of pages for all these ideas are available, interesting covering.

Other section available is Creating a simple language where the author shown us an image about a specific model process using start, action, human decision and end components and of course the author explain each one of them, then the author working with his sub sections Stage one, Two, Three proceed in given us an excellent explanation of how the process flow happens, here you have a better idea about some events like, start, enter, execute and leave.

Chapter 03: Setting Up Our Tools

Here we start with the section Background about the jBPM project which offer an image practically in one page about the middleware projects that JBoss is developing (all open source), listing and explaining the most important like JBoss Web, JBoss EJB3, Hibernate and covering too JBoss Drools JBoss ESB.

The author cover too JBoss jBPM including an image about component distribution inside the jBPM framework project, to complement the idea, covering too about Supported languages, therefore doing mention about jBPM Process Definition Language (jPDL) and Business Process Execution Language (BPEL), even more, the author cover too Other modules listing and explaing each element like:

  • Graphical Process Designer (GPD)
  • Identity
  • Task ManaGeMenT (TaskMGMT)
  • Enterprise

We follow with an image about how jBPM could be deployed on a web server or an application server.

Ok,now is turn to use more software, then we have the section Tools and software Starting with Maven, even including a simple pom.xml file configuration, Maven installation is covered too. About Installing MySQL and Downloading MySQL JConnector (using Maven) is covered too. Eclipse IDE section is available too,
even including Install Maven support for Eclipse.

The important section is Starting with jBPM where the author teaches us about Getting jBPM (binary, and later from source), be aware that the author does reference to jBPM 3.2.6 SP1,out of date!, right now we have available jBPM the version 4.3, therefore the follow that explain the author about the structure directory of jBPM not match well, but anyway we have available config, database, designer,docs etc directories.

To be honest I dont like this part of the book, explicitly instructions about how install jBPM not appear, I mean this depends strongly only with Maven, where a command output execution is shown, even in Internet instructions for installation for jBPM 4.x is totally different from the material offered by the author,and worst in jPBM official documentation installation instructions use ant,so you are adviced!, this not means that the book be bad.

The follow section is Eclipse Plugin Project/GPD Introduction, well explained, including images, after this, GPD Project structure is covered too.

The author offer too a sample code about SimpleProcessTest, including ProcessDefinition, ProcessInstance and then use JUnit. Graphical Process Editor is available too, where the author explain some parts like:

  • Diagram tab (an image is available about a simple process)
  • Deployment
  • Source (an image is available showing the jPDL code for simple process mentioned)
  • Properties panel

To end the section the author offer Maven project section, listing some commands and explaining them, here we work with Maven and Eclipse, doing mention too about the Q4E plugin, and proceed to execute the sample code mentioned about SimpleProcessTest and the output execution is shown.

Chapter 04: jPDL Language

Starting with the section jPDL introduction, well covered, doing mention about processdefinition.xml file,which is used for our jPDL definition process, other file mentioned is GPD.xml which it only contains the positions of all the elements of our process(graph geometry).

The follow section is jPDL structure based in its explanation of course, but including an image for a better understanding about this structure. The follow section is Process structure which does mention about processdefinition.xml content, including some snippet code, now for its sub sections they are based in concrete theory and snippet code

  • GraphElement information and behavior
  • NodeCollection methods
  • ProcessDefinition properties (including a table about some important properties like Node startState, nodes, nodesMap etc)
  • Functional capabilities (including static final String[] supportedEventTypes definition)

The follow section is Nodes inside our processes doing mention about process-definition tag, and doing mention about jPDL which contains twelve words/nodes, all these represented in an image about its dependency relation, here we have a sub section called ProcessDefinition parsing process which contains an interesting image about the closely relation about processdefinition.xml and GPD.xml

We turn to the section Base node based in its respective theory and including the node image representation in the GPD plugin, even including other images about how interact with node with the GPD plugin, the jPDL snippet code generated by the plugin is shown too. (this representation not appear in jBPM 4.3)

A section very interesting is Node lifecycle (events) showing us an important image about events points like NODE_ENTER, NODE_LEAVE, BEFORE_SIGNAL, and AFTER_SIGNAL. Therefore you know how fit each event in the process, the follow sub sections are covered with concrete theory, snippet code and some images

  • Constructors
  • Managing transitions/relationships with other nodes
  • Runtime behavior

And for each element in the follow list, the author includes its respective theory, images about GPD representation for each one and how interact with each component, and the snippet jPDL code generated by GPD plugin). But the way some of these icon representation are different against jBPM 4.3, but they are equivalent of course according with the name.

  • StartState: starting our processes
  • EndState: finishing our processes
  • State: wait for an external event
  • Decision: making automatic decisions
  • Transitions: joining all my nodes

A huge amount of pages covering these components exists. Therefore to end the chapter the sub section Executing our processes is available, some snippet code are included, but no output execution.

Chapter 05: Getting Your Hands Dirty with jPDL

This chapter is based about a recruiting example, therefore the author start quickly with some sections, based in pure theory

  • How is this example structured?
  • Key points that you need to remember

Then the section Analyzing business requirements is available based in pure theory, for these three previous sections the theory should to be keep it in mind. Then we follow with the sub section Business requirements, well covered, showing us a list very interesting about some activities for our example, explaining each one.

  • Initial interview
  • Technical interview
  • Medical checkups
  • Final acceptance

After this, an image (first) about the representation of the previous list is included (sequential approach used), followed by an important image (second) about a process transformation about: verbal description from the manager to hand Sketch of the process to jPDL/XML is included, here you can see how the example description could be understand it for different persons, furthermore an image (third) of our initial sequential process is now available but in jPDL representation. Therefore the author explain very well each process transformation (shown in second image ) using the list and the two previous images (first and third).

Then the follow sub section is Analyzing the proposed formal definition where the author gives us some tips and expansion about the verbal requirements (based in new questions and its answers) really well covered in my opinion, therefore the last sub section is Refactoring our previously defined process, where the author gives us now an image about the new re-factored jPDL representation (almost one page for this image), including now decision, fork/join components, then the author proceed to explain the most important parts of this more complete jPDL representation, extracting many snippet images (component parts) from the original complete jPDL representation, and explaining the reason of the things, practically four pages available. I like this approach.

Other section called Describing how the job position is requested is available based in almost pure well theory and two images.

We have the section Environment possibilities including the follow sub sections, based in concrete theory and clever images for a better understanding.

  • Standalone application with jBPM embedded
  • Web application with jBPM dependency

The last section is Running the recruiting example based in pure theory an not output execution.

Chapter 06: Persistence

We start with the section Why do we need persistence? based in a concrete theory and well explained, this section has a long expansion covering the follow subsections

  • Disambiguate an old myth (short and concrete theory doing mention to BPM Engine)
  • Framework/process interaction (starting quickly with a simple image about a process sequence and explaining very well for each state,about what happen, then other image is included based in the previous one but showing the important points where the Database innteraction happen, excellent image)
  • Process and database perspective (based in many images about .class, .xml, .hbm, and some some nodes (automatic, wait) working with the database )
  • Different tasks, different sessions (covering many concepts, like TaskMgmtSession, GraphSession, LoggingSession , JobSession)
  • Configuring the persistence service (covering and showing snippet code for jbpm.cfg.xml and hibernate.cfg.xml, well explained its parts)
  • How is the framework configured at runtime? (based in short an concrete theory)
  • Configuring transactions (doing mention about User Managed Transactions where afterwards it is expanded in theory and a simple jPDL snippet code, User Managed Transactions and images for a better understanding, What changes if we decide to use CMT? is covered too based in pure theory)
  • Some Hibernate configurations that can help you (doing an explaining some properties like hibernate.show_sql,hibernate.format.sql and hibernate.ddl2sql.auto)
  • Hibernate caching strategies (short and concrete theory)
  • Two examples and two scenarios (based with Swing standalone and E3B, snippet code available)

Chapter 07: Human Tasks

We have the section What is a task? explaining it and doing mention about its elements (Input data, Assigned user, Action, Output data) and including two images for complement the idea. The follow section is Task management module listing and covering:

  • Represent process that include human interactions
  • Analyze and improve the way humans achieve business goals
  • Humans will be guided by the processes

Then we follow with the subsection Handling human tasks in jBPM where the Task Node is introduced, including its image used in GPD and properties, furthermore including a jPDL snippet code and an image about how many Task nodes are chaining and all these within a Task Node. The follow sub section is Task node and task behavior based in theory and including an image about the relation about Task with Task Instance, the author cover too (mostly explaining properties):

  • TaskNode.java
  • Task.java
  • TaskInstance.java

The follow section is Task node example covering the sub sections:

  • Business scenario (about a bank with a process to withdraw money or jewels from the vault, including many images about the node and the actors working, you can see how the logic change in some way and how new actors appear, furthermore signal values attributes are listed and explained, used by task-node tag, even including a sub topic like Assigning humans to tasks as others )
  • Managing our tasks (including jPDL code and an image for the real scenario)

The follow section is Practical example where configuration using jbpm.cfg.xml and hibernate.cfg.xml are available, even Java code working with JbpmContext and Query are available too, all these and other things covered in these steps:

  1. Create DB schema
  2. Insert some users
  3. Deploy process definition
  4. Create new process instance

Other files like:

  • userScreen.jsp
  • UserScreenController.java
  • taskCheckDeviceForm.jsp
  • TaskFormController.java

are covered too, no output execution results available.

Chapter 08: Persistence and Human Tasks in the Real World

We start with the section Adding persistence configuration doing mention about two files need it jbpm.cfg.xml and hibernate.cfg.xml and explaining each one, we turn to the sub section Using our new configurations where we have a good amount of Java snippet code, these working with JbpmConfiguration, JbpmContext and ProcessInstance, well covered, afterwards of this we have a testing method. Then we follow with the sub section Safe points where the author shown us in almost one page Java code working with jBPM of course but doing emphasis about config.createJbpmContext() and context.close() which both demarcate transactions, both written first at the beginning and end of such code respectively, other version of this same code is available but putting these config.createJbpmContext() and context.close() key codes in specific strategics places, therefore you can see how is very important decide and know where put the demarcate transactions, even more two images showing us each approach are available for a better understanding, really well done!. We have other sub section called Advantages of persisting our process during wait states showing us another important image with its respective explanation about the theme. we have yet another sub section Persistence in the Recruiting Process example based in pure theory.

Then the follow section is Human tasks in our Recruiting Process where after to did an introduction we have the follow sub topics

  • Modifying our process definitions (based in steps instructions )
  • Analyzing which nodes will change (based in pure theory)
  • Modified process definitions (based in theory and two snippet code about task-node tag)
  • Variable mappings (important theory and an image showing the difference about the scopes of the variables in Process Instance Scope and Task Instance Scope, showing afterwards an important jPDL snippet code about the follow tags task-node , controller and variable and for this last using the attribute access (working with read,write,required values) and name attribute)
  • Task assignments (based in theory and an image about the relationship among roles, groups, and users, even other important image about many actors working in two processes are available, where afterwards each actor is listed and explained, well approach, furthermore here we have a sub topic called Assignments in the Recruiting Process example based in many jPDL and Java snippet code)

Chapter 09: Handling Information

Here we start with the section Handling information in jBPM which cover about process variables and its respective classification like A simple piece of information , A business key and Temporal information, then the author introduce a situation example about business process in a telephone company, where the author shown an image almost in one page about the process itself with the actors and even including to the right side of each node the process variables related. We have a sub section called Two simple approaches to handle information listing and explaining Use model objects and Use primitive properties.

We turn to the section Handling process variables through the API covering the sub topics:

  • ContextInstance proposed APIs (which covers Create and set information variables, Get the variables information, Query variables status and Delete variables)
  • ExecutionContext proposed APIs (based in theory)
  • Telephone company example ( based in an image for a jPDL process and one page for the jPDL process definition for such image, a table discussion about Strategies to store information is available too)
  • Storing primitive types as process variables (based in concrete theory)

Now we turn to the section How and where is all this contextual information stored? doing mention about to have care for Data duplication, Extreme query generation/systems interactions and Complex data structures, furthermore covering the follow sub sections:

  • How are the process variables persisted? (based in theory and listing the supported type variables and including an important image about the steps that a variable in a process will take in order to be persisted, furthermore listing and explaining the follow matchers ClassNameMatcher, HibernateLongIDMatcher, HibernateStringIDMatcher and SerializableMatcher)
  • Understanding the process information ( covering the sub topics:)
    • Types of information (which listing and explain three main groups, valuable theory for these in two pages, including a table discussion called Note about information classification )
    • Variables hierarchy (including an important image about the fork node and how for each child node some variables has a different access against the father, very interesting)
    • Accessing variables (based in theory and showing jPDL snippet code working with #{} )
  • Testing our PhoneLineProcess example (showing a hibernate.cfg.xml snippet code and an image about a SQL output query results and including a sub topic Storing Hibernate entities variables based in concrete theory and hbm file.)

Chapter 10: Going Deeply into the Advanced Features of jPDL

The first section is Why do we need more nodes? where after the introduction we have the covering for the sub section Fork/join nodes based in explanation for each one and important images about how work with them and the behavior of the children node, valuable explanation for the images, even including Java and jPDL snippet code, practically four pages for both nodes. The follow sub section is Modeling behavior which starts with an interesting image practically fitted in almost one page about a process, including Fork/join nodes, states and more nodes, even a snippet code for the class ProcessTest is included where you can see how the author apply the control to signal() method events, explanation for this approach available too.

Other sub section available is Super state node where after of a concrete introduction an image about of many nodes related among them but enclosed within of phases is available, now you can see the idea, even other image of the same appreciation that the previous one but closely applied with the GDP is available, well appreciation, furthermore jPDL code to complement this topic is included too. For this sub section we have sub topics like:

  • Phase-to-node interaction
  • Node in a phase-to-phase interaction
  • Node-to-node interaction between phases
  • Complex situations with super state nodes
  • Navigation

All these based with important images and its respective explanation, really well covered, here you learn other
perspective of the things.

Other sub section is Process state node based in important theory and two images working with this node, explanation about variable mapping between the parent process and the sub-process is covered too, really well covered, even including very important images to see how work this logic, based in (read, write, required strategies). The last sub section here is The e-mail node based in concrete theory and in a snippet code.

The last section is Advanced configurations in jPDL covering the follow sub topics:

  • Starting a process instance with a human task (based in pure theory and a simple snippet code)
  • Reusing actions, decisions, and assignment handlers (covering the follow sub topics)
    • Properties
    • Bean
    • Constructor
    • Compatibility

    Mostly based in concrete theory and Java and jPDL snippet code

Chapter 11: Advanced Topics in Practice

The first section is Breaking our recruiting process into phases where we have an image about our process at a higher level, and then the author offers us a very important image shown practically in one page, our process represented or edited with GPD working with super state, well approach and valuable image really, furthermore we have the jPDL snippet code representaction for this process.

The follow section is Keeping our process goal focused with process state nodes where the author shown again the previous image but without super state and using a new node called ProcessState. Then the author cover the sub section What exactly does this change mean? based about its respective explanation and an image for a better understanding. Other sub section available is Sharing information between processes based in concrete theory and covering the sub topic Create WorkStation binding which it include a snippet code for the process-state tag and an image about when a parent process reaches a process state.

Important is the follow section Asynchronous executions covering the follow sub sections:

  • Synchronous way of executing things (based in many important images covering this topic and its respective explanation of course, the author share the possible disadvantages with this approach)
  • The asynchronous approach (showing an important image about this approach, well explained by itself, furthermore a snippet code working with the node tag using the async attribute is available too)
  • What happens if our server crashes? (based in many valuables images with its respective explanation)
  • Configuring and starting the asynchronous JobExecutor service (showing a snippet code about the bean tag used within jbpm.cfg.xml file, and some Java snippet code)
  • Different situations where asynchronous nodes can be placed (based in an image about a process definition where after the author offer us a long table with two columns Application thread and JobExecutor service thread where you can see how each node (Async, WaitState, Auto) fit and work in its respective column according its type, well covered, even other image about a GPD modeled process definition is available, furthermore including a Java testing snippet code with its respective explanation, well covered)

Chapter 12: Going Enterprise

We start with the section jBPM configurations for Java EE environments doing mention about JTA, EJB, UMT and CMT, and image about working with a EJB Container. The follow section is JBoss Application Server data source configurations showing code about jbpm-mysql-ds.xml and hibernate.cfg.xml, here the sub section Taking advantage of the JTA capabilities in JBoss is available including jbpm.cfg.xml content, the other sub section is Enterprise components architecture including an image about a Application Server with many components. The last section is The CommandServiceBean based in an image about this name pattern including Java snippet code.

The follow section is JobExecutor service where after of its respective theory cover the sub section JobExecutor service for Java EE environments” including an image about Stateless Session, Bean JMS Message, JBPM JMS Queue working together.

We turn to the section Timers and reminders including an image and its respective explanation, jPDL snippet code available, even GPD included too. the follow sub topics are included too.

  • Mail service
  • Calendar
  • Timers
  • How do the timers and reminders work?

Based mostly in important images and snippet code, many pages for theses themes.


More Packt Publishing Books Reviews …


One thought on “jBPM Developer Guide

Comments are closed.