30

Executing BPMN 2.0 with jBPM3 - JBoss Developer · jBPM job EJB-Call with sync. result. Process Engine Abstraction Layer (PEAL) API Application Services ESB BPMN Binding Modell Process

Embed Size (px)

Citation preview

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

• 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

BPMN

Mapping BPMN to jPDL

BPMN

Mapping BPMN to jPDL

OverviewOverview

Abstracting the EngineAbstracting the Engine

BPMN?BPMN?

BPMN 2.0 – An ExampleBPMN 2.0 – An Example

BPMN 2.0 StatusBPMN 2.0 Status

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

InterchangeDiagram

Interchange SemanticsExecution Semantics

<XML> <XML>

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

NotationNotation

BPMN 2.0: Model and NotationBPMN 2.0: Model and Notation

NotationModel

ExamplesExecution Semantics

NotationModel

XML Diagram Interchange

XML XMI

XSLT

Desired Architecture with BPMN 2.0Desired Architecture with BPMN 2.0

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

BP

EL

e

tc.

Where are thoseBPMN process engines?BPMN process engines?

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

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

??

Goal: Forward EngineeringGoal: Forward Engineering

Mapping

ProcessAnalyst

Mapping

ProcessEngineer

Or evenRoundtrip?

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

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

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

� Pool extraction

� Transform custom elements into standard language constructs

� Custom task service

� Localization

PatternsPatterns

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

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

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)

+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

Abstraction of Service AdaptersAbstraction of Service Adapters

jBPM 3

API

Binding (e.g. jBPM 3)

Project specific adaptors

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

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

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

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

Telefon: +49 30 664 0409-00

Telefax: +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