Activiti in Action  Tom Baeyens & Joram Barrez                     Alfresco                      1
Last year…• We talked about jBPM• JBoss• Things change• BPMN 2.0• Consolidating efforts• Liberal license required• Alfresc...
3
 ECM + BPM              4
BPMN 2.0• OMG standard – Shapes – Execution   semantics – File format• Membership• First pure play BPM standard• General e...
Activiti In Evolution                            DSLs                        6
Activiti & Java• Out-of-the-box – Control flow – Functional   activity types – Everything you   exect in a   typical   BPM...
Activiti is an Embeddable Process Engine   Any                             .jar   Java   Environment                 Oracl...
Activiti Embeds In Your App• Embeds in   • Your database   • Your transaction   • Your domain model   • Your tests   • You...
Community            10
Community            11
Last year…jBPM 3             jBPM 4                      12
Today        13
What do you get?• World-class rock-solid BPM and workflow engine                                                   14
Not only the engine?      Activiti       Activiti              Java Applications                             Java Applicat...
Activiti Modeler• Webbased BPMN 2.0 graphical editor                                       16
Activiti Explorer• Task management• Process instance inspection, reporting                                           17
Activiti Probe• System admin functionality• Status overview, stuck jobs, exception inspection, logs, etc                  ...
Th Drive                                          eC    n                                             om byActiviti Cycle ...
Activiti REST API• Remote communication regarless of the technology 20
Th Drive                                                       eC     n                                                   ...
Th Drive                                 eC     n                                   om b yActiviti Eclipse designer       ...
Th Drive                                                    eC     n                                                      ...
Th Drive                                               eC     n                                                 om byActiv...
Hello World                                                            Activiti Modeler,                                  ...
Real-life demo • Use case: banks shouldn’t lend money to just anybody • Thorough analysis is needed • All steps needs to b...
The mortgage process27
The mortgage process28
The mortgage process  = CMIS call                       29
The power of Java      Out-of-the-box      Custom Java 30
The power of Javapublic class CreateLoanApplicationDocument implements JavaDelegation { public void execute(DelegateExecut...
The cool stuff• That didn’t make it in the demo• But is just too cool not to show you  • Unit test support  • Query API  •...
Unit testing your processes• With Activiti, business processes  • Live and breath along your regular app code  • Should be...
Query API • No need to learn the intern data model • Powerful and uniform query API    • Deployments and process definitio...
Spring integration      • ProcessEngine as a Spring bean      • Delegate to Spring beans                                  ...
Method expressions & JPA                                   Decision based on                                   JPA entity ...
The Activiti Experience      • Satisfy your Activiti itch      • One-stop-shop download         • http://activiti.org     ...
Did you like what you saw?      • We keep making Activiti better, every day.      • Help us today and tweet your enthousia...
Upcoming SlideShare
Loading in …5
×

Activiti in Action (Devoxx 2010)

1,026 views

Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Activiti in Action (Devoxx 2010)

  1. 1. Activiti in Action Tom Baeyens & Joram Barrez Alfresco 1
  2. 2. Last year…• We talked about jBPM• JBoss• Things change• BPMN 2.0• Consolidating efforts• Liberal license required• Alfresco• Warm heart 2
  3. 3. 3
  4. 4.  ECM + BPM 4
  5. 5. BPMN 2.0• OMG standard – Shapes – Execution semantics – File format• Membership• First pure play BPM standard• General endorsement 5
  6. 6. Activiti In Evolution DSLs 6
  7. 7. 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
  8. 8. Activiti is an Embeddable Process Engine Any .jar Java Environment Oracle || MySQL || PostgreSQL || Any DB… Processes Executions History 8 Your Domain Tables
  9. 9. Activiti Embeds In Your App• Embeds in • Your database • Your transaction • Your domain model • Your tests • Your Spring configuration Tomcat Activiti Your JDK 5 App JBoss Spring Oracle, MySQL, PostgreSQL … 9
  10. 10. Community 10
  11. 11. Community 11
  12. 12. Last year…jBPM 3 jBPM 4 12
  13. 13. Today 13
  14. 14. What do you get?• World-class rock-solid BPM and workflow engine 14
  15. 15. Not only the engine? Activiti Activiti Java Applications Java Applications Modeler Modeler Activiti Activiti Designer Designer Activiti Activiti Activiti Activiti Probe Probe Engine Engine Activiti Activiti Explorer Explorer Activiti Activiti REST interface REST interface Cycle Cycle iPhone iPhone Android Android Explorer Explorer Explorer Explorer 15
  16. 16. Activiti Modeler• Webbased BPMN 2.0 graphical editor 16
  17. 17. Activiti Explorer• Task management• Process instance inspection, reporting 17
  18. 18. Activiti Probe• System admin functionality• Status overview, stuck jobs, exception inspection, logs, etc 18
  19. 19. Th Drive eC n om byActiviti Cycle mu nit y!• BPM collaboration … done right 19
  20. 20. Activiti REST API• Remote communication regarless of the technology 20
  21. 21. Th Drive eC n om b yActiviti Eclipse designer mu nit y!• Activiti extension support, BPMN 2.0 validation, hierarchical modeling 21
  22. 22. Th Drive eC n om b yActiviti Eclipse designer mu nit y!• Pluggable activity support 22
  23. 23. Th Drive eC n om b yActiviti & IPhone mu nit y!• Mobile BPM == natural evolution of doing work• Android client coming up! 23
  24. 24. Th Drive eC n om byActiviti Grails integration mu nit y!• Grails convience capabilities • Typical configuration • Easy business archive deployment • Generate controllers/view/example app 24
  25. 25. Hello World Activiti Modeler, MS Visio, Aris, (Oracle) <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> ProcessEngine engine= new ProcessEngineBuilder() .configureFromResource(“activiti.cfg.xml”) .buildProcessEngine(); engine.getRuntimeService().startProcessInstanceByKey(“helloWorldProcess”); Task task = engine.getTaskService().createTaskQuery().singleResult(); Engine.getTaskService().complete(task.getId()); 25
  26. 26. Real-life demo • 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 26
  27. 27. The mortgage process27
  28. 28. The mortgage process28
  29. 29. The mortgage process = CMIS call 29
  30. 30. The power of Java Out-of-the-box Custom Java 30
  31. 31. The power of Javapublic 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(); } 31
  32. 32. The cool stuff• 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 32
  33. 33. Unit testing your processes• 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 33
  34. 34. Query API • No need to learn the intern data model • Powerful and uniform query API • Deployments and process definitions repositoryService.createProcessDefinitionQuery.keyLike(“%mortgage%”).latest(); • Process instances and executions runtimeService.createProcessInstanceQuery .processDefinitionKey(“mortgage-process)”.orderByProcessInstanceId().desc(); • History historyService.createHistoricActivityQuery().processDefinitionId(procDefId) .activityType(“userTask”).orderByDuration().asc(); • Variables runtimeService.createProcessInstanceQuery() .variableValueGreaterThan(“amount”, 50000); • Tasks, jobs, users, groups, historic activities/process instances/variables, …
  35. 35. Spring integration • ProcessEngine as a Spring bean • Delegate to Spring beans <bean id=“printer” … 35
  36. 36. Method expressions & JPA Decision based on JPA entity property Spring bean Process variables 36
  37. 37. The Activiti Experience • 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? 37
  38. 38. Did you like what you saw? • We keep making Activiti better, every day. • Help us today and tweet your enthousiasm! • @johnpowell996 I saw #activiti on #devoxx and I like it! owell John P esco Alfr CEO 38

×