Sneak Preview of jBPM 4 at JAX conference

  • View
    4.098

  • Download
    0

  • Category

    Business

Preview:

DESCRIPTION

After a general introduction to BPM and jBPM, a couple of concrete examples show what jBPM can do.

Citation preview

1

jBPM 4 Sneak Preview

Tom BaeyensJBoss, Red Hat

2

JBoss jBPM• Business Process Management

– BPM as a discipline– BPM as software engineering

• What is jBPM• jBPM 4 Overview

3

Tom Baeyens• Lead and founder of JBoss jBPM• Consulting for numerous BPM projects• Bringing BPM mainstream• Articles

– InfoQ, TSS, Dzone, OnJava,…• Blogs

– http://processdevelopments.blogspot.com/• Talks

– JavaOne, JBossWorld, JAOO, TSS,…

4

BPM as a Discipline• Management discipline• Business processes grow organic

– Understand– Describe– Optimise

• Non technical• People to people

– What, not how– Can be vague

• Unrelated to software architecture• Often include diagrams

5

BPM as Software Engineering• Aspect of software expressed as a graph• Specifies execution flow• BPMS ‘runs’ process executions• It’s software

– DSL– Executes on one system– Central dispatcher– Multiple participants– Wait states

6

Traditional BPM Vendors• Stack Integrators

– Oracle, IBM, SAP– XML basis for BPM ?!– BPEL, WSDL Lots of tooling required to hide clumsy basics Deprecating BPEL in favour of BPMN

• Pure plays– Monolithic server– Automagical– Hard to integrate in your project

7

jBPM !• Bottom Up

– No magic• Server or embedded

– Not monolithic– Just a library

• Freedom– Use the most appropriate tech

• Java, groovy, web services, SQL– Java excellent dispatcher technology

8

Your AppYour Architecture

jBPM’s Modelling Advantage

jBPM

BusinessAnalyst

Developer

9

Your AppYour Architecture

jBPM’s Modelling Advantage

jBPM

BusinessAnalyst

Developer

10

jBPM Overview• Process Virtual Machine

– Java state machine library– Pluggable Activities

• jPDL– BPM as a discipline– Orchestrating Human Tasks & Services– Transactional Script– Execution modes

• SEAM Pageflow• …

11

jPDL Activities• Control flow

transition start end end-cancel end-error decision fork join super-statesub-process

• Functionalstate sub-process task java script esb hql sql

12

jPDL Features• Lots of functional activities

– mail, java, esb, task,…• Concurrency• Event listeners• Timers• Asynchronous continuations• Transactional exception handlers

13

State Choice

14

State Choice<process name="StateChoice">

<start> <transition to="wait for response"/> </start>

<state name="wait for response" > <transition name="accept" to="submit document" /> <transition name="reject" to="try again" /> </state>

<state name="submit document" /> <state name="try again" />

</process>

15

State ChoicerepositoryService.createDeployment() .addResourceFromClasspath( "org/jbpm/examples/state/choice/process.jpdl.xml“) .deploy();

16

State ChoiceProcessInstance processInstance = executionService .startProcessInstanceByKey("StateChoice"); String executionId = processInstance .findActiveExecutionIn("wait for response") .getId();

processInstance = executionService .signalExecutionById(executionId, "accept"); assertEquals("submit document", processInstance.getActivityName());

17

Human Task

18

Human Task<process name="TaskCandidates">

<start> <transition to="review" /> </start>

<task name="review" candidate-groups="sales-dept"> <transition to="wait" /> </task> <state name="wait" />

</process>

19

LDAP

Identity Component

jBPM

Identity Component Interface

jBPMbuild-in

JBossIDM

Your own custom

implementation

3 10

20

Identity Component

johndoe

joesmoe

sales-dept

membership

membership

21

Human TaskexecutionService .startProcessInstanceByKey("TaskCandidates");

List<Task> johnsTakableTasks = taskService.findTakableTasks("johndoe");

List<Task> joesTakableTasks = taskService.findTakableTasks("joesmoe");

taskService.takeTask(task.getDbid(), "johndoe");

List<Task> johnsPersonalTasks = taskService.findAssignedTasks("johndoe");

taskService.completeTask(task.getDbid());

22

Timer Transition

23

Timer Transition<process name="TimerTransition">

<start> <transition to="guardedWait" /> </start>

<state name="guardedWait"> <transition name="go on" to="next step" /> <transition name="timeout" to="escalation"> <timer duedate="2 business days" /> </transition> </state> <state name="next step" />

<state name="escalation" />

</process>

24

Asynchronous Continuations• Automatic activities in sequence• One takes a long time• Don’t block the client thread• async=“true”

Transaction 1 Transaction 2

JobExecutor

25

Designer

26

Console

27

Console

28

Conclusion• jBPM provides overview of application

– External triggers– Wait states– Business view

• jBPM adds a layer on top of TX basics– Transactional timers– Asynchronous messages

• Integrates with – Standard & Enterprise Java– JBoss and other app servers– SEAM– Spring

29

Q&A

30

Execution Modes

31

Execution Modes

Processes

Executions

History

JVMBPM Engine (1)

Persistent Dynamic

32

Execution Modes

Executions

History

JVMBPM Engine

ProcessResources

(2)Persistent

Process resource

33

Execution Modes

Executions

History

JVMBPM Engine

INSURANCE_CLAIMSID … STATE …

ProcessResources

(3)PersistentEmbeddedReferenced

34

Execution Modes

History

JVMBPM Engine

INSURANCE_CLAIMSID … STATE …

ProcessResources

(4)PersistentEmbeddedIncluded

“review”

35

Execution Modes

History

JVMBPM Engine

ProcessResources

ExecutionObjects

(5)Memory

With Persistent History

36

Execution ModesJVM

BPM Engine

ProcessResources

ExecutionObjects

(6)Memory

37

Process Concurrency