jbpm
DESCRIPTION
Presentation about jBPM - business process framework from JBossTRANSCRIPT
![Page 1: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/1.jpg)
© Adastra Group
&
jBPM & BPMN
jPrase
Vít Kotačka
24. 11. 2011
![Page 2: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/2.jpg)
2
Agenda
BPMN� Overview
jBPM� JBoss Middleware & BRMS� Core Engine API� Process Nodes� Human Tasks� Testing & debugging
![Page 3: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/3.jpg)
3
BPMN Overview
![Page 4: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/4.jpg)
4
Business Process Model and Notation
Graphical representation for specifying business processes. Providing a notation that is intuitive to business users :-) Maintained by OMG (Object Management Group). Similar to Activity Diagrams from UML. Provides a mapping between
the graphics of the notationand the underlying constructsof execution languages (BPEL).
Shows the flow of data (messages), but it is not a data flow diagram.
![Page 5: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/5.jpg)
5
Example Diagram Business Process BPMN
StartEvent1
Activity2
EndEvent1
(from Use Case)
Use Case1
Activity1
Activity3
Activity4
Firs
tLin
eS
ec
on
dL
ine
![Page 6: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/6.jpg)
6
Elements
Flow objects� Activity� Event� Gateway
Connecting object� Sequence flow� Message flow� Association
Swim lanes� Pool� Lane
Artifacts� Data object� Group
![Page 7: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/7.jpg)
7
Activities
![Page 8: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/8.jpg)
8
Events
Start Event Stop Event Intermediate Event
� Interrupting� Non-interrupting
![Page 9: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/9.jpg)
9
Gateways
![Page 10: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/10.jpg)
10
Swimlines
![Page 11: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/11.jpg)
11
72 Implementations
![Page 12: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/12.jpg)
12
JBoss Middleware & BRMS
![Page 13: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/13.jpg)
13
JBoss Enterprise Middleware
![Page 14: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/14.jpg)
14
JBoss Enterprise SOA
![Page 15: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/15.jpg)
15
Drools/JBoss BRMS
Drools Guvnor: A centralised repository for Drools Knowledge Bases. The repository component is where you can store versions of rules, models, functions, processes etc.
Drools Expert: A forward chaining rule engine based on Rete algorithm.
jBPM: A light-weight, extensible workflow engine written in pure Java that allows to execute business processes using the latest BPMN 2.0 specification.
![Page 16: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/16.jpg)
16
Core Engine API
![Page 17: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/17.jpg)
17
Core Engine
![Page 18: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/18.jpg)
18
Knowledge Base
Contains a reference to all the relevant process definitions. Can be shared across sessions. Usually is only created once (at the start of the application). Can be dynamically changed (add/remove process at runtime).
KnowledgeBuilder kBuilder =KnowledgeBuilderFactory
.newKnowledgeBuilder();kBuilder.add(ResourceFactory
.newClassPathResource("hello.bpmn"),ResourceType.BPMN2);
KnowledgeBase kBase =kBuilder.newKnowledgeBase();
![Page 19: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/19.jpg)
19
Session
Can be created based on a knowledge base. Are used to execute processes and interact with engine. Multiple sessions can be created (independency, scalability). Is relatively lightweight.
StatefulKnowledgeSession session =kBase.newStatefulKnowledgeSession();
ProcessInstance process =session.startProcess(
"com.adastracorp.jbpm.hello");
![Page 20: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/20.jpg)
20
Events
Session can register listeners. ProcessEventListener listens to process-related events. KnowledgeRuntimeLoggerFactory adds logger to session.
� console logger� file logger
![Page 21: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/21.jpg)
21
ProcessEventListener
![Page 22: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/22.jpg)
22
Process Nodes
![Page 23: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/23.jpg)
23
Process Node Types
Events: They are used to model the occurrence of a particular event.
Activities: These define the different actions that need to be performed during the execution of the process.
Gateways: Can be used to define multiple paths in the process.
![Page 24: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/24.jpg)
24
Events
Start Event: The start of the process. End Events
�End Event: The end of the process.�Throwing Error Event: Can be used to signal
an exceptional condition in the process. Intermediate Events
�Catching Timer Event: A timer that can trigger one or multiple times after a given period of time.
�Catching Signal Event: Can be used to respond to internal or external events during the execution of the process.
![Page 25: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/25.jpg)
25
Gateways
Diverging Gateway� AND (parallel)� XOR (exclusive)� OR (inclusive)
Converging Gateway� AND� XOR
![Page 26: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/26.jpg)
26
Activities
Script Task: A script that should be executed in this process. Can access any variables and globals.
Service Task: An (abstract) unit of work that should be executed in this process (work that is executed outside the process engine).
User Task: An (atomic) task that need to be executed by human actors.
Reusable Sub-process: An invocation of another process from within this process.
Business Rule Task: A set of rules that need to be evaluated. Rules are defined in separate files using the Drools rule format.
![Page 27: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/27.jpg)
27
Activities
Embedded Sub-process: A Sub-Process is a node that can contain other nodes so that it acts as a node container. If you use a terminating event node inside a sub-process, you are terminating the top-level process instance, not just that sub-process.
Mulit-instance Sub-process: Allows you to execute the contained process segment multiple times, once for each element in a collection.
![Page 28: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/28.jpg)
28
Human Tasks
![Page 29: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/29.jpg)
29
Human Tasks
Based on the WS-HumanTask specification. An atomic task that needs to be executed by a human actor. Can be assigned to
� one specific user� one or more groups
Can be used in combination with swimlanes to assign multiple human tasks to the same actor.
Human task service� manages the life cycle of the tasks (creation, claiming, completion, etc.)� stores the state of all the tasks� supports features like internationalization, calendar integration, different
types of assignments, delegation, deadlines, etc.
![Page 30: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/30.jpg)
30
Human Task Model
![Page 31: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/31.jpg)
31
Human Task Life-cycle
![Page 32: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/32.jpg)
32
Testing & debugging
![Page 33: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/33.jpg)
33
Process Instance(s) View shows the currently running process instances.
Human Task View can connect to a running human task service and request the relevant tasks for a particular user.
Audit View is a log of all events that were logged from the session.
Debugging
![Page 34: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/34.jpg)
34
What has been omitted
Rule Tasks Persistence Transactions Domain-specific processes Process (Knowledge) repository Business Activity Monitoring Flexible Processes
![Page 35: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/35.jpg)
35
Sources
http://www.bpmn.org/ http://www.bpmb.de/images/BPMN2_0_Poster_EN.pdf http://www.jboss.org/jbpm
![Page 36: jBPM](https://reader033.vdocuments.us/reader033/viewer/2022061207/54844cccb4af9f5b078b4572/html5/thumbnails/36.jpg)
36