bpm & activiti
TRANSCRIPT
![Page 1: Bpm & activiti](https://reader036.vdocuments.site/reader036/viewer/2022062419/55a5add51a28abc3238b467a/html5/thumbnails/1.jpg)
BPM & Activiti
Do Duy Trung
![Page 2: Bpm & activiti](https://reader036.vdocuments.site/reader036/viewer/2022062419/55a5add51a28abc3238b467a/html5/thumbnails/2.jpg)
BPMN
BPMN = BPM + N
- BPM: Business Process Modeling
- N: Notation
![Page 3: Bpm & activiti](https://reader036.vdocuments.site/reader036/viewer/2022062419/55a5add51a28abc3238b467a/html5/thumbnails/3.jpg)
BPMN 1.x
● Notation for business experts to
analyse, document and discuss
business processes.
● Activities, Gateways, Events
Control & Data flow (Sequence
Flow, Data Objects)
● Organisational modelling (Pools,
Lanes)
● No defined execution semantics!
● Calls for a technical language for
business process automation
BPEL
● Standardized XML-based
language for executable,
technical business processes
● Hybrid language: block-
structured & graph-based Well-
defined execution language
● No dead-locks, no lack-of-
synchronization
● Graphs must be acyclic
● Tied to concepts of SOA/Web
Services
● No support for human activities
● No notation!
![Page 4: Bpm & activiti](https://reader036.vdocuments.site/reader036/viewer/2022062419/55a5add51a28abc3238b467a/html5/thumbnails/4.jpg)
BPMN + BPEL
● Established Approach
o Business experts create
BPMN models
o IT experts translate them to
BPEL in order to make them
executable
● Problem
o Mapping BPMN to BPEL is
not straight forward Lax vs. strict semantics
Loops / Blocks
Lack of technical details in BPMN models
o Roundtripping is difficult
BPMN 2
● Best of both worlds
o A notation (subset) for BPEL
o A meta model and execution
semantics for BPMN
● Notational support for
Choreographies
● BPMN 2.0 models
o are now interchangeable
o can be executed
o can carry technical details
![Page 5: Bpm & activiti](https://reader036.vdocuments.site/reader036/viewer/2022062419/55a5add51a28abc3238b467a/html5/thumbnails/5.jpg)
Types of BPMS
● The “commercial” model
o Standards-based
o Proprietary extension
o Closed-source
o Typically well tested & supported
o Often combined with consulting &
support offerings
● The “open source” model
o Standards-based and/or proprietary
o Source code is available for free
o Tech experts needed to get started
● The “commercial open source” model
o Based on open source
o Sell technical experience, glue code,
consulting & support
o E.g. Intalio, WSO2, Redhat,…
● The “embedded” approach
o Light-weight process engine
o Can be easily integrated into your
application
o Java-centric
o E.g. jBPM, Drools Flow, Activiti
● The “SOA” approach
o Architecture typically more heavy-
weight
o Orchestrates services to achieve a
higher business goal
o Service implementation is hidden by
an interface and is exchangeable
(mostly Web Services).
o E.g. Apache ODE, IBM, Oracle,
SAP,…
![Page 7: Bpm & activiti](https://reader036.vdocuments.site/reader036/viewer/2022062419/55a5add51a28abc3238b467a/html5/thumbnails/7.jpg)
Activiti BPM Components
![Page 8: Bpm & activiti](https://reader036.vdocuments.site/reader036/viewer/2022062419/55a5add51a28abc3238b467a/html5/thumbnails/8.jpg)
Activiti BPM Components
![Page 9: Bpm & activiti](https://reader036.vdocuments.site/reader036/viewer/2022062419/55a5add51a28abc3238b467a/html5/thumbnails/9.jpg)
Activiti
- Modeler: a web-based graphical workflow authoring
- Designer: an Eclipse-plugin for developing workflow
- Engine: the core workflow processor
- Explorer: a web tool to deploy process definitions
- Cycle: a web app for collabration between business
users and software engineers
![Page 10: Bpm & activiti](https://reader036.vdocuments.site/reader036/viewer/2022062419/55a5add51a28abc3238b467a/html5/thumbnails/10.jpg)
Database Table Names
● ACT_RE_*: RE → repository: process definitions &
resources (images, rules, etc.).
● ACT_RU_*: RU → runtime: process instances, user
tasks, variables, jobs, etc.
● ACT_ID_*: ID → identity: users, groups, etc.
● ACT_HI_*: HI → history: past process instances,
variables, tasks, etc.
● ACT_GE_*: GE → general data.
![Page 11: Bpm & activiti](https://reader036.vdocuments.site/reader036/viewer/2022062419/55a5add51a28abc3238b467a/html5/thumbnails/11.jpg)
Activiti API
![Page 12: Bpm & activiti](https://reader036.vdocuments.site/reader036/viewer/2022062419/55a5add51a28abc3238b467a/html5/thumbnails/12.jpg)
Query API
• HistoricProcessInstances:
createHistoricProcessInstanceQuery()
• HistoricVariableInstances:
createHistoricVariableInstanceQuery()
• HistoricActivityInstances:
createHistoricActivityInstanceQuery()
• HistoricDetails:
createHistoricDetailQuery()
• HistoricTaskInstances:
createHistoricTaskInstanceQuery()
→ Get 10 HistoricProcessInstances that are finished
and which took the most time to complete (the longest
duration) of all finished processes with definition ‘XXX‘:
historyService.createHistoricProcessInstanceQuery(
) .finished() .processDefinitionId(“XXX")
.orderByProcessInstanceDuration().desc()
.listPage(0, 10);
→ Get the last Historic Activity Instance of type
'serviceTask' that has been finished in any process that
uses the process definition with id XXX.
historyService.createHistoricActivityInstanceQuery()
.activityType("serviceTask")
.processDefinitionId("XXX") .finished()
.orderByHistoricActivityInstanceEndTime().desc()
.listPage(0, 1);
...
![Page 13: Bpm & activiti](https://reader036.vdocuments.site/reader036/viewer/2022062419/55a5add51a28abc3238b467a/html5/thumbnails/13.jpg)
Activiti REST API
Remote communication with Activiti
![Page 14: Bpm & activiti](https://reader036.vdocuments.site/reader036/viewer/2022062419/55a5add51a28abc3238b467a/html5/thumbnails/14.jpg)
Embeddable Java Engine vs Standalone Servers
![Page 15: Bpm & activiti](https://reader036.vdocuments.site/reader036/viewer/2022062419/55a5add51a28abc3238b467a/html5/thumbnails/15.jpg)
Activiti Usage
![Page 16: Bpm & activiti](https://reader036.vdocuments.site/reader036/viewer/2022062419/55a5add51a28abc3238b467a/html5/thumbnails/16.jpg)
Activiti Explorer
![Page 17: Bpm & activiti](https://reader036.vdocuments.site/reader036/viewer/2022062419/55a5add51a28abc3238b467a/html5/thumbnails/17.jpg)
Activiti Designer
![Page 18: Bpm & activiti](https://reader036.vdocuments.site/reader036/viewer/2022062419/55a5add51a28abc3238b467a/html5/thumbnails/18.jpg)
Activiti Modeler / Activiti Cloud
![Page 19: Bpm & activiti](https://reader036.vdocuments.site/reader036/viewer/2022062419/55a5add51a28abc3238b467a/html5/thumbnails/19.jpg)
Demo
![Page 20: Bpm & activiti](https://reader036.vdocuments.site/reader036/viewer/2022062419/55a5add51a28abc3238b467a/html5/thumbnails/20.jpg)
Q & A