Bejug - Activiti in Action (part 1)

Post on 07-Dec-2014

2,917 views 2 download

Tags:

description

Activiti In ActionBejug presentation (31/03/2011)

transcript

by

for

Agenda• Introduction• Live coding• TechTalk• What do you get?• Demo

What is a business process?

3

A collection of related steps that produce value

What is a business process?

4

• Business processes are often the differentiator between two companies doing the same thing

What is a business process?

5

• Business processes are often the differentiator between two companies doing the same thing

What is a business process?

6

• Business processes are often the differentiator between two companies doing the same thing

What is a business process?

7

• Often visualized using some kind of flowcharts• Insight into business (mgmt perspective)• Communication IT-business

• Business process Management is a HUGE field

What is a business process?

8

• Often visualized using some kind of flowcharts• Insight into business (mgmt perspective)• Communication IT-business

• Business process Management is a HUGE field

Suppose 250 pages/book 2 612 500 pages on BPM

*http://wiki.answers.com/Q/How_much_paper_can_one_tree_produce

*

313

BPM

tree

s

But technically…

9

10

BPMN 2.0

• OMG standard– Shapes– Execution

semantics– File format

• First pure play BPM standard– With general endorsement

11

What does that mean?• Huge pool of BPMN skilled analysts• Any BPMN 2.0 compliant editor

• MS Visio, Oracle, IBM, Aris, etc.

• Executable on Activiti engine

But technically…

12

What is Activiti?

13

100% Java

100% oSS

Lightwei

ght

Performant

Embeddable

What is Activiti?

14

Activiti

What is Activiti?

15

API runtimeService.startProcessInstance…

Forms

The diagram

So technically …

16

Activiti

Joey needs

to call the customer

HR needs to approve

the expenseSelect helpdesk ticket

Check order state in SAP

Book flight

through

webserviceGenerate PDF

What does that mean for you?

Typical BPM

attitude

What does that mean for you?• Developers are crucial for the success

of a BPM project!

• Business processes practically always require automated steps and integrations

• Activiti gives the developer the power and flexibility he/she needs to be extremely productive

Activiti

Release fast, release often

19

• Serious # bugfixes / features every month

Who contributes to Activiti?

Agenda• Introduction• Live coding• TechTalk• What do you get?• Demo

Live coding

22

Demonstrating the

simplicity and power

of Activiti

Activiti + command line

Activiti + Spring

Activiti + webappIn only 10 minutes!

TechTalk

23

Unit testing business processes• With Activiti, your business processes are an integral part of

your software project• So they should be tested the same as regular code … with

unit tests!

• Activiti supports JUnit 3 and JUnit4 style of unit tests• + a lot of convience for testing

Unit testing business processesJunit 3.X style

Unit testing business processesJunit 4 style

Timers

27

• Work is often time constrained

• A timer boundary event can be attached to the boundary of any step (or subprocess)

Method expressions and JPA

28

Process variables

Spring beanDecision based on JPA entity property

Update JPA entity

Work in progress

29

• CDI/Spring annotations

<serviceTask activiti:expression=“${myBean.doSomething()}”

Spring Bean CDI Managed Bean

eg. EJB

Work in progress

30

• CDI/Spring annotations

@ProcessScopePublic class MyBean {

@StartProcess(“helloWorldProcess”) public void something(@ProcessVariable(“customerId”) long custId) { .. }

@CompleteTask(key=“theTask”) public void somethingElse() { … }

@State(“confirm-receipt”) public void confirmReceipt(@ProcessVariable(“myVar”) …

}

Agenda• Introduction• Live coding• TechTalk• What do you get?• Demo

32

What do you get?• World-class rock-solid BPM and workflow

engine

32

Not only the engine?Activiti Modeler

Activiti Cycle

Activiti Explorer

Activiti Probe

Activiti Designer

REST interface

iPhoneExplorer

Activiti Engine

AndroidExplorer

Java Applications

34

Activiti Modeler• Webbased BPMN 2.0 graphical editor

34

35

Activiti Explorer• Process end-users (task mgmt)

35

36

Activiti Probe• System admins• Status overview, stuck jobs, exceptions, logs, …

36

37

Activiti Cycle• Collaboration … done right

37

38

Activiti KickStart

38

Activiti REST API

39

• Remote communication regardless of the technology

• Activiti extension support, BPMN 2.0 validation, hierarchical modeling

Activiti Eclipse designer

40

• Pluggable activity support

Activiti Eclipse designer

41

Mobile Activiti

42

Mobile Activiti

43

• Grails convience capabilities• Typical configuration• Easy business archive deployment• Generate controllers/view/example app

Activiti & Grails

44

Agenda• Introduction• Live coding• TechTalk• What do you get?• Demo

Real-life demo

46

• Use case: banks shouldn’t lend money to just anybody• Thorough analysis is needed• All steps needs to be recorded in official documents• Decisions are done based on Excel decision tables

The mortgage process

47

The mortgage process

48

The mortgage process

49

= CMIS call

The power of Java

50

Out-of-the-box

Custom Java

The power of Java

51

public class CreateLoanApplicationDocument implements JavaDelegate {

public void execute(DelegateExecution execution) {

Session session = CmisUtil.createCmisSession("admin", "admin", Constants.ALFRESCO_URL); Folder folder = CmisUtil.getFolder(session, Constants.LOAN_APPLICATION_STORAGE_FOLDER); Document document = createWordDocument(session, folder, execution); storeDocumentReferencesAsProcessVariables(execution, folder, document); session.save(); }