We are going to describe the elements which define a jBPM process. A process is composed by:
To create a process definition in a graphical way, you can use jBPM Graphical Process Designer.
This tool is packaged as an Eclipse plug-in. If you decide to use OpenKM Portable Development Environment this plug-in is already installed.
For a more detailed description, please read jBPM User Guide: Process Modeling. Also is recommended to read:
Defines the states of the process definition. They are connected by transitions. Both define the different path which can be followed in a running process definition. A running process definition is called process instance.
There are several types of nodes:
The start node defines the process entry point. Only one start node is permitted.
End nodes defines the end of the process execution. A process may have several end nodes. In this case the process finish when the process arrives to any of these end nodes.
A task node represents one or more tasks that are to be performed by humans.
You can define the behaviour using a Action element, which will be executed when the process arrives to the node.
A state is a bare-bones wait state. The difference with a task node is that no task instances will be created in any task list. This can be useful if the process should wait for an external system.
There are 2 ways to model a decision. The distinction between the two is based on *who* is making the decision.
A fork node splits one path of execution into multiple concurrent paths of execution.
The join node take all these concurrent executions before continue with the process execution.
Transitions have a source node and a destination node. The source node is represented with the property from and the destination node is represented by the property to. A transition can optionally have a name.
Actions are pieces of Java code that are executed upon events in the process execution. The main event types are entering a node, leaving a node and taking a transition.
Note the difference between an action that is placed in an event versus an action that is placed in a node:
- Actions that are put in an event are executed when the event fires. Actions on events have no way to influence the flow of control of the process.
- An action that is put on a node has the responsibility of propagating the execution.