Download - Activiti in Action (Devoxx 2010)
![Page 1: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/1.jpg)
Activiti in ActionTom Baeyens & Joram Barrez
Alfresco
1
![Page 2: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/2.jpg)
Last year…• We talked about jBPM
• JBoss
• Things change
• BPMN 2.0
• Consolidating efforts
• Liberal license required
• Alfresco
• Warm heart
2
![Page 3: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/3.jpg)
33
![Page 4: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/4.jpg)
4
ECM + BPM
![Page 5: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/5.jpg)
BPMN 2.0• OMG standard
–Shapes
–Execution semantics
–File format
• Membership
• First pure play BPM standard
• General endorsement
5
![Page 6: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/6.jpg)
Activiti In Evolution
6
DSLs
![Page 7: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/7.jpg)
Activiti & Java• Out-of-the-box
–Control flow
–Functional activity types
–Everything you exect in a typical BPM System
• But…–Not limited to out of the box
7
![Page 8: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/8.jpg)
Activiti is an Embeddable Process Engine
8
Oracle || MySQL || PostgreSQL || Any DB…
Executions
History
.jar
Processes
Your Domain Tables
Any JavaEnvironment
![Page 9: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/9.jpg)
Activiti Embeds In Your App• Embeds in
• Your database• Your transaction• Your domain model• Your tests• Your Spring configuration
9
TomcatJDK 5JBoss…
Oracle, MySQL, PostgreSQL
Activiti YourApp
Spring
![Page 10: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/10.jpg)
Community
10
![Page 11: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/11.jpg)
Community
11
![Page 12: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/12.jpg)
12
Last year…
12
jBPM 3
jBPM 4
![Page 13: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/13.jpg)
13
Today
13
![Page 14: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/14.jpg)
14
What do you get?• World-class rock-solid BPM and workflow engine
14
![Page 15: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/15.jpg)
Not only the engine?
15
Activiti ModelerActiviti
Modeler
Activiti CycleActiviti Cycle
Activiti ExplorerActiviti
Explorer
Activiti ProbeActiviti Probe
Activiti Designer
Activiti Designer
REST interfaceREST interface
iPhoneExploreriPhone
Explorer
Activiti EngineActiviti Engine
AndroidExplorerAndroidExplorer
Java ApplicationsJava Applications
![Page 16: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/16.jpg)
16
Activiti Modeler• Webbased BPMN 2.0 graphical editor
16
![Page 17: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/17.jpg)
17
Activiti Explorer• Task management
• Process instance inspection, reporting
17
![Page 18: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/18.jpg)
18
Activiti Probe• System admin functionality
• Status overview, stuck jobs, exception inspection, logs, etc
18
![Page 19: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/19.jpg)
19
Activiti Cycle• BPM collaboration … done right
19
Driven by
The Community!
![Page 20: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/20.jpg)
Activiti REST API
20
• Remote communication regarless of the technology
![Page 21: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/21.jpg)
• Activiti extension support, BPMN 2.0 validation, hierarchical modeling
Activiti Eclipse designer
21
Driven by
The Community!
![Page 22: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/22.jpg)
• Pluggable activity support
Activiti Eclipse designer
22
Driven by
The Community!
![Page 23: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/23.jpg)
• Mobile BPM == natural evolution of doing work
• Android client coming up!
Activiti & IPhone
23
Driven by
The Community!
![Page 24: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/24.jpg)
• Grails convience capabilities• Typical configuration• Easy business archive deployment• Generate controllers/view/example app
Activiti Grails integration
24
Driven by
The Community!
![Page 25: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/25.jpg)
Hello World
25
<process id=”helloWorldProcess" name=“My first process"> <startEvent id="theStart" /> <sequenceFlow id="flow1" sourceRef="theStart" targetRef="theTask" /> <userTask id="theTask" name="my task" /> <sequenceFlow id="flow2" sourceRef="theTask" targetRef="theEnd" /> <endEvent id="theEnd" /> </process>
Activiti Modeler, MS Visio,Aris, (Oracle)
ProcessEngine engine= new ProcessEngineBuilder() .configureFromResource(“activiti.cfg.xml”) .buildProcessEngine();engine.getRuntimeService().startProcessInstanceByKey(“helloWorldProcess”);Task task = engine.getTaskService().createTaskQuery().singleResult();Engine.getTaskService().complete(task.getId());
![Page 26: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/26.jpg)
Real-life demo
26
• 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 27: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/27.jpg)
The mortgage process
27
![Page 28: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/28.jpg)
The mortgage process
28
![Page 29: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/29.jpg)
The mortgage process
29
= CMIS call
![Page 30: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/30.jpg)
The power of Java
30
Out-of-the-box
Custom Java
![Page 31: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/31.jpg)
The power of Java
31
public class CreateLoanApplicationDocument implements JavaDelegation {
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(); }
![Page 32: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/32.jpg)
The cool stuff
32
• That didn’t make it in the demo
• But is just too cool not to show you
• Unit test support
• Query API
• Spring integration
• Method expressions
• JPA integration
![Page 33: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/33.jpg)
Unit testing your processes
33
• With Activiti, business processes
• Live and breath along your regular app code
• Should be tested just the same!
• Typical BPM vendor & testing
• Activiti supports Junit 3 & 4 and offers lots of convience while testing
![Page 34: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/34.jpg)
Query API• No need to learn the intern data model • Powerful and uniform query API
• Deployments and process definitions
• Process instances and executions
• History
• Variables
• Tasks, jobs, users, groups, historic activities/process instances/variables, …
repositoryService.createProcessDefinitionQuery.keyLike(“%mortgage%”).latest();
runtimeService.createProcessInstanceQuery .processDefinitionKey(“mortgage-process)”.orderByProcessInstanceId().desc();
historyService.createHistoricActivityQuery().processDefinitionId(procDefId) .activityType(“userTask”).orderByDuration().asc();
runtimeService.createProcessInstanceQuery() .variableValueGreaterThan(“amount”, 50000);
![Page 35: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/35.jpg)
Spring integration• ProcessEngine as a Spring bean
• Delegate to Spring beans
35
<bean id=“printer” …
![Page 36: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/36.jpg)
Method expressions & JPA
36
Process variables
Spring bean
Decision based on JPA entity property
![Page 37: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/37.jpg)
The Activiti Experience
37
• Satisfy your Activiti itch
• One-stop-shop download• http://activiti.org
• Demo: “The Activiti Experience”• Do you have an excuse for
not trying out Activiti tonight?
![Page 38: Activiti in Action (Devoxx 2010)](https://reader037.vdocument.in/reader037/viewer/2022102900/54be4f384a795929458b45df/html5/thumbnails/38.jpg)
Did you like what you saw?
38
• We keep making Activiti better, every day.
• Help us today and tweet your enthousiasm!
• @johnpowell996 I saw #activiti on #devoxx and I like it!
John Powell
CEO Alfresco