Difference between revisions of "Process modelling"
(15 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
* Nodes | * Nodes | ||
* Transitions | * Transitions | ||
+ | * Actions | ||
+ | |||
+ | [[File:Workflow_example_simple.png|center]] | ||
To create a process definition in a graphical way, you can use jBPM Graphical Process Designer. This tool is packaged as a Eclipse plugin. | To create a process definition in a graphical way, you can use jBPM Graphical Process Designer. This tool is packaged as a Eclipse plugin. | ||
+ | |||
+ | For a more detailed description, please read [http://docs.jboss.com/jbpm/v3.2/userguide/html/ch09.html jBPM User Guide: Process Modeling]. Also is recommended to read: | ||
+ | |||
+ | * [http://www.mastertheboss.com/jbpm/106-jbpm-best-practices.html JBPM best practices] | ||
+ | * [http://www.mastertheboss.com/jbpm/75-jbpm-mail.html JBPM Mail delivery] | ||
== Nodes == | == Nodes == | ||
Line 14: | Line 22: | ||
=== Start node === | === Start node === | ||
+ | The start node defined the process entry point. Only one start node is permitted. | ||
+ | |||
[[File:Jbpm node start.png|center]] | [[File:Jbpm node start.png|center]] | ||
=== End node === | === End node === | ||
+ | End nodes define 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. | ||
+ | |||
[[File:Jbpm node end.png|center]] | [[File:Jbpm node end.png|center]] | ||
=== Task node === | === Task node === | ||
+ | A task node represents one or more tasks that are to be performed by humans. | ||
+ | |||
[[File:Jbpm node task.png|center]] | [[File:Jbpm node task.png|center]] | ||
=== Node node === | === Node node === | ||
+ | You can define the behaviour using a Action element, which will be executed when the process arrives to the node. | ||
+ | |||
[[File:Jbpm node node.png|center]] | [[File:Jbpm node node.png|center]] | ||
=== State node === | === State 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 usefull if the process should wait for an external system. | ||
+ | |||
[[File:Jbpm node state.png|center]] | [[File:Jbpm node state.png|center]] | ||
=== Decision node === | === Decision node === | ||
+ | There are 2 ways to model a decision. The distinction between the two is based on *who* is making the decision. | ||
+ | |||
+ | * When the decision is to be taken by the process, a decision node should be used. | ||
+ | |||
+ | * When the decision is taken by an external party, you should use multiple transitions leaving a state or wait state node. | ||
+ | |||
[[File:Jbpm node decision.png|center]] | [[File:Jbpm node decision.png|center]] | ||
=== Fork node === | === Fork node === | ||
+ | A fork node splits one path of execution into multiple concurrent paths of execution. | ||
+ | |||
[[File:Jbpm node fork.png|center]] | [[File:Jbpm node fork.png|center]] | ||
=== Join node === | === Join node === | ||
+ | The join node take all these concurrent executions before continue with the process execution. | ||
+ | |||
[[File:Jbpm node join.png|center]] | [[File:Jbpm node join.png|center]] | ||
+ | |||
+ | == Transitions == | ||
+ | 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 == | ||
+ | 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. | ||
+ | |||
+ | [[Category: Workflow Guide]] |
Latest revision as of 11:31, 3 December 2012
We are going to describe the elements which define a jBPM process. A process is composed by:
- Nodes
- Transitions
- Actions
To create a process definition in a graphical way, you can use jBPM Graphical Process Designer. This tool is packaged as a Eclipse plugin.
For a more detailed description, please read jBPM User Guide: Process Modeling. Also is recommended to read:
Nodes
The define 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:
Start node
The start node defined the process entry point. Only one start node is permitted.
End node
End nodes define 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.
Task node
A task node represents one or more tasks that are to be performed by humans.
Node node
You can define the behaviour using a Action element, which will be executed when the process arrives to the node.
State 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 usefull if the process should wait for an external system.
Decision node
There are 2 ways to model a decision. The distinction between the two is based on *who* is making the decision.
- When the decision is to be taken by the process, a decision node should be used.
- When the decision is taken by an external party, you should use multiple transitions leaving a state or wait state node.
Fork node
A fork node splits one path of execution into multiple concurrent paths of execution.
Join node
The join node take all these concurrent executions before continue with the process execution.
Transitions
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
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.