Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Business Process Management (BPM) & the Eclipse Ecosystem

Business Process Management (BPM) & the Eclipse Ecosystem

Talk given at the Eclipse DemoCamp Kepler 2013 in Vienna.

Rafael Cordones

June 28, 2013
Tweet

More Decks by Rafael Cordones

Other Decks in Programming

Transcript

  1. Eclipse DemoCamp Kepler 2013 - Vienna, June 28th 2013 Slide

    1 / 234 Business Process Management (BPM) & the Eclipse Ecosystem [email protected] rafael.cordones.me @rafacm Don’t Panic! Just testing your attention!
  2. Eclipse DemoCap Kepler 2013 – June 28th 2013 | Vienna

    rafael.cordones.me rafael.cordones.me • Freelancer Java Ecosystem Software Developer • Background in enterprise software development for small organizations: • Most important feature of a product is the shipping date • Second most important feature is maintainability • Third most important feature is ... • Disclaimer: I am a contributor to the camunda BPM platform. • Yes, I grew up in the 80‘s and 90’s and I like music a lot! ;-) 2
  3. Eclipse DemoCap Kepler 2013 – June 28th 2013 | Vienna

    rafael.cordones.me What’s ahead? 1. What is BPM? 2. Why should I care as a developer? 3. Approaches to BPM implementation 4. Demo(s) 3
  4. Eclipse DemoCap Kepler 2013 – June 28th 2013 | Vienna

    rafael.cordones.me Business Process Management To all developers in the room... Close your eyes and take a moment to think of what comes to your mind about... BPM? Source: http://en.wikipedia.org/wiki/Sigmund_Freud 4
  5. Eclipse DemoCap Kepler 2013 – June 28th 2013 | Vienna

    rafael.cordones.me Business Process Management What some developers think? Source: http://www.youtube.com/watch?v=otCpCn0l4Wo 5 * My own little homage to “Winsongs 95”: http://www.youtube.com/watch?v=rjDSY8LczFw “U Can’t Touch This” by MC Hammer http://www.youtube.com/watch?v=otCpCn0l4Wo U can’t touch this! My, my, my... BPM is so hard ‘Cause it’s built on a load of crap What is this model here?! Wanna cover my eyes and plug my ears!*
  6. Eclipse DemoCap Kepler 2013 – June 28th 2013 | Vienna

    rafael.cordones.me One Reason Why? The Hype Cycle Source: http://en.wikipedia.org/wiki/Hype_cycle 6
  7. Eclipse DemoCap Kepler 2013 – June 28th 2013 | Vienna

    rafael.cordones.me What is BPM? 7 Software developers A tool! ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... One tool, two purposes: human (communication) and technical (communication)
  8. Eclipse DemoCap Kepler 2013 – June 28th 2013 | Vienna

    rafael.cordones.me What’s ahead? 1. What is BPM? 2. Why should I care as a developer? 3. Approaches to BPM implementation 4. Demo(s) 8
  9. Eclipse DemoCap Kepler 2013 – June 28th 2013 | Vienna

    rafael.cordones.me Different People, Different Languages 9 Customers Software developers Business analysts System administrators Product owners Sales Support
  10. Eclipse DemoCap Kepler 2013 – June 28th 2013 | Vienna

    rafael.cordones.me Different People, Different Languages 10 Customer Software developers Business analysts System administrators Support Sales Product owners
  11. Eclipse DemoCap Kepler 2013 – June 28th 2013 | Vienna

    rafael.cordones.me Business Process Model & Notation 2.0 Example: announcing a job position 11 Source: “Praxishandbuch BPMN 2.0” http://www.bpm- uide.de/2012/02/16/praxishandbuch-bpmn-2-0-in-der-3-aufla e/
  12. Eclipse DemoCap Kepler 2013 – June 28th 2013 | Vienna

    rafael.cordones.me Activities Conversations Events Gateways Conversation Diagram None: Untyped events, indicate start point, state changes or final states. Message: Receiving and sending messages. Timer: Cyclic timer events, points in time, time spans or timeouts. Error: Catching or throwing named errors. Cancel: Reacting to cancelled transactions or triggering cancellation. Compensation: Handling or triggering compensation. Conditional: Reacting to changed business conditions or integrating business rules. Signal: Signalling across differ- ent processes. A signal thrown can be caught multiple times. Multiple: Catching one out of a set of events. Throwing all events defined Link: Off-page connectors. Two corresponding link events equal a sequence flow. Terminate: Triggering the immediate termination of a process. Escalation: Escalating to an higher level of responsibility. Parallel Multiple: Catching all out of a set of parallel events. Start End Intermediate Catching Throwing Event Sub-Process Interrupting Top-Level Event Sub-Process Non-Interrupting Boundary Interrupting Boundary Non- Interrupting Sequence Flow defines the execution order of activities. Conditional Flow has a condition assigned that defines whether or not the flow is used. Default Flow is the default branch to be chosen if all other conditions evaluate to false. Task A Task is a unit of work, the job to be performed. When marked with a symbol it indicates a Sub-Process, an activity that can be refined. Transaction A Transaction is a set of activities that logically belong together; it might follow a specified transaction protocol. Event Sub-Process An Event Sub-Process is placed into a Process or Sub-Process. It is activated when its start event gets triggered and can interrupt the higher level process context or run in parallel (non- interrupting) depending on the start event. Call Activity A Call Activity is a wrapper for a globally defined Sub-Process or Task that is reused in the current process. Task Types Types specify the nature of the action to be performed: Send Task Receive Task User Task Manual Task Business Rule Task Service Task Script Task Markers indicate execution behavior of activities: Activity Markers Sub-Process Marker Loop Marker Parallel MI Marker Sequential MI Marker ~ Ad Hoc Marker Compensation Marker A Communication defines a set of logically related message exchanges. When marked with a symbol it indicates a Sub-Conversation, a compound conversation element. A Forked Conversation Link connects Communications and multiple Participants. A Conversation Link connects Communications and Participants. Inclusive Gateway When splitting, one or more branches are activated. All active incoming branches must complete before merging. Complex Gateway Complex merging and branching behavior that is not captured by other gateways. Exclusive Event-based Gateway (instantiate) Each occurrence of a subsequent event starts a new process instance. Parallel Event-based Gateway (instantiate) The occurrence of all subsequent events starts a new process instance. Pool (collapsed) Multi Instance Pool (collapsed) Communication Sub-Conversation Pool (collapsed) Participant B The order of message exchanges can be specified by combining message flow and sequence flow. Pool Pool Pools (Participants) and Lanes represent responsibilities for activities in a process. A pool or a lane can be an organization, a role, or a system. Lanes subdivide pools or other lanes hierarchically. Lane Task Lane Task Pool Message Flow symbolizes information flow across organizational boundaries. Message flow can be attached to pools, activities, or message events. Data Task Input Out- put Data Store A Data Object represents information flowing through the process, such as business documents, e-mails, or letters. A Data Store is a place where the process can read or write data, e.g., a database or a filing cabinet. It persists beyond the lifetime of the process instance. A Data Input is an external input for the entire process. It can be read by an activity. A Data Output is a variable available as result of the entire process. A Message is used to depict the contents of a communication between two Participants. A Collection Data Object represents a collection of information, e.g., a list of order items. Pool (Collapsed) Collaboration Diagram Pool (Expanded) Lane Lane Choreographies Choreography Diagram A Choreography Task represents an Interaction (Message Exchange) between two Participants. Choreography Task Participant A Participant B A Choreography Sub- Process contains a refined choreography with several Interactions. Multiple Participants Marker denotes a set of Participants of the same kind. Swimlanes BPMN 2.0 - Business Process Model and Notation Collection Ad-hoc Sub-Process Task Task ~ Message Start Event Message Flow Data Object Collapsed Sub-Process Event-based Gateway Escalation End Event Timer Intermediate Event Receive Task Attached Intermediate Timer Event Link Intermediate Event Manual Task End Event Data Store Link Intermediate Event Parallel Multiple Intermediate Event Text Annotation Group Multi Instance Task (Parallel) Message End Event Send Task Parallel Gateway Exclusive Gateway Attached Intermediate Error Event Signal End Event Call Activity Sub-Process Event Sub-Process Conditional Start Event Error End Event Start Event End Event Looped Sub-Process condition http://bpmb.de/poster Participant A Participant C Participant B Choreography Task Participant A Participant B Choreography Task Participant A Participant C Initiating Message Response Message Choreography Task Participant B Participant A When splitting, it routes the sequence flow to exactly one of the outgoing branches. When merging, it awaits one incoming branch to complete before triggering the outgoing flow. Exclusive Gateway Is always followed by catching events or receive tasks. Sequence flow is routed to the subsequent event/task which happens first. Event-based Gateway When used to split the sequence flow, all outgoing branches are activated simultaneously. When merging parallel branches it waits for all incoming branches to complete before triggering the outgoing flow. Parallel Gateway Choreography Sub-Process Participant A Participant C Participant B Model, Notation... and Execution PDF: http://www.bpmb.de/ima es/BPMN2_0_Poster_EN.pdf Printed: http://www.si navio.com/joomla/de/bpmn-poster.html 12
  13. Eclipse DemoCap Kepler 2013 – June 28th 2013 | Vienna

    rafael.cordones.me When do I need a business process? Business process modeling acid test*: 1. Long-running: hours, days, weeks, months, years, ... 2. Bursty, sleeps most of the time: when awake, a flurry of activities and then finished or to sleep again! 3. Persisted state: what happens between different steps or when the application server goes down? 4. Orchestration of system or human communications: who has to do what until when? what happens afterwards? 5. Flexibility to change it! * “Essential Business Process Modeling”, Michael Havey, O’Reilly Press http://shop.oreilly.com/product/9780596008437.do via http://stackoverflow.com/questions/4869734/how-do-you-know-when-you-need-a-bpm-solution 13
  14. Eclipse DemoCap Kepler 2013 – June 28th 2013 | Vienna

    rafael.cordones.me What’s ahead? 1. What is BPM? 2. Why should I care as a developer? 3. Approaches to BPM implementation 4. Demo(s) 14
  15. Eclipse DemoCap Kepler 2013 – June 28th 2013 | Vienna

    rafael.cordones.me Different Approaches All code Less code Zero code Look ma, no frameworks or libraries! Look ma, no programming! Look ma! ... Logging (Log4J, SLF4J, ...) ORM (Hibernate) MyBatis Template engines (Velocity, FreeMarker, ...) MVC frameworks (Spring MVC, Struts, ...) “It’s just a state machine” “You can model all your process needs down to the latest detail” 15 “I can implement that in two days” BPM engines (jBPM, Activiti, camunda BPM)
  16. Eclipse DemoCap Kepler 2013 – June 28th 2013 | Vienna

    rafael.cordones.me All Code Approach • Customers pay for features not for infrastructure • Flexibility for changing business logic? • The best code is the one others have written, tested and maintain for you! “Under Pressure” by Queen: http://www.youtube.com/watch?v=4-rkJmRiFug Mm ba ba de Um bum ba de Um bu bu bum da de Under pressure 16
  17. Eclipse DemoCap Kepler 2013 – June 28th 2013 | Vienna

    rafael.cordones.me All Code Approach Who’s going to maintain all that code? 17 From the movie: “Raiders of the Lost Ark” by Steven Spielberg. 1981.
  18. Eclipse DemoCap Kepler 2013 – June 28th 2013 | Vienna

    rafael.cordones.me Less Code Approach • Focus on what brings value • Learn transferable skills • Yes, all abstractions are leaky • Yes, all software has bugs (yours too!) “You Can’t Always Get What You Want” by The Rolling Stones: http://www.youtube.com/watch?v=oqMl5CRoFdk “You can’t always get what you want. But if you try, you will find, you get what you need” Source: http://en.wikipedia.org/wiki/Keith_Richards 18
  19. • No developers as the implicit promise? • Will indeed

    work in some cases • Will not work in all cases Eclipse DemoCap Kepler 2013 – June 28th 2013 | Vienna rafael.cordones.me Zero Code Approach Huey Lewis and the News - Trouble in paradise: http://www.youtube.com/watch?v=kk9TFRmWCH0 19 “Business analyst's home, he just got back from a modeling workshop. Plenty of models but nothing to execute. Developer said I, seen this before and it don't end nice. Looks like trouble in paradise. ”
  20. Eclipse DemoCap Kepler 2013 – June 28th 2013 | Vienna

    rafael.cordones.me Zero Code Approach? Rod (Spring Framework) Johnson - ScalaDays 2013 Keynote (at 39 min.) http://www.parleys.com/play/51c1ffe7e4b0d38b54f46231 20 “Much, indeed arguably, most real-world programming has very little to do with elegant expression of algorithms. It has to do with interacting with the fact that the world is a total mess. Wherever you look. [...] It’s a nasty mess out there. And a great deal of the code that we write is far more to do with navigating that nasty mess than it is with elegantly expressing algorithms.” BTW, there’s a Scala User Group in Vienna! http://www.meetup.com/scala-vienna/
  21. Eclipse DemoCap Kepler 2013 – June 28th 2013 | Vienna

    rafael.cordones.me Open-Source and Cloud BPMS 21 2010 ... ... 2011 2013 Drools Flow^H^H^H^H^H jBPM 5.0 camunda fox 6.0 camunda BPM 7.x Amazon Simple Workflow Service Activiti 5.0 Effektif BPM 2012 KISBPM Amazon is a trend-setter.
  22. Eclipse DemoCap Kepler 2013 – June 28th 2013 | Vienna

    rafael.cordones.me All-Inclusive Platforms/Suites? 22 Source: http://www.amazon.de/Wenger-Schweizer-Offiziersmesser-Messer-Schatulle/dp/B000R0JDSI/ Thanks to Bernd Rücker for the idea! http://de.slideshare.net/camunda/vortrag-auf-der-seacon-2013-in-hamburg-prozessautomatisierung-mit-bpmn-20-und-java Tightly integrated tools!
  23. Eclipse DemoCap Kepler 2013 – June 28th 2013 | Vienna

    rafael.cordones.me Anatomy of a Process Application “The Anatomy Lesson of Dr. Nicolaes Tulp” by Rembrandt: http://en.wikipedia.or /wiki/The_Anatomy_Lesson_of_Dr._Nicolaes_Tulp 23
  24. Eclipse DemoCap Kepler 2013 – June 28th 2013 | Vienna

    rafael.cordones.me Talk is cheap. Show me the code. Source: http://en.wikipedia.org/wiki/Linus_Torvalds http://en.wikiquote.org/wiki/Linus_Torvalds#2000-04 Anatomy of a Process Application 24 Demo
  25. • Drive your process and assert your expectations: Eclipse DemoCap

    Kepler 2013 – June 28th 2013 | Vienna rafael.cordones.me Fluent Process Testing API 25 https://github.com/camunda/camunda-bpm-fluent-testing
  26. • Mock your process dependencies (services): Eclipse DemoCap Kepler 2013

    – June 28th 2013 | Vienna rafael.cordones.me Fluent Process Testing API 26 https://github.com/camunda/camunda-bpm-fluent-testing
  27. Eclipse DemoCap Kepler 2013 – June 28th 2013 | Vienna

    rafael.cordones.me The Job Announcement A kick-start application for your business process- centric project! Java EE 6 technology stack camunda BPM Platform Try online at: http://the-job-announcement.com/ Source code at: https://github.com/plexiti/the-job- announcement 27
  28. Eclipse DemoCap Kepler 2013 – June 28th 2013 | Vienna

    rafael.cordones.me Order Confirmation Rules Demo 28 https://github.com/camunda/camunda-bpm-examples Drools integrated!
  29. Eclipse DemoCap Kepler 2013 – June 28th 2013 | Vienna

    rafael.cordones.me Conclusion • Why do I need... • ... in 1996 a language with a very slow virtual machine?! • ... in 2000 an MVC framework to implement my web application?! • ... in 2004 an ORM framework to implement my persistence concerns? • ... in 2010 an XML database? • ... in 2012 a NoSQL database? • ... in 2013 a business process engine to develop applications with processes as first-class citizens? 29
  30. Eclipse DemoCap Kepler 2013 – June 28th 2013 | Vienna

    rafael.cordones.me Give it a try! 30 http://camunda.or @camundaBPM #camunda
  31. Eclipse DemoCap Kepler 2013 – June 28th 2013 | Vienna

    rafael.cordones.me BPM and the Eclipse Ecosystem? 31