2012 02-04 fosdem 2012 - guvnor and j bpm designer

  • 2,561 views
Uploaded on

Presentation over Drools, Guvnor, jBPM and jBPM Designer given by Geoffrey De Smet and Marco Rietveld at FOSDEM 2012.

Presentation over Drools, Guvnor, jBPM and jBPM Designer given by Geoffrey De Smet and Marco Rietveld at FOSDEM 2012.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
2,561
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
223
Comments
0
Likes
5

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • Who’s heard of BPM? Who’s actually written BPMN? Who’s heard of jBPM? Who’s worked with business analysts? Who has enjoyed working with business analysts? Who’s sees themselves becoming a business analyst in the coming years? ... my apologies.
  • Please, if you become a business analyst, let the developers do their work. I’ve worked a few different places where the software requirements were filled with business terms that took a while to learn. Regardless of where you work, as a developer you have to learn the domain: bank accounts, freight logistics, insurance models, etc. Part of the problem here is that not only do the business analysts have to create and write down the business process – we then have to translate it into code. There’s a duplication of effort in the sense that both analyst and developer sometimes have to understand the business process fully. And of course, there are always “gotcha’s” -- my housemate was complaining the other day about how they wanted generic screens for processing orders (train-related company) except for that 1 (of 7) screen.
  • This is a slightly more polite version of the last slide. We want the business analysts to concentrate on the business process – not the code. (Anecdote: an ex-colleague analyst of mine was great – but he was an old developer, and wanted us to code things certain way. I would say to him: “The hell with that – you do your work, I’ll do mine!”) Make them active participants in the process.
  • This is what I’m going to talk about: - Business Analyst stuff and what we then use to implement it - What is this thing i’m talking about and.. what does it do? - Demo! (people who are taking naps, please wake up) - Summary, because you’ll have forgotten everything I said before the demo
  • It’s why developers at companies who don’t make software, get paid. Not really – it’s more than that: it’s whole interaction. Visibility: Hey, I can understand what’s happening! Monitoring: Wow, I can really see what’s happening now! High-level: Huh, I understand what’s going on here. Continuous: Modification of BP’s without developer involvement Speed: Which means work is done more quickly Agility: Which means companies/development can respond more quickly
  • Worked at a logistics company, and changing how incoming freight information was processed was a nightmare. - Change requests - New Projects - AHHH... I’m having flashbacks. Unstructured/Non-linear: maybe it’s not a A, B, C process: - for example: Monitoring, processing incoming streams of input Adaptive Case Management - Basically, data-driven processes – where the process is based on the data, not the other way around Event-driven: - Multiple events “processed” in one process
  • Model: graphical Notation: xml-based syntax Execution: how things should be done “ Understandable” -- see next slide, xml, not easily readable - collaboration between different parties - and we’re moving on, now..
  • Ehh.. no one wants to write bpmn 2. Which is why we have the designer
  • Hey, we’re done with the Business Analyst stuff..
  • JBPM is an open-source business process management project, for those of you who don’t know how to read
  • Explain diagram Point out integration with rules
  • So, done with the background, and now we’re going to look at Designe Lead on Designer in Tihomir Surdilovic, based on the Oryx project with lots of additionsr
  • So, we edit BPMN processes here. The BPMN it creates conforms to the BPMN syntax (big surprise!) and it works with BPMN internally. But it does more.. (and I’ll get to that in a sec). Guvnor integration helps make guvnor the “one-stop shop” Some people have built their own applications by embedding Designer and using the Guvnor rest api.
  • This is just a brief overview so that you guys will know where to look when I’m doing the demo.
  • On the left is a set of images showing how the shape menu works.
  • Task form generation

Transcript

  • 1. Geoffrey De Smet Marco Rietveld Managing workflows and business rules with Guvnor and jBPM designer
  • 2. Business Logic Integration Business Logic Integration Platform Rule engine Workflow Complex event processing (CEP) Business Rule Management System (BRMS) Automated planning
  • 3. Geoffrey De Smet Why would I need Drools and Guvnor?
  • 4. Use cases I have hammer, so every problem is a nail?
  • 5. The myth
    • Drools is a rule engine
    • 6. So because
      • Drools can fulfil business rules
      • 7. Drools is Turing complete
    • we should write the entire business layer in Drools?
      • No!
      • 8. Not imperative
        • Not like Java, Scala, Groovy, ...
      • Declarative
        • Like RegEx, SQL, JPA-QL, …
        • 9. Easier to read, better at scaling
  • 10. When to use Drools
    • Extract business decisions in Drools that either:
      • Require schooled domain expertise
      • 11. Change often/fast
  • 12. Use cases
    • Financial decisions
      • Mortgages acceptance and interest calculation
      • 13. Insurances acceptance and fee calculation
  • 14. Use cases
    • Financial decisions
      • Mortgages acceptance and interest calculation
      • 15. Insurances acceptance and fee calculation
    • Price calculations
      • Phone/Telecom bills
  • 16. Use cases
    • Financial decisions
      • Mortgages acceptance and interest calculation
      • 17. Insurances acceptance and fee calculation
    • Price calculations
      • Phone/Telecom bills
    • Diagnostics
      • Possible diseases based on symptoms
  • 18. Use cases
    • Financial decisions
      • Mortgages acceptance and interest calculation
      • 19. Insurances acceptance and fee calculation
    • Price calculations
      • Phone/Telecom bills
    • Diagnostics
      • Possible diseases based on symptoms
    • Complex validation
      • Car parts selection
  • 20. Use cases
    • Financial decisions
      • Mortgages acceptance and interest calculation
      • 21. Insurances acceptance and fee calculation
    • Price calculations
      • Phone/Telecom bills
    • Diagnostics
      • Possible diseases based on symptoms
    • Complex validation
      • Car parts selection
    • Not a good use case: an XML parser
      • Use Java code for that
  • 22. Mortgages example
  • 23. Developers don't like data input from spreadsheets
    • Before App 1.0: Mortgages rules in a spreadsheet
      • Which version/copy of the spreadsheet file?
      • 24. Which field has the result our application needs?
    Version 1 Version 2
  • 25. Mortgage experts like the flexibility of spreadsheets
    • Since App 1.0: Mortgages rules in source code
      • Changing business rules not flexible enough
      • 26. Business rules are hard coded in Java
    Invalid: must be a number
  • 27. Mortgage experts change their mind a lot
    • Flooded with new improvement requests:
      • when income below 500
      • 28. when income below 1000 and age above 50
      • 29. when income below 1% of mortgage amount
    Invalid: must be a number
  • 30. Mortgage experts like the flexibility of Guvnor
    • App 2.0: Mortgage rules in Guvnor repository
      • Flexible like spreadsheet
        • But backed by formal DRL and JavaBeans
      • No spreadsheet versions/copies
  • 31. My business requires domain expertise Only mortgage managers understand mortgage rules
  • 32. Schooled domain expertise
    • Are we, the developers, domain experts?
      • Yes, we've been working in this company for year(s).
  • 33. Schooled domain expertise
    • Are we, the developers, domain experts?
      • Yes, we've been working in this company for year(s).
    • Do we have
      • university's degree in economics? No
      • 34. participated in mortgages conferences/courses? No
      • 35. years of mortgage customer experience? No
  • 36. Schooled domain expertise
    • Are we, the developers, domain experts?
      • Yes, we've been working in this company for year(s).
    • Do we have
      • university's degree in economics? No
      • 37. participated in mortgages conferences/courses? No
      • 38. years of mortgage customer experience? No
    • Do we have a clue when the mortgage rules need to change? No
  • 39. Schooled domain expertise
    • Are we, the developers, domain experts?
      • Yes, we've been working in this company for year(s).
    • Do we have
      • university's degree in economics? No
      • 40. participated in mortgages conferences/courses? No
      • 41. years of mortgage customer experience? No
    • Do we have a clue when the mortgage rules need to change? No
    • 42. Are we, the developers, domain experts? No
      • Mortgage manager is the domain expert
  • 43. Domain experts can not read/write Java source code
    • Communication problem
      • Domain expert can not read it:
    for (Mortgage m : mortgages ) { for (Applicant a : m.getApplicants()) { if (a.getAge() > 70 ) { boolean existsGuarantor = false ; for (Guarantor g : m.getGuarantors() { if (g.getAge < 60 ) { existsGuarantor = true ; } } // Will they spot the bug in this code? if (existsGuarantor) { m.setApproved( false ); } } } }
  • 44. Domain experts can read rules in the Guided Rule Editor
  • 45. Domain experts can write rules in the Guided Rule Editor Change
  • 46. Translated to DRL Executed on JavaBeans
  • 47. Guided Rule Editor demo video Demo video
  • 48. Natural language (DSL)
    • DSL is even easier to read/write
    • Developers create the building blocks
    • 49. Domain experts make the building
    Source: wikipedia
  • 50. My business rules change often This mortgage rule change must be released by noon
  • 51. Deliver changes fast
  • 52. Deliver changes fast
  • 53. Deliver changes fast
  • 54. Business rule change
    • Not a data change
      • Requires test and release lifecycle
      • 55. Logic changes
    • Not a software change
      • Delivered in hours, not days
      • 56. Self-service by mortgage manager
  • 57. Testing before releasing
    • Domain experts need to unit test too
      • Example: mortgage of Erik must be disapproved
  • 58. Releasing
    • Release a snapshot of the rules package
    • 59. Available at URL:
      • http://127.0.0.1:8888/org.drools.guvnor.Guvnor/package/presentationmortgages/mortgagesDeployment
  • 60. Deployment infrastructure
  • 61. Auditable and reproducible Why was that mortgage approved last year?
  • 62. Auditing
    • View old revisions of rules
  • 63. Summary
  • 64. Summary
    • Use Drools and Guvnor
    • 65. When your business decisions either
      • Require domain expertise
      • 66. Change often/fast
  • 67. Marco Rietveld
  • 68. How do we keep business analysts from bothering us? Wait, you want A to do D, but not B and C?!?
  • 69. How do we let business analysts do their work?
  • 70. The agenda
    • BPM, BPMN 2.0 and jBPM
    • 71. What does jBPM Designer do?
    • 72. Demo
    • 73. Summary
  • 74. B usiness P rocess M odelling
    • Continuous improvement
    • 77. Speed of development
    • 78. Increased agility
    A business process is a collection of steps that when executed, accomplish a specific goal. It can often be described using a flow chart.
  • 79. Flexible and Adaptive Processes Traditional workflow systems have problems with change, complexity, flexibility, data-intensive applications... BPM helps us with:
      • Unstructured, non-linear or flexible processes
      • 80. Adaptive Case Management
        • Data dependent/conditional processes
      • Event-driven BPM
  • 81. BPMN 2.0
    • OMG specification
    • “Understandable” by all business users
    • 84. Extensible
  • 85. BPMN 2.0 Example <?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?> <definitions id=&quot;Definition&quot; targetNamespace=&quot;http://www.example.org/MinimalExample&quot; xmlns=&quot;http://www.omg.org/spec/BPMN/20100524/MODEL&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd&quot;> <process processType=&quot;Private&quot; isExecutable=&quot;true&quot; id=&quot;ScriptTask&quot; name=&quot;ScriptTask Process&quot; tns:packageName=&quot;com.sample&quot; > <!-- nodes --> <startEvent id=&quot;_1&quot; name=&quot;StartProcess&quot; /> <scriptTask id=&quot;_2&quot; name=&quot;Hello&quot; scriptFormat=&quot;http://www.java.com/java&quot; > <script>System.out.println(&quot;Hello World&quot;);</script> </scriptTask> <endEvent id=&quot;_3&quot; name=&quot;EndProcess&quot; > <terminateEventDefinition/> </endEvent> <!-- connections --> <sequenceFlow id=&quot;_1-_2&quot; sourceRef=&quot;_1&quot; targetRef=&quot;_2&quot; /> <sequenceFlow id=&quot;_2-_3&quot; sourceRef=&quot;_2&quot; targetRef=&quot;_3&quot; /> </process> <bpmndi:BPMNDiagram> <bpmndi:BPMNPlane bpmnElement=&quot;ScriptTask&quot; > <bpmndi:BPMNShape bpmnElement=&quot;_1&quot; > <dc:Bounds x=&quot;16&quot; y=&quot;16&quot; width=&quot;48&quot; height=&quot;48&quot; /> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement=&quot;_2&quot; > <dc:Bounds x=&quot;96&quot; y=&quot;16&quot; width=&quot;80&quot; height=&quot;48&quot; /> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement=&quot;_3&quot; > <dc:Bounds x=&quot;208&quot; y=&quot;16&quot; width=&quot;48&quot; height=&quot;48&quot; /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge bpmnElement=&quot;_1-_2&quot; > <di:waypoint x=&quot;40&quot; y=&quot;40&quot; /> <di:waypoint x=&quot;136&quot; y=&quot;40&quot; /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement=&quot;_2-_3&quot; > <di:waypoint x=&quot;136&quot; y=&quot;40&quot; /> ...
  • 86. So.. we have a way of looking at business processes and a way of specifying them..
  • 87. jBPM project
    • Open-source business process management
      • Embeddable, lightweight Java process engine, supporting native BPMN 2.0 execution
      • 88. Eclipse-based and web-based editor
      • 89. Pluggable persistence and transactions (JPA / JTA)
      • 90. Pluggable human task service based on WS-HumanTask
      • 91. Management console (process instance management, task lists, task form management, and reporting)
      • 92. History logging (querying / monitoring / analysis)
      • 93. Etc..
  • 94. jBPM application architecture Core Services Business Analyst End User Developer Rules Core Engine Guvnor Repository Eclipse Editor Web-Based Designer History Log Task Service jBPM Console Your Application Your Services
  • 95.
    • BPM, BPMN 2.0 and jBPM
    • 96. What does jBPM Designer do?
    • 97. Demo
    • 98. Summary
  • 99. jBPM 5 Designer
    • Integrated with Guvnor
      • Versioning, storage and deployment
    • Embeddable (in your own application)
      • includes a javascript interface
      • 100. JSON used for communication
    • Targets business users
      • Allows users to focus on process creation
    • BPMN 2.0 web editor
      • Creates fully executable BPMN
      • 101. Supports the jBPM BPMN subset
  • 102. jBPM Designer Features 1. Shape repository panel 2. Canvas 3. Properties panel 4. Toolbar 5. Footer 6. Process information
  • 103. Designer: Shape Menu 1. Connection section 2. Morphing section
  • 104. Designer: Task Form Generation
    • Automatic generation of forms for human tasks
      • Using defined process variables,
      • 105. human task data I/O parameters and associations
      • 106. (HTML/Javascript) Source immediately available
      • 107. Generated forms are stored in Guvnor
      • 108. All forms are fully usable inside jBPM console
      • 109. Each form includes basic JavaScript form validation
    à à
  • 110.
    • Business analyst stuff
    • 111. Obligatory introduction to project
    • 112. Demo!
    • 113. Summary (AKA The End)
  • 114. The Slide that you guys look at while I switch to the demo! Bonus: how many (full or partial) circles are on this slide?
  • 115. Demo: Employee Evaluation
    • 1. jbpm-installer
      • + latest version of Designer
      • 116. + latest version of Guvnor
    • 2. Start up installer
      • (JBoss AS7 + Guvnor + Designer + Console)
    • 3. Create process in Guvnor/Designer
      • Import real process...
    • 4. Save process
    • 117. 5. Run process!
  • 118. Summary
  • 119. How do we keep them busy?
    • BPM & BPMN 2: Business Process Modelling
      • “Go work on the Business Process!”
    • jBPM: how to implement an analyst’s work
      • Process engine that executes the BPMN
    • jBPM Designer: “Look at what you can do!”
      • BPMN process creation and modification
      • 120. Integration with Guvnor:
        • Versioning, storage and deployment
  • 121. Q&A
    • Drools/Guvnor homepage
      • http://www.jboss.org/drools
    • jBPM homepage
      • http://www.jboss.org/jbpm
    • Source code:
      • http://www.github.com/droolsjbpm
      • 122. Designer: http://www.github.com/tsurdilo/process-designer
    • Download this presentation
      • http://www.jboss.org/drools/presentations
    • Twitter: @geoffreydesmet & @marcorietveld
    • 123. Google+: Geoffrey De Smet & Marco Rietveld
    • 124. IRC: #drools, #droolsdev and #jbpm on Codehaus
  • 125. Image sources
    • http://images2.visual-paradigm.com/bpva/tutorials/businessprocessmodeling_screenshots/31_complete_bpd.png
    • 126. http://mainthing.ru/wp-content/uploads/2010/12/battleship-en.png
    • 127. http://www.slideshare.net/krisverlaenen/jbpm5-argentina-workshop
    • 128. JBPM online documentation: http://docs.jboss.org/jbpm/v5.2/userguide/