JBoss jBPM - Workflow in Java
jBPM jPDL User Guide
3.2.3
Table of Contents
1. Introduction ........................................................................................................................................1
1.1. Overview .................................................................................................................................1
1.2. The jPDL suite .........................................................................................................................2
1.3. The jPDL graphical process designer .........................................................................................2
1.4. The jBPM console web application ...........................................................................................3
1.5. The jBPM core library ..............................................................................................................3
1.6. The JBoss jBPM identity component .........................................................................................3
1.7. The JBoss jBPM Job Executor ..................................................................................................3
2. Getting started ....................................................................................................................................5
2.1. Downloadables Overview .........................................................................................................5
2.1.1. jPDL 3 ..........................................................................................................................5
2.1.2. jPDL Process Designer ..................................................................................................5
2.2. The JBoss jBPM project directory .............................................................................................6
2.3. Source code CVS access ...........................................................................................................6
2.3.1. Anonymous CVS access ................................................................................................6
2.3.2. Developer CVS access ...................................................................................................7
3. Tutorial ..............................................................................................................................................8
3.1. Hello World example ...............................................................................................................8
3.2. Database example ....................................................................................................................9
3.3. Context example: process variables .........................................................................................13
3.4. Task assignment example .......................................................................................................13
3.5. Custom action example ...........................................................................................................14
4. Graph Oriented Programming ............................................................................................................17
4.1. Introduction ...........................................................................................................................17
4.1.1. Domain specific languages ...........................................................................................18
4.1.2. Features of graph based languages ................................................................................19
4.1.2.1. Support for wait states .......................................................................................19
4.1.2.2. Graphical representation ....................................................................................20
4.2. Graph Oriented Programming .................................................................................................20
4.2.1. The graph structure ......................................................................................................20
4.2.2. An execution ...............................................................................................................21
4.2.3. A process language ......................................................................................................22
4.2.4. Actions .......................................................................................................................25
4.2.5. Synchronous execution ................................................................................................26
4.2.6. Code example .............................................................................................................26
4.3. Extensionding Graph Oriented Programming ...........................................................................26
4.3.1. Process variables .........................................................................................................26
4.3.2. Concurrent executions .................................................................................................27
4.3.3. Process composition ....................................................................................................28
4.3.4. Asynchronous continuations .........................................................................................29
4.3.5. Persistence and Transactions ........................................................................................30
4.3.6. Services and environment ............................................................................................31
4.4. Considerations .......................................................................................................................31
4.4.1. Runtime data isolation .................................................................................................31
JBoss 3.2.3 ii
4.4.2. GOP compared to other techniques ...............................................................................31
4.4.3. GOP compared to petri nets .........................................................................................32
4.5. Application domains ...............................................................................................................32
4.5.1. Business Process Management (BPM) ..........................................................................32
4.5.1.1. Different aspects of BPM ..................................................................................32
4.5.1.2. Goals of BPM systems ......................................................................................33
4.5.2. Service orchestration ...................................................................................................35
4.6. Embedding graph based languages ..........................................................................................36
4.7. Market ...................................................................................................................................36
4.7.1. The ultimate process language ......................................................................................36
4.7.2. Fragmentation .............................................................................................................37
4.7.3. Other implementation techniques ..................................................................................38
5. Deployment ......................................................................................................................................39
5.1. jBPM libraries .......................................................................................................................39
5.2. Java runtime environment .......................................................................................................39
5.3. Third party libraries ................................................................................................................39
5.4. Web application .....................................................................................................................41
5.5. Enterprise archive ..................................................................................................................41
5.6. The jPDL Runtime and Suite ..................................................................................................42
5.6.1. The runtime ................................................................................................................42
5.6.2. The suite .....................................................................................................................43
5.6.3. Configuring the logs in the suite server .........................................................................43
5.6.4. Debugging a process in the suite ...................................................................................43
6. Configuration ...................................................................................................................................45
6.1. Customizing factories .............................................................................................................47
6.2. Configuration properties .........................................................................................................47
6.3. Other configuration files .........................................................................................................47
6.3.1. Hibernate cfg xml file ..................................................................................................47
6.3.2. Hibernate queries configuration file ..............................................................................48
6.3.3. Node types configuration file .......................................................................................48
6.3.4. Action types configuration file .....................................................................................48
6.3.5. Business calendar configuration file ..............................................................................48
6.3.6. Variable mapping configuration file ..............................................................................48
6.3.7. Converter configuration file .........................................................................................48
6.3.8. Default modules configuration file ................................................................................48
6.3.9. Process archive parsers configuration file ......................................................................49
6.4. jBPM debug logs in JBoss ......................................................................................................49
6.5. Logging of optimistic concurrency exceptions ..........................................................................49
6.6. Object factory ........................................................................................................................49
7. Persistence .......................................................................................................................................52
7.1. The persistence API ...............................................................................................................52
7.1.1. Relation to the configuration framework .......................................................................52
7.1.2. Convenience methods on JbpmContext .........................................................................53
7.1.3. Managed transactions ..................................................................................................56
7.1.4. Injecting the hibernate session ......................................................................................56
7.1.5. Injecting resources programmatically ............................................................................57
7.1.6. Advanced API usage ...................................................................................................57
7.2. Configuring the persistence service .........................................................................................57
7.2.1. The DbPersistenceServiceFactory .................................................................................57
JBoss jBPM - Workflow in Java
JBoss 3.2.3 iii
7.2.2. The hibernate session factory .......................................................................................58
7.2.3. Configuring a c3po connection pool .............................................................................59
7.2.4. Configuring a ehcache cache provider ...........................................................................59
7.3. Hibernate transactions ............................................................................................................59
7.4. JTA transactions ....................................................................................................................59
7.5. Customizing queries ...............................................................................................................60
7.6. Database compatibility ...........................................................................................................61
7.6.1. Isolation level of the JDBC connection .........................................................................61
7.6.2. Changing the jBPM DB ...............................................................................................61
7.6.3. The jBPM DB schema .................................................................................................61
7.6.4. Known Issues ..............................................................................................................62
7.6.4.1. Sybase Issues ...................................................................................................62
7.7. Combining your hibernate classes ...........................................................................................62
7.8. Customizing the jBPM hibernate mapping files ........................................................................62
7.9. Second level cache .................................................................................................................62
8. The jBPM Database ..........................................................................................................................64
8.1. Switching the Database Backend .............................................................................................64
8.1.1. Isolation level ..............................................................................................................64
8.1.2. Installing the PostgreSQL Database Manager ................................................................64
8.1.3. Installing the MySQL Database Manager ......................................................................67
8.1.4. Creating the JBoss jBPM Database with your new PostGreSQL or MySQL ....................68
8.1.4.1. Creating the JBoss jBPM Database with PostGreSQL .........................................68
8.1.4.2. Creating the JBoss jBPM Database with your new MySQL .................................70
8.1.5. Last Steps ...................................................................................................................73
8.1.6. Update the JBoss jBPM Server Configuration ...............................................................73
8.2. Database upgrades ..................................................................................................................76
8.3. Starting hsqldb manager on JBoss ...........................................................................................77
9. Java EE Application Server Facilities .................................................................................................81
9.1. Enterprise Beans ....................................................................................................................81
9.2. jBPM Enterprise Configuration ...............................................................................................83
9.3. Hibernate Enterprise Configuration .........................................................................................84
9.4. Client Components .................................................................................................................85
10. Process Modelling ...........................................................................................................................88
10.1. Overview .............................................................................................................................88
10.2. Process graph .......................................................................................................................88
10.3. Nodes ..................................................................................................................................90
10.3.1. Node responsibilities ..................................................................................................90
10.3.2. Nodetype task-node ...................................................................................................91
10.3.3. Nodetype state ...........................................................................................................91
10.3.4. Nodetype decision .....................................................................................................91
10.3.5. Nodetype fork ...........................................................................................................92
10.3.6. Nodetype join ............................................................................................................92
10.3.7. Nodetype node ..........................................................................................................92
10.4. Transitions ...........................................................................................................................92
10.5. Actions ................................................................................................................................93
10.5.1. Action configuration ..................................................................................................94
10.5.2. Action references .......................................................................................................94
10.5.3. Events .......................................................................................................................94
10.5.4. Event propagation ......................................................................................................94
JBoss jBPM - Workflow in Java
JBoss 3.2.3 iv
10.5.5. Script ........................................................................................................................94
10.5.6. Custom events ...........................................................................................................95
10.6. Superstates ...........................................................................................................................96
10.6.1. Superstate transitions .................................................................................................96
10.6.2. Superstate events .......................................................................................................96
10.6.3. Hierarchical names ....................................................................................................96
10.7. Exception handling ...............................................................................................................97
10.8. Process composition .............................................................................................................97
10.9. Custom node behaviour ........................................................................................................98
10.10. Graph execution .................................................................................................................99
10.11. Transaction demarcation ...................................................................................................100
11. Context ........................................................................................................................................102
11.1. Accessing variables ............................................................................................................102
11.2. Variable lifetime ................................................................................................................103
11.3. Variable persistence ............................................................................................................103
11.4. Variables scopes .................................................................................................................103
11.4.1. Variables overloading ..............................................................................................103
11.4.2. Variables overriding ................................................................................................104
11.4.3. Task instance variable scope .....................................................................................104
11.5. Transient variables .............................................................................................................104
11.6. Customizing variable persistence .........................................................................................104
12. Task management .........................................................................................................................107
12.1. Tasks .................................................................................................................................107
12.2. Task instances ....................................................................................................................107
12.2.1. Task instance lifecycle .............................................................................................107
12.2.2. Task instances and graph execution ..........................................................................108
12.3. Assignment ........................................................................................................................109
12.3.1. Assignment interfaces ..............................................................................................109
12.3.2. The assignment data model ......................................................................................110
12.3.3. The personal task list ...............................................................................................110
12.3.4. The group task list ...................................................................................................111
12.4. Task instance variables .......................................................................................................111
12.5. Task controllers ..................................................................................................................112
12.6. Swimlanes .........................................................................................................................113
12.7. Swimlane in start task .........................................................................................................114
12.8. Task events ........................................................................................................................114
12.9. Task timers ........................................................................................................................114
12.10. Customizing task instances ................................................................................................115
12.11. The identity component ....................................................................................................115
12.11.1. The identity model .................................................................................................115
12.11.2. Assignment expressions .........................................................................................116
12.11.2.1. First terms ..................................................................................................117
12.11.2.2. Next terms ..................................................................................................117
12.11.3. Removing the identity component ...........................................................................117
13. Document management .................................................................................................................119
14. Scheduler .....................................................................................................................................120
14.1. Timers ...............................................................................................................................120
14.2. Scheduler deployment ........................................................................................................120
15. Asynchronous continuations ..........................................................................................................123
JBoss jBPM - Workflow in Java
JBoss 3.2.3 v
评论0