bejug - activiti in action (part 1)

51
by for

Upload: joram-barrez

Post on 07-Dec-2014

2.918 views

Category:

Technology


2 download

DESCRIPTION

Activiti In ActionBejug presentation (31/03/2011)

TRANSCRIPT

Page 1: Bejug - Activiti in Action (part 1)

by

for

Page 2: Bejug - Activiti in Action (part 1)

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

Page 3: Bejug - Activiti in Action (part 1)

What is a business process?

3

A collection of related steps that produce value

Page 4: Bejug - Activiti in Action (part 1)

What is a business process?

4

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

Page 5: Bejug - Activiti in Action (part 1)

What is a business process?

5

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

Page 6: Bejug - Activiti in Action (part 1)

What is a business process?

6

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

Page 7: Bejug - Activiti in Action (part 1)

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

Page 8: Bejug - Activiti in Action (part 1)

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

Page 9: Bejug - Activiti in Action (part 1)

But technically…

9

Page 10: Bejug - Activiti in Action (part 1)

10

BPMN 2.0

• OMG standard– Shapes– Execution

semantics– File format

• First pure play BPM standard– With general endorsement

Page 11: Bejug - Activiti in Action (part 1)

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

Page 12: Bejug - Activiti in Action (part 1)

But technically…

12

Page 13: Bejug - Activiti in Action (part 1)

What is Activiti?

13

100% Java

100% oSS

Lightwei

ght

Performant

Embeddable

Page 14: Bejug - Activiti in Action (part 1)

What is Activiti?

14

Page 15: Bejug - Activiti in Action (part 1)

Activiti

What is Activiti?

15

API runtimeService.startProcessInstance…

Forms

The diagram

Page 16: Bejug - Activiti in Action (part 1)

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

Page 17: Bejug - Activiti in Action (part 1)

What does that mean for you?

Typical BPM

attitude

Page 18: Bejug - Activiti in Action (part 1)

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

Page 19: Bejug - Activiti in Action (part 1)

Release fast, release often

19

• Serious # bugfixes / features every month

Page 20: Bejug - Activiti in Action (part 1)

Who contributes to Activiti?

Page 21: Bejug - Activiti in Action (part 1)

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

Page 22: Bejug - Activiti in Action (part 1)

Live coding

22

Demonstrating the

simplicity and power

of Activiti

Activiti + command line

Activiti + Spring

Activiti + webappIn only 10 minutes!

Page 23: Bejug - Activiti in Action (part 1)

TechTalk

23

Page 24: Bejug - Activiti in Action (part 1)

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

Page 25: Bejug - Activiti in Action (part 1)

Unit testing business processesJunit 3.X style

Page 26: Bejug - Activiti in Action (part 1)

Unit testing business processesJunit 4 style

Page 27: Bejug - Activiti in Action (part 1)

Timers

27

• Work is often time constrained

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

Page 28: Bejug - Activiti in Action (part 1)

Method expressions and JPA

28

Process variables

Spring beanDecision based on JPA entity property

Update JPA entity

Page 29: Bejug - Activiti in Action (part 1)

Work in progress

29

• CDI/Spring annotations

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

Spring Bean CDI Managed Bean

eg. EJB

Page 30: Bejug - Activiti in Action (part 1)

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”) …

}

Page 31: Bejug - Activiti in Action (part 1)

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

Page 32: Bejug - Activiti in Action (part 1)

32

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

engine

32

Page 33: Bejug - Activiti in Action (part 1)

Not only the engine?Activiti Modeler

Activiti Cycle

Activiti Explorer

Activiti Probe

Activiti Designer

REST interface

iPhoneExplorer

Activiti Engine

AndroidExplorer

Java Applications

Page 34: Bejug - Activiti in Action (part 1)

34

Activiti Modeler• Webbased BPMN 2.0 graphical editor

34

Page 35: Bejug - Activiti in Action (part 1)

35

Activiti Explorer• Process end-users (task mgmt)

35

Page 36: Bejug - Activiti in Action (part 1)

36

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

36

Page 37: Bejug - Activiti in Action (part 1)

37

Activiti Cycle• Collaboration … done right

37

Page 38: Bejug - Activiti in Action (part 1)

38

Activiti KickStart

38

Page 39: Bejug - Activiti in Action (part 1)

Activiti REST API

39

• Remote communication regardless of the technology

Page 40: Bejug - Activiti in Action (part 1)

• Activiti extension support, BPMN 2.0 validation, hierarchical modeling

Activiti Eclipse designer

40

Page 41: Bejug - Activiti in Action (part 1)

• Pluggable activity support

Activiti Eclipse designer

41

Page 42: Bejug - Activiti in Action (part 1)

Mobile Activiti

42

Page 43: Bejug - Activiti in Action (part 1)

Mobile Activiti

43

Page 44: Bejug - Activiti in Action (part 1)

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

Activiti & Grails

44

Page 45: Bejug - Activiti in Action (part 1)

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

Page 46: Bejug - Activiti in Action (part 1)

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

Page 47: Bejug - Activiti in Action (part 1)

The mortgage process

47

Page 48: Bejug - Activiti in Action (part 1)

The mortgage process

48

Page 49: Bejug - Activiti in Action (part 1)

The mortgage process

49

= CMIS call

Page 50: Bejug - Activiti in Action (part 1)

The power of Java

50

Out-of-the-box

Custom Java

Page 51: Bejug - Activiti in Action (part 1)

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(); }