Executing bpmn 2.0 with j bpm 3 or (at your option) any later version

30

Transcript of Executing bpmn 2.0 with j bpm 3 or (at your option) any later version

Page 1: Executing bpmn 2.0 with j bpm 3 or (at your option) any later version
Page 2: Executing bpmn 2.0 with j bpm 3 or (at your option) any later version

Executing BPMN 2.0 with jBPM 3or (at your option) any later versionExecuting BPMN 2.0 with jBPM 3or (at your option) any later version

Falko Menge

JUDCon 2010

Berlin

Page 3: Executing bpmn 2.0 with j bpm 3 or (at your option) any later version

• Consultant, trainer & coach forjBPM 3 & 4, Drools, BPMN

• Developer of severalOpen Source projects(Activiti, Oryx Editor, WSDL2XForms,InstantSVC, …)

• Member of BPMN specification teamat OMG

• Co-author of „BPMN 2.0 by Example“

[email protected]

Falko [email protected]

• Co-author of „BPMN 2.0 by Example“

Areas of Interest:

BPM, SOA & EAI with Open Standardsand Open Source Software

Process Execution(BPMN 2.0, jPDL, BPEL, XPDL, …)

Enterprise Applications with Java EE

Page 4: Executing bpmn 2.0 with j bpm 3 or (at your option) any later version

BPMN

Mapping BPMN to jPDL

BPMN

Mapping BPMN to jPDL

OverviewOverview

Abstracting the EngineAbstracting the Engine

Page 5: Executing bpmn 2.0 with j bpm 3 or (at your option) any later version

BPMN?BPMN?

Page 6: Executing bpmn 2.0 with j bpm 3 or (at your option) any later version
Page 7: Executing bpmn 2.0 with j bpm 3 or (at your option) any later version

BPMN 2.0 – An ExampleBPMN 2.0 – An Example

Page 8: Executing bpmn 2.0 with j bpm 3 or (at your option) any later version

BPMN 2.0 StatusBPMN 2.0 Status

Page 9: Executing bpmn 2.0 with j bpm 3 or (at your option) any later version

Why does everybody want BPMN 2.0?Why does everybody want BPMN 2.0?

InterchangeDiagram

Interchange SemanticsExecution Semantics

<XML> <XML>

Page 10: Executing bpmn 2.0 with j bpm 3 or (at your option) any later version

BPMN 1.x: Just SymbolsBPMN 1.x: Just Symbols

NotationNotation

Page 11: Executing bpmn 2.0 with j bpm 3 or (at your option) any later version

BPMN 2.0: Model and NotationBPMN 2.0: Model and Notation

NotationModel

ExamplesExecution Semantics

NotationModel

XML Diagram Interchange

XML XMI

XSLT

Page 12: Executing bpmn 2.0 with j bpm 3 or (at your option) any later version

Desired Architecture with BPMN 2.0Desired Architecture with BPMN 2.0

Page 13: Executing bpmn 2.0 with j bpm 3 or (at your option) any later version

What does that mean as well?What does that mean as well?

Page 14: Executing bpmn 2.0 with j bpm 3 or (at your option) any later version

Where are thoseBPMN process engines?BPMN process engines?

Page 15: Executing bpmn 2.0 with j bpm 3 or (at your option) any later version

Currently, jBPM 3 is used Currently, jBPM 3 is used

Page 16: Executing bpmn 2.0 with j bpm 3 or (at your option) any later version

Isn‘t there a gap?Isn‘t there a gap?

??

Page 17: Executing bpmn 2.0 with j bpm 3 or (at your option) any later version

Goal: Forward EngineeringGoal: Forward Engineering

Mapping

ProcessAnalyst

Mapping

ProcessEngineer

Or evenRoundtrip?

Page 18: Executing bpmn 2.0 with j bpm 3 or (at your option) any later version

Mapping Overview (1/2)Mapping Overview (1/2)

Page 19: Executing bpmn 2.0 with j bpm 3 or (at your option) any later version

Mapping Overview (2/2)Mapping Overview (2/2)

Page 20: Executing bpmn 2.0 with j bpm 3 or (at your option) any later version

Does that mean there are different models?Does that mean there are different models?

??

„Call Fraud-Service“

FraudService.checkFraud(customer)

Repository in Process Engine

BusinessModel

Model in Developer

Model in Execution

Developer Repository (SVN)

BPMN Repository (Signavio)

LogicalModel

Page 21: Executing bpmn 2.0 with j bpm 3 or (at your option) any later version

� Pool extraction

� Transform custom elements into standard language constructs

� Custom task service

� Localization

PatternsPatterns

Page 22: Executing bpmn 2.0 with j bpm 3 or (at your option) any later version

What about my Java code?What about my Java code?

Page 23: Executing bpmn 2.0 with j bpm 3 or (at your option) any later version

Process Engine Abstraction Layer (PEAL)Process Engine Abstraction Layer (PEAL)

API

Application Services

ESB

BindingBPMN Modell

ProcessEngine

Connectivity

Services Application

ESB

Binding

Mapping

BPMN Modell

Page 24: Executing bpmn 2.0 with j bpm 3 or (at your option) any later version

Example Code with PEALExample Code with PEAL

UserTask task3 = taskService.createTaskQuery().processInstanceId(pi.getId()).potentialOwner("mike").uniqueResult();

assertEquals("Specify Advertising strategy", assertEquals("Specify Advertising strategy", task3.getActivityName());

variables = new HashMap<String, Object>();variables.put("website_name", "SetpStone");task3.complete(variables);

pi.reload();assertTrue(pi.isEnded());

Changes to the jbpm 4 API are minimal (but can be bound tojbpm 3 and other engines as well)

Page 25: Executing bpmn 2.0 with j bpm 3 or (at your option) any later version

+getValue()

+setValue()

DataObject

+getPersistentDataObject()

+setPersistentDataObject()

+getTransientDataObject()

+setTransientDataObject()

+...()

«interface»

DataObjectAware

1

getValue()

PersistentDataObject

getValue()

TransientDataObjectExecutionContext

DataObjectAwareExecutionContext

Data Object AbstractionData Object Abstraction

API

+getValue()

+setValue()

+getValue()

+setValue()

ContextInstace

DataObjectAware

ProcessInstance

DataObjectAware-NAME : String = "MyVariable"

MyPersistentDataObject

ContextInstance

ProcessInstance

1

1

1

Binding (e.g.jBPM 3)Project specific DataObjects jBPM 3

Page 26: Executing bpmn 2.0 with j bpm 3 or (at your option) any later version

Abstraction of Service AdaptersAbstraction of Service Adapters

jBPM 3

API

Binding (e.g. jBPM 3)

Project specific adaptors

Page 27: Executing bpmn 2.0 with j bpm 3 or (at your option) any later version

Why so complicated? Example with asynchronous Services

TX 1: create request

<<Node>>

Invoke ESB Service

TX 2: call EJB

TX 3: process response

jBPM job

Signal from JbpmCallback

ESB

EJB-Call without sync. result

jBPM Process

TX 1: create request

<<Node>>Invoke EJB

TX 2: call EJB

TX 3: process response

jBPM job

jBPM job

EJB-Call with sync. result

Page 28: Executing bpmn 2.0 with j bpm 3 or (at your option) any later version

Process Engine Abstraction Layer (PEAL)Process Engine Abstraction Layer (PEAL)

API

Application Services

ESB

BindingBPMN Modell

ProcessEngine

Connectivity

Services Application

ESB

Binding

Mapping

BPMN Modell

Page 29: Executing bpmn 2.0 with j bpm 3 or (at your option) any later version

Thank you for your attention – Any questions?Thank you for your attention – Any questions?

Page 30: Executing bpmn 2.0 with j bpm 3 or (at your option) any later version

Thank You!Thank You!camunda services GmbHZossener Str. 55-5810961 Berlin

Telefon: +49 30 664 0409-00Telefax: +49 30 664 0409-29

Email: [email protected]

www.bpm-guide.de

The BPM Blog

@camunda.com

Consultant, trainer and software developer

Falko Menge

falko.menge

JUDCon

Berlin, 8 October 2010