Foreword |
|
xv | |
|
Foreword |
|
xvii | |
|
Preface |
|
xix | |
Acknowledgments |
|
xxi | |
About this book |
|
xxiii | |
About the cover illustration |
|
xxviii | |
|
Part 1 Introducing BPMN 2.0 and Activiti |
|
|
1 | (84) |
|
1 Introducing the Activiti framework |
|
|
3 | (16) |
|
1.1 The Activiti tool stack |
|
|
4 | (1) |
|
1.2 Getting to know Activiti |
|
|
5 | (4) |
|
|
5 | (1) |
|
The basics of the Activiti Engine |
|
|
6 | (1) |
|
|
7 | (2) |
|
1.3 Installing the Activiti framework |
|
|
9 | (2) |
|
1.4 Implementing your first process in Activiti |
|
|
11 | (7) |
|
|
12 | (2) |
|
Implementing a simple book order process |
|
|
14 | (4) |
|
|
18 | (1) |
|
2 BPMN 2.0: what's in it for developers? |
|
|
19 | (13) |
|
2.1 Taking a closer look at BPM |
|
|
20 | (2) |
|
Walking around the BPM life cycle |
|
|
21 | (1) |
|
2.2 Evolution to BPMN 2.0 |
|
|
22 | (4) |
|
Wasn't there a standard called WS-BPEL? |
|
|
22 | (1) |
|
And then there was BPMN 2.0 |
|
|
23 | (1) |
|
Getting your head around all the BPMN 2.0 constructs |
|
|
24 | (2) |
|
2.3 Introducing BPMN 2.0 from a developer's viewpoint |
|
|
26 | (5) |
|
High-level modeling with BPMN 2.0 |
|
|
26 | (2) |
|
Detailed process modeling |
|
|
28 | (3) |
|
|
31 | (1) |
|
3 Introducing the Activiti tool stack |
|
|
32 | (17) |
|
3.1 Working with the Activiti Modeler |
|
|
33 | (3) |
|
Installing the Activiti Modeler |
|
|
33 | (1) |
|
Modeling processes with the Activiti Modeler |
|
|
34 | (2) |
|
3.2 Adding technical details with the Activiti Designer |
|
|
36 | (9) |
|
Getting up and running with Activiti Designer |
|
|
36 | (1) |
|
Designing a process from scratch |
|
|
37 | (2) |
|
Testing processes with the Activiti Designer |
|
|
39 | (3) |
|
Importing a Modeler process into the Designer |
|
|
42 | (3) |
|
3.3 Managing the Engine using the Activiti Explorer |
|
|
45 | (1) |
|
3.4 Processes and tasks with the Activiti Explorer |
|
|
46 | (2) |
|
|
48 | (1) |
|
4 Working with the Activiti process engine |
|
|
49 | (36) |
|
4.1 Creating an Activiti development environment |
|
|
50 | (6) |
|
Getting familiar with the Activiti libraries |
|
|
50 | (1) |
|
Mavenizing your Activiti project |
|
|
51 | (2) |
|
Logging in the Activiti Engine |
|
|
53 | (1) |
|
Developing and testing with the Activiti Engine |
|
|
54 | (2) |
|
4.2 Using the Activiti Engine API |
|
|
56 | (16) |
|
Starting process instances with the RuntimeService |
|
|
57 | (2) |
|
Working with user tasks via the TaskService |
|
|
59 | (5) |
|
Deleting process definitions with the RepositoryService |
|
|
64 | (2) |
|
Creating users, groups, and memberships with the IdentityService |
|
|
66 | (1) |
|
A sneak peek into the past with the HistoryService |
|
|
67 | (5) |
|
4.3 Using plain Java to do BPM |
|
|
72 | (7) |
|
Java service task with class definition |
|
|
73 | (2) |
|
Introducing asynchronous behavior |
|
|
75 | (1) |
|
Java service task with class definition and field extensions |
|
|
76 | (2) |
|
Java service task with method and value expressions |
|
|
78 | (1) |
|
4.4 Using Spring with Activiti |
|
|
79 | (5) |
|
Creating a generic Spring configuration for Activiti |
|
|
79 | (2) |
|
Implementing a Spring-enabled unit test for Activiti |
|
|
81 | (3) |
|
|
84 | (1) |
|
Part 2 Implementing BPMN 2.0 Processes With Activiti |
|
|
85 | (138) |
|
5 Implementing a BPMN 2.0 process |
|
|
87 | (25) |
|
5.1 Introducing a real business process |
|
|
88 | (2) |
|
Analyzing the loan request process |
|
|
88 | (1) |
|
Taking a process model to an XML process file |
|
|
89 | (1) |
|
5.2 Developing script and service tasks |
|
|
90 | (5) |
|
Scripting in the Activiti Engine |
|
|
90 | (2) |
|
Implementing a Java service task |
|
|
92 | (1) |
|
Creating the BPMN 2.0 XML file |
|
|
93 | (1) |
|
Testing the process with JUnit |
|
|
94 | (1) |
|
5.3 Interacting with user tasks and Activiti forms |
|
|
95 | (6) |
|
Creating forms in Activiti |
|
|
95 | (1) |
|
Adding a task form on a start event |
|
|
96 | (1) |
|
Testing forms using the FormService |
|
|
97 | (1) |
|
Adding user tasks with an escalation workflow |
|
|
98 | (3) |
|
5.4 Handling decisions and sending email |
|
|
101 | (5) |
|
Controlling flow with an exclusive gateway |
|
|
101 | (1) |
|
Implementing an email service task |
|
|
102 | (4) |
|
5.5 Deploying processes to the Activiti Engine |
|
|
106 | (3) |
|
Understanding the Activiti BAR file |
|
|
106 | (1) |
|
Deploying processes to the Activiti Engine |
|
|
107 | (2) |
|
5.6 Testing the process with Activiti Explorer |
|
|
109 | (2) |
|
|
111 | (1) |
|
6 Applying advanced BPMN 2.0 and extensions |
|
|
112 | (34) |
|
6.1 Using BPMN 2.0 subprocesses |
|
|
113 | (13) |
|
Background to BPMN subprocesses |
|
|
113 | (1) |
|
Implementing embedded subprocesses |
|
|
114 | (6) |
|
Implementing standalone subprocesses |
|
|
120 | (6) |
|
6.2 Working with BPMN 2.0 parallel gateways |
|
|
126 | (4) |
|
Implementing a process with a parallel gateway |
|
|
127 | (2) |
|
Testing a process with a parallel gateway |
|
|
129 | (1) |
|
6.3 Adding a JPA extension to your process |
|
|
130 | (7) |
|
Modeling a process with a database entity |
|
|
131 | (1) |
|
Implementing a process with JPA extensions |
|
|
132 | (4) |
|
Testing a process with JPA extensions |
|
|
136 | (1) |
|
6.4 Using execution and task listeners |
|
|
137 | (7) |
|
Modeling a process with execution and task listeners |
|
|
138 | (1) |
|
Implementing execution and task listeners |
|
|
139 | (3) |
|
Testing the event stack list |
|
|
142 | (2) |
|
|
144 | (2) |
|
7 Dealing with error handling |
|
|
146 | (23) |
|
7.1 Choosing between error handling options |
|
|
147 | (5) |
|
Using error end and boundary events |
|
|
147 | (2) |
|
Using Java logic for error handling |
|
|
149 | (2) |
|
Using both error handling approaches together |
|
|
151 | (1) |
|
7.2 Implementing error handling with BPMN 2.0 constructs |
|
|
152 | (13) |
|
Designing the sales opportunity process solution |
|
|
152 | (2) |
|
Modeling the sales opportunity business process |
|
|
154 | (1) |
|
Implementing a BPMN process with the Activiti Designer |
|
|
155 | (5) |
|
Implementing service tasks that invoke a web service |
|
|
160 | (3) |
|
Testing the sales opportunity process solution |
|
|
163 | (2) |
|
7.3 Implementing error handling using Java logic |
|
|
165 | (3) |
|
|
168 | (1) |
|
8 Deploying and configuring the Activiti Engine |
|
|
169 | (24) |
|
8.1 Choosing between deployment options |
|
|
170 | (6) |
|
Embedding the Activiti Engine in a Java application |
|
|
170 | (2) |
|
Using a standalone Activiti Engine instance |
|
|
172 | (3) |
|
Choosing between the deployment options |
|
|
175 | (1) |
|
8.2 Using a Spring-managed Activiti Engine |
|
|
176 | (5) |
|
Creating a process engine from a config file or Java |
|
|
176 | (1) |
|
Creating a process engine from a Spring configuration |
|
|
177 | (4) |
|
8.3 Configuring the Activiti Engine |
|
|
181 | (4) |
|
Basic configuration overview of the Activiti Engine |
|
|
181 | (1) |
|
Configuring the Activiti Engine database options |
|
|
182 | (2) |
|
Exploring other configuration options |
|
|
184 | (1) |
|
8.4 REST communication with the Activiti Engine |
|
|
185 | (7) |
|
Introducing the Activiti REST API |
|
|
185 | (2) |
|
Implementing a new Activiti REST service |
|
|
187 | (5) |
|
|
192 | (1) |
|
9 Exploring additional Activiti modules |
|
|
193 | (30) |
|
|
194 | (2) |
|
9.2 Building an Activiti JEE 6 application |
|
|
196 | (13) |
|
Implementing EJB service tasks |
|
|
197 | (5) |
|
Implementing a JSF process application using CDI |
|
|
202 | (7) |
|
9.3 Deploying Activiti to an OSGi container |
|
|
209 | (12) |
|
Introducing the OSGi standard |
|
|
209 | (1) |
|
Using Apache Karaf as an OSGi container |
|
|
210 | (1) |
|
Installing the Activiti OSGi bundle |
|
|
211 | (4) |
|
Getting a list of process definitions in Apache Karaf |
|
|
215 | (2) |
|
Building a process and task OSGi bundle |
|
|
217 | (4) |
|
|
221 | (2) |
|
Part 3 Enhancing BPMN 2.0 Processes |
|
|
223 | (144) |
|
10 Implementing advanced workflow |
|
|
225 | (35) |
|
10.1 Going beyond a simple user task |
|
|
226 | (10) |
|
|
226 | (5) |
|
|
231 | (2) |
|
Implementing the four-eye principle |
|
|
233 | (3) |
|
10.2 Managing the user identities in an LDAP server |
|
|
236 | (10) |
|
Installing Apache Directory Server |
|
|
237 | (4) |
|
Writing LDAP query logic for the Activiti Engine |
|
|
241 | (5) |
|
10.3 Implementing the BPMN 2.0 multi-instance activity |
|
|
246 | (7) |
|
Configuring a multi-instance activity |
|
|
246 | (1) |
|
Implementing a multi-instance embedded process |
|
|
247 | (6) |
|
10.4 Custom form types and external form rendering |
|
|
253 | (6) |
|
Implementing a custom form type |
|
|
253 | (4) |
|
Using external form rendering |
|
|
257 | (2) |
|
|
259 | (1) |
|
11 Integrating services with a BPMN 2.0 process |
|
|
260 | (26) |
|
11.1 Invoking services from a BPMN 2.0 process |
|
|
261 | (3) |
|
Calling services via a service task |
|
|
261 | (1) |
|
Separating process logic from integration logic |
|
|
262 | (2) |
|
11.2 Using the BPMN 2.0 web service task |
|
|
264 | (4) |
|
11.3 Integrating with Apache Camel |
|
|
268 | (8) |
|
|
268 | (4) |
|
Sending and receiving process messages with Apache Camel |
|
|
272 | (4) |
|
11.4 Integrating with Mule ESB |
|
|
276 | (9) |
|
|
276 | (4) |
|
Sending and receiving process messages with Mule ESB |
|
|
280 | (5) |
|
|
285 | (1) |
|
12 Ruling the business rule engine |
|
|
286 | (25) |
|
12.1 Introducing business rule management |
|
|
287 | (5) |
|
|
287 | (1) |
|
Business rule management systems |
|
|
288 | (1) |
|
Using different types of rules in business processes |
|
|
289 | (2) |
|
Business rule management in BPMN 2.0 |
|
|
291 | (1) |
|
12.2 Entering the rule world of Drools |
|
|
292 | (9) |
|
Drools, the business logic integration platform |
|
|
292 | (1) |
|
Introducing Drools Expert |
|
|
293 | (3) |
|
Hands-on with Drools Expert |
|
|
296 | (2) |
|
Using spreadsheets to create Drools decision tables |
|
|
298 | (3) |
|
12.3 Integrating Drools with Activiti |
|
|
301 | (6) |
|
Activiti and the business rule task |
|
|
301 | (2) |
|
Using business rules in a process definition |
|
|
303 | (4) |
|
12.4 Creating a web-based rule editor |
|
|
307 | (2) |
|
Introducing flexibility with a custom rule authoring application |
|
|
307 | (2) |
|
|
309 | (2) |
|
13 Document management using Alfresco |
|
|
311 | (29) |
|
13.1 Introducing Alfresco Community |
|
|
312 | (8) |
|
Installing Alfresco Community |
|
|
312 | (3) |
|
Introducing Activiti integration in Alfresco |
|
|
315 | (5) |
|
13.2 Using CMIS to store and retrieve documents |
|
|
320 | (6) |
|
Retrieving folder content from Alfresco using CMIS |
|
|
320 | (3) |
|
Storing a new document version |
|
|
323 | (3) |
|
13.3 Adding documents to a BPMN 2.0 process definition |
|
|
326 | (12) |
|
Working with task and process instance attachments |
|
|
326 | (2) |
|
Implementing a document-aware process definition |
|
|
328 | (8) |
|
Deploying and testing the document-aware process definition |
|
|
336 | (2) |
|
|
338 | (2) |
|
14 Business monitoring and Activiti |
|
|
340 | (27) |
|
14.1 Monitoring business processes |
|
|
341 | (4) |
|
Introducing business activity monitoring (BAM) |
|
|
341 | (2) |
|
Introducing complex event processing (CEP) |
|
|
343 | (2) |
|
14.2 Meeting the Esper framework |
|
|
345 | (10) |
|
|
345 | (2) |
|
Introducing event windows |
|
|
347 | (8) |
|
14.3 Monitoring Activiti processes with Esper |
|
|
355 | (4) |
|
Integrating Activiti and Esper |
|
|
355 | (1) |
|
Testing the Activiti and Esper setup |
|
|
356 | (3) |
|
14.4 Monitoring Activiti with a Vaadin dashboard |
|
|
359 | (7) |
|
An Activiti BAM architecture |
|
|
359 | (1) |
|
Producing REST events with Activiti |
|
|
360 | (2) |
|
Setting up the Vaadin application with the Esper REST service |
|
|
362 | (2) |
|
Monitoring Activiti processes with a Vaadin dashboard |
|
|
364 | (2) |
|
|
366 | (1) |
|
Part 4 Managing BPMN 2.0 Processes |
|
|
367 | (28) |
|
15 Managing the Activiti Engine |
|
|
369 | (26) |
|
15.1 Working with the Activiti database |
|
|
370 | (11) |
|
Understanding the Activiti runtime execution database model |
|
|
370 | (7) |
|
Understanding the Activiti history database model |
|
|
377 | (2) |
|
Creating the Activiti database |
|
|
379 | (1) |
|
Upgrading the Activiti database |
|
|
380 | (1) |
|
15.2 Dealing with process versioning |
|
|
381 | (3) |
|
15.3 Understanding the job executor |
|
|
384 | (2) |
|
15.4 Building an administrator dashboard |
|
|
386 | (6) |
|
|
392 | (3) |
Appendix A Working with the source code |
|
395 | (3) |
Appendix B BPMN 2.0 supported elements in Activiti |
|
398 | (20) |
Index |
|
418 | |