bpm & activiti

20
BPM & Activiti Do Duy Trung

Upload: do-duy-trung

Post on 15-Jul-2015

244 views

Category:

Software


1 download

TRANSCRIPT

Page 1: Bpm & activiti

BPM & Activiti

Do Duy Trung

Page 2: Bpm & activiti

BPMN

BPMN = BPM + N

- BPM: Business Process Modeling

- N: Notation

Page 3: Bpm & activiti

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

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

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 6: Bpm & activiti

Activiti

http://activiti.org/

Page 7: Bpm & activiti

Activiti BPM Components

Page 8: Bpm & activiti

Activiti BPM Components

Page 9: Bpm & activiti

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

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

Activiti API

Page 12: Bpm & activiti

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

Activiti REST API

Remote communication with Activiti

Page 14: Bpm & activiti

Embeddable Java Engine vs Standalone Servers

Page 15: Bpm & activiti

Activiti Usage

Page 16: Bpm & activiti

Activiti Explorer

Page 17: Bpm & activiti

Activiti Designer

Page 18: Bpm & activiti

Activiti Modeler / Activiti Cloud

Page 19: Bpm & activiti

Demo

Page 20: Bpm & activiti

Q & A