Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Devoxx 2009 Conference session Jbpm4 In Action

2,021 views

Published on

Published in: Technology, Business
  • Be the first to comment

Devoxx 2009 Conference session Jbpm4 In Action

  1. 1. jBPM 4 in Action by Tom Baeyens & Joram Barrez
  2. 2. Speaker’s qualifications Founded jBPM in 2003 Project Lead of jBPM Passionate about BPM and Java Articles/international conferences JBoss jBPM core developer (06/09) Before: jBPM/BPM consultant 2
  3. 3. jBPM is great for BPM *and* for developers 3
  4. 4. Business process An (organized) way of 'doing things' ... with a certain goal 6
  5. 5. Processes are everywhere 7
  6. 6. Processes are everywhere
  7. 7. Processes are everywhere
  8. 8. Conclusion Any company They all have Any product business processes Any service 10
  9. 9. Conclusion Any company They all have Any product business processes Any service Which means – 'Doing business' == executing some business process 11
  10. 10. Newsflash Every app you write – Is (part of) a business process So your job ... – implementing business processes! Wouldn't you rather have a powerful, flexible framework where you can apply all your Java-powers? 12
  11. 11. Introducing jBPM Transactional state-machine Generic graph execution engine But most of all... – A kick-ass JAVA BPM engine 13
  12. 12. jBPM Evolution jBPM 4 Product • Activity Pluggability API • Command Based Services •Multiple Languages • Many Execution modes • DB Partitioning • DB Evolution • Full Embeddability Project jBPM 3 • First Activity Pluggability • First Multiple Languages • First Enterprise Embeddability jBPM 2 • Std Java Embeddable • Hibernate state machine jBPM 1 • EJB state machine
  13. 13. jBPM today
  14. 14. jBPM today
  15. 15. JBPM v4: what's new? Clean & simplified – Based on 2nd generation PVM – New API (incl. cool query mechanism) – Compact db schema – Native Spring integration Improved tooling – Sexy GWT console – Signavio web modeling QA lab 17
  16. 16. jBPM3 jBPM4
  17. 17. Processes As Part Of Software Development Software Project Abstract Process Executable Process Non-tech Business Analyst <details /> Developer Analyst Java, XML, Buildscripts, Tests, … Developer EAP jBPM Your SOA-P App JBoss Tomcat JDK 5 Oracle, MySQL, PostgreSQL
  18. 18. jBPM API jbpm.cfg.xml Configuration cfg = new Configuration(); ProcessEngine processEngine = cfg.buildProcessEngine(); processEngine.getRepositoryService(); processEngine.getExecutionService(); processEngine.getHistoryService(); processEngine.getTaskService(); processEngine.getIdentityService();
  19. 19. Print Dots • Automatic activity • Print dots on the console
  20. 20. Starting ProcessInstance Some Web Framework public void userClickedButton() { ... executionService .startProcessInstanceByKey("PrintDots"); ... }
  21. 21. <process name=“PrintDots"> <start> <transition to="print dots" /> </start> <custom name="print dots" class="com.devoxx.jbpm.printdots.PrintDots"> <transition to="end" /> </custom> <end name="end"/> </process>
  22. 22. Bananas • Get a quote for bananas • Asynchronously executionService .signalExecutionById MDB FruitStore
  23. 23. <process name="Bananas"> <start> <transition to="get price for bananas"/> </start> <state name="get price for bananas"> <on event="start"> <event-listener class="com.devoxx.jbpm.bananas.GetPriceForBananas"/> </on> <transition to="print price of bananas"/> </state> <custom name="print price of bananas“ class="com.devoxx.jbpm.bananas.PrintPrice"> <transition to="end"/> </custom> <end name="end"/> </process>
  24. 24. Yummie • Choose 1 outgoing transition • Based on the price of bananas
  25. 25. <process name="Yummie"> <start> <transition to="checkPrice"/> </start> <decision name="checkPrice"> <transition to="yummie"> <condition expr="#{priceForBananas &lt; 10}" /> </transition> <transition to="hungry" /> </decision> <custom name="yummie" class="com.devoxx.jbpm.yummie.PrintMsg"> <field name="msg"> <string value="Yummie!" /> </field> </custom>
  26. 26. ... <custom name="hungry" class="com.devoxx.jbpm.yummie.PrintMsg"> <field name="msg"> <string value="I'm hungry :-(" /> </field> </custom> </process>
  27. 27. GetCoffee • User task Tasklist complete add task task
  28. 28. <process name="GetCoffee"> <start> <transition to="get coffee"/> </start> <task name="get coffee" assignee="johndoe"> <notification/> <transition to="print coffee"/> </task> <custom name="print coffee" class="com.devoxx.jbpm.coffee.PrintCoffee"/> </process>
  29. 29. Other Features • jPDL – Concurrency – Asynchronous continuations • Task forms – Rapid prototyping
  30. 30. Other Features • Production usage – Installer – Upgrade – Process versioning & migration – Clusterable
  31. 31. Other Features • Tools – Eclipse process designer – Web based modeller (Signavio) – Web console • Superfast
  32. 32. Other Features • Multiple process languages – jPDL – BPMN 2 !
  33. 33. DEMO •The train ticket demo •INTRO 35
  34. 34. Taking the train 2.0 • The Problem – Using coins, ticket machines, conductors, ... sooooo 2008 • The solution JBPM on Rails 36
  35. 35. Use case 1. Ticket request 3.Accept 2.Price quote Other Train System (EJB) 37
  36. 36. Architecture SMS Gateway HTTP Interface (Servlet) Ext. jBPM on Rails Sys. (EJB3) User Registration 38
  37. 37. Where can I find it? Blog http://www.jorambarrez.be /blog/2009/09/18/train-ticket-demo-overview-final-part-getting-started-with-jbpm-in-less-than-a-minute/ 39
  38. 38. DEMO •The train ticket demo 40
  39. 39. JBPM v4: performance jBPM 4.2 basic benchmark - Postgresql 8.3 (10 000 executio ns) 12 10 Seq. exec. 2 fixedT P 8 3 fixedT P 4 fixedT P avg duration (ms) 5 fixedT P 6 fixedT P 6 7 fixedT P 8 fixedT P 9 fixedT P 4 10 fixedTP 2 0 process 01 proces s 02 proces s 03 proces s 04 proces s 05 random Config: Ubuntu 9.04, AMD Phenom II X4 3.0Ghz, 8Gb Ram, 7200rpm HD DB and benchmark on same machine 41
  40. 40. JBPM v4: performance Avg process exec. time – 0.75ms – 2ms – 1.8 mil./hour – Yeah, that's fast jBPM overhead == (extremely) minimal – So what are you waiting for? 42
  41. 41. Getting started  I just know you're excited to give it a try  You can do it tonight  Just before you go to sleep  Or even in your bed  Last demo movie
  42. 42. Q&A makes your work flow http://jbpm.org http://proces s developments .blog s pot.com http://jorambarrez.be/blog

×