jBPM User Guide
iii
....................................................................................................................................... vii
1. Overview ...................................................................................................................... 1
1.1. Modeling ............................................................................................................ 1
1.1.1. Drools Flow Eclipse Plugin for creating BPMN2 processes .......................... 1
1.1.2. New BPMN 2.0 Eclipse Plugin for creating BPMN2 processes ..................... 2
1.1.3. Web-based process modeling using Oryx Designer .................................... 3
1.2. Deployment ........................................................................................................ 4
1.3. Execution ........................................................................................................... 4
1.3.1. Process engine ........................................................................................ 4
1.3.2. Human task service ................................................................................. 6
1.4. Monitoring .......................................................................................................... 7
1.4.1. Web-based management console ............................................................. 8
2. Installer ...................................................................................................................... 11
2.1. Prerequisites ..................................................................................................... 11
2.2. Download the installer ....................................................................................... 11
2.3. Demo setup ...................................................................................................... 11
2.4. Using Eclipse Tooling ........................................................................................ 12
2.5. Using web management consoles ...................................................................... 13
2.6. Using Guvnor repository .................................................................................... 14
2.7. What to do if I encounter problems or have questions? ........................................ 15
2.8. Frequently asked questions ............................................................................... 15
3. Processes .................................................................................................................. 17
3.1. Creating a process ............................................................................................ 17
3.1.1. Using the graphical BPMN2 Editor .......................................................... 17
3.1.2. Defining processes using XML ................................................................ 18
3.1.3. Defining Processes Using the Process API .............................................. 20
3.2. Using a Process in Your Application .................................................................. 20
3.3. Detailed Explanation of the Different Node Types ............................................... 21
3.4. Data ................................................................................................................. 29
3.5. Constraints ....................................................................................................... 30
3.6. Actions ............................................................................................................. 31
3.7. Events .............................................................................................................. 32
3.8. Timers .............................................................................................................. 33
3.9. Updating processes .......................................................................................... 34
3.9.1. Process instance migration ..................................................................... 34
4. BPMN 2.0 ................................................................................................................... 37
4.1. Business Process Model and Notation (BPMN) 2.0 specification .......................... 37
4.2. Examples ......................................................................................................... 41
4.3. Supported elements / attributes ......................................................................... 42
5. API ............................................................................................................................. 47
5.1. The jBPM API .................................................................................................. 48
5.1.1. Knowledge Base .................................................................................... 48
5.1.2. Session ................................................................................................. 48
5.1.3. Events ................................................................................................... 51
jBPM User Guide
iv
5.2. Knowledge-based API ....................................................................................... 52
6. Human Tasks ............................................................................................................. 55
6.1. Human tasks inside processes .......................................................................... 55
6.1.1. Swimlanes ............................................................................................. 58
6.2. Human task management component ................................................................ 59
6.2.1. Task life cycle ........................................................................................ 59
6.2.2. Linking the task component to the jBPM engine ....................................... 61
6.2.3. Starting the Task Management Component ............................................. 62
6.2.4. Interacting With the Task Management Component .................................. 64
6.3. Human Task Management Interface ................................................................... 65
6.3.1. Eclipse integration .................................................................................. 65
6.3.2. Web-based Task View ............................................................................ 65
7. Domain-specific processes ........................................................................................ 67
7.1. Introduction ....................................................................................................... 67
7.2. Example: Notifications ....................................................................................... 68
7.2.1. Creating the work definition .................................................................... 68
7.2.2. Registering the work definition ................................................................ 69
7.2.3. Using your new work item in your processes ............................................ 70
7.2.4. Executing service nodes ......................................................................... 74
8. Persistence ................................................................................................................ 77
8.1. Runtime State ................................................................................................... 77
8.1.1. Binary Persistence ................................................................................. 77
8.1.2. Safe Points ............................................................................................ 77
8.1.3. Configuring Persistence .......................................................................... 77
8.1.4. Transactions .......................................................................................... 81
8.2. Process Definitions ........................................................................................... 82
8.3. History Log ....................................................................................................... 82
8.3.1. Storing Process Events in a Database ..................................................... 82
9. Testing and debugging .............................................................................................. 85
9.1. Unit testing ....................................................................................................... 85
9.1.1. Helper methods to create your session .................................................... 86
9.1.2. Assertions .............................................................................................. 86
9.1.3. Testing integration with external services ................................................. 87
9.1.4. Configuring persistence .......................................................................... 88
9.2. Debugging ........................................................................................................ 89
9.2.1. The Process Instances View ................................................................... 90
9.2.2. The Human Task View ........................................................................... 90
9.2.3. The Audit View ...................................................................................... 91
10. Eclipse BPMN 2.0 Plugin ......................................................................................... 93
10.1. Installation ...................................................................................................... 93
10.2. Creating your BPMN 2.0 processes ................................................................. 93
10.3. Filtering elements and attributes ...................................................................... 98
11. Console .................................................................................................................. 101
11.1. Installation .................................................................................................... 101
v
11.2. Running the process management console ..................................................... 101
11.2.1. Managing process instances ............................................................... 103
11.2.2. Human task lists ................................................................................. 113
11.2.3. Reporting ........................................................................................... 115
11.3. Adding new process / task forms ................................................................... 119
11.4. REST interface .............................................................................................. 120
12. Business Activity Monitoring ................................................................................. 121
12.1. Reporting ...................................................................................................... 121
12.2. Direct Intervention ......................................................................................... 123
13. Process Repository ................................................................................................ 125
14. Designer ................................................................................................................. 129
14.1. Installation .................................................................................................... 130
14.2. Source code ................................................................................................. 130
15. Flexible Processes ................................................................................................. 131
16. Integration with Maven, OSGi, Spring, etc. ............................................................ 135
16.1. Maven .......................................................................................................... 135
16.2. OSGi ............................................................................................................ 136
Index ............................................................................................................................. 139