Business Process Simulation
                 with JBoss jBPM

Java User Group Stuttgart, 05.06.2008
       bernd.ruecker@c...
Bernd Rücker
  That‘s me…

      • Consultant, Trainer, Coach
      • Software Developer
      • Committer of the JBoss jB...
Agenda

      Basics
      • Business Process Management (BPM)
      • JBoss jBPM
      • Business Process Simulation (BPS...
Was ist ein Geschäftsprozess?
  Definition

      • Erzeugt einen definierten Output aus einem
        gegebenen Input
   ...
Prozesse und Software
  Werden Prozesse durch Software unterstützt?




                      GUI
                        ...
Softwareintegration
  Verschiedene Ebenen der Integration


            Prozesse
                                      Act...
Ein „digitaler“ Prozess
  Die Business Process Engine / Process Execution



                                             ...
Business Process Engine
  Komponenten & Features



           Business Analyst                    Sachbearbeiter
        ...
Das Versprechen der Anbieter: Magie
  Die magische Prozessmaschine?



                                          Modeling ...
Gemeinsame Sprache
  Was leistet die Business Process Engine




                                                Quelle: T...
Was leistet die Business Process Engine
  Features

      • Versionierung, Persistenz & Interpretation von
        Prozess...
Business Process Engine in Java
  Architektur

      • Process Engine ist eigene Architekturschicht
      • Domänenobjekte...
JBoss jBPM
  Open Source Process Execution

      • Business Process Engine
      • POJO-Kern: Interne Prozessrepräsentati...
„Graph oriented programming“
  jBPM in a nutshell

                                                            Node       ...
Verschiedene Node-Typen
  jBPM in a nutshell

      •     Task-Node: Human Tasks / Aufgaben
      •     State: Wait-States...
jBPM & Java
  jBPM in a nutshell

      • Einfache Java-API zur Steuerung der Engine
              – Prozessstart
        ...
jBPM & Java
  jBPM in a nutshell

      JbpmConfiguration conf = JbpmConfiguration.getInstance();
      JbpmContext contex...
Gemeinsame Sprache, Beispiel jBPM




Bernd Rücker / bernd.ruecker@camunda.com / 18
Tooling: Eclipse
  jBPM in a nutshell




Bernd Rücker / bernd.ruecker@camunda.com / 19
The BPM life-cycle




                                                       Analysis


                                 ...
The problem with process changes

      • The future is hard to predict
      • Unintuitive results, especially if differe...
Simulation


       Simulation is the process of describing
       a real system and using this model for
       experimen...
Business Process Simulation (BPS)

      • Model of reality = business process + additional
        information
      • He...
BPS vision

                                                       Same model as
            process model &              ...
Typical Simulation Goals

      • Identify cycle times for new or changed processes
      • Identify process costs
      •...
Example: Returned Goods

                             process runs: 195                                                   ...
Example

   Questions:     process runs: 195                                                               Swimlane
      ...
Example
                                                                        Questions:               Swimlane
        ...
Simulation input

                                                distribution of start events (amount and time)




     ...
Simulation




                                                discrete simulation

                                      ...
Discrete Event Simulation

      • State changes happen at discrete events in time
      • Nothing happens between 2 neigh...
Event oriented modeling style

                         1               2      3




                                     ...
Components of DES

      •     Model state
      •     Simulation clock
      •     Event list
      •     Central control...
Statistics

      • Theoretical Distributions




      • Warm up period




Bernd Rücker / bernd.ruecker@camunda.com / 34
The BPS tool – used components

      • JBoss jBPM
              – Business Process Engine
              – Open Source (LG...
Combination of BPM & DES




                                                Business
         DES-                       ...
Combination of BPM & DES in action

                      21:33                     21:33


                  Eventlist

 ...
Combination of BPM & DES in action

                      21:40                                           21:40
          ...
Combination of BPM & DES in action

                      22:55                                            22:55


       ...
Combination of BPM & DES in action

                      23:41                     23:41


                  Eventlist


...
What was needed for combination?

      • Special Events in DESMO-J
      • Clock-Synchronization
      • Event-Generation...
Architecture
                                                                            jBPM Designer
                   ...
Simulation configuration example
  <experiment name='ReturnDefectiveGoods' time-unit='second'
      run-time='28800' real-...
Simulation configuration example 2



  <process-definition name='FirstSteps' start-distribution='z'>
    <resource-pool n...
Simulation Results                                   SimulationResult

                                                   ...
Live Demo & Result




                                                Live-Demo


Bernd Rücker / bernd.ruecker@camunda.co...
Further topics

      • Analyzing simulation results
              – Results are just “samples”
              – Repetition...
Conclusion

      • Tool was developed and is working
      • Source Code contributed to JBoss jBPM
      • A showcase / t...
Fragen & Antworten

                                                            Bernd Rücker
                             ...
Nächste SlideShare
Wird geladen in …5
×

20080605 JUG Stuttgart Business Process Simulation mit JBoss jBPM

1.699 Aufrufe

Veröffentlicht am

Veröffentlicht in: Technologie, Business
0 Kommentare
1 Gefällt mir
Statistik
Notizen
  • Als Erste(r) kommentieren

Keine Downloads
Aufrufe
Aufrufe insgesamt
1.699
Auf SlideShare
0
Aus Einbettungen
0
Anzahl an Einbettungen
10
Aktionen
Geteilt
0
Downloads
0
Kommentare
0
Gefällt mir
1
Einbettungen 0
Keine Einbettungen

Keine Notizen für die Folie

20080605 JUG Stuttgart Business Process Simulation mit JBoss jBPM

  1. 1. Business Process Simulation with JBoss jBPM Java User Group Stuttgart, 05.06.2008 bernd.ruecker@camunda.com
  2. 2. Bernd Rücker That‘s me… • Consultant, Trainer, Coach • Software Developer • Committer of the JBoss jBPM-Project – Commands – Simulation (BPS) –… • Topics: BPM, SOA, Process Execution (jBPM, BPEL, XPDL, …), Integration with Java EE • Expert in the Software Experts Network Stuttgart (SENS) Bernd Rücker / bernd.ruecker@camunda.com / 2
  3. 3. Agenda Basics • Business Process Management (BPM) • JBoss jBPM • Business Process Simulation (BPS) • Typical Simulation goals • Discrete Event Simulation The jBPM Simulation component • Used Open Source components • Combine BPM & Simulation • Example & Demo Bernd Rücker / bernd.ruecker@camunda.com / 3
  4. 4. Was ist ein Geschäftsprozess? Definition • Erzeugt einen definierten Output aus einem gegebenen Input • Geordnete Aktivitäten • Erzeugt Wert („business value“) • Lang laufend (bis zu Monaten oder Jahren) • Enthält Wartezustände • Aktivitäten können automatisiert (EAI/SOA) oder durch Menschen (Human-Task-Management) ausgeführt werden Bernd Rücker / bernd.ruecker@camunda.com / 4
  5. 5. Prozesse und Software Werden Prozesse durch Software unterstützt? GUI Paper Email Gui 1 Gui 2 Gui 3 Software Kunden SAP Komponente Server EAI-Tool Web-Service Bernd Rücker / bernd.ruecker@camunda.com / 5
  6. 6. Softwareintegration Verschiedene Ebenen der Integration Prozesse Activity 1 Activity 2 Activity 3 Prozess- integration Services Anwendungen App 1 App 2 Funktions- integration Middleware Daten Logische Datenbank Daten- integration DB 1 DB 2 Bernd Rücker / bernd.ruecker@camunda.com / 6
  7. 7. Ein „digitaler“ Prozess Die Business Process Engine / Process Execution ∆ Durchlaufzeit Execution Engine Task Service Task Zuweisung Aufruf Zuweisung IT IT IT Human Workflow SOA Human Workflow Bernd Rücker / bernd.ruecker@camunda.com / 7
  8. 8. Business Process Engine Komponenten & Features Business Analyst Sachbearbeiter Aufgaben- Verwaltung Prozess- Fremd- Ausführung Anwendungen Prozess- definitionen Administration Administrator Prozess- Logs Persistenz Business Process Engine Bernd Rücker / bernd.ruecker@camunda.com / 8 Entwickler
  9. 9. Das Versprechen der Anbieter: Magie Die magische Prozessmaschine? Modeling Monitoring Business IT Magic Process Engine Human Workflow EAI / SOA Bernd Rücker / bernd.ruecker@camunda.com / 9
  10. 10. Gemeinsame Sprache Was leistet die Business Process Engine Quelle: Tom Baeyens, JBoss Bernd Rücker / bernd.ruecker@camunda.com / 10
  11. 11. Was leistet die Business Process Engine Features • Versionierung, Persistenz & Interpretation von Prozessmodellen • Steuerung & Persistenz von Prozessinstanzen • Task-Management & Wait-States • Prozesskontext (Variablen zu Prozess speichern) • Einbindung externer Services • Verwalten von Ereignissen (wie Timeouts, …) Bernd Rücker / bernd.ruecker@camunda.com / 11
  12. 12. Business Process Engine in Java Architektur • Process Engine ist eigene Architekturschicht • Domänenobjekte oder Referenzen als Prozessvariablen • Ansteuerung ext. Services EJB-Container BPM-Engine Session Bean EJB JCA JMS … Bernd Rücker / bernd.ruecker@camunda.com / 12
  13. 13. JBoss jBPM Open Source Process Execution • Business Process Engine • POJO-Kern: Interne Prozessrepräsentation durch Java-Modelle • Persistenz über Hibernate (DB-Unabhängigkeit) • Lauffähig mit oder ohne Application-Server • „Library“ • Klein und flexibel, leicht erweiterbar • Aktuell Version 3.2, Version 4 in der Entwicklung • Open Source (LGPL) Bernd Rücker / bernd.ruecker@camunda.com / 13
  14. 14. „Graph oriented programming“ jBPM in a nutshell Node 1 Token current Node from to leaving arriving Transitions * * Transitions Transition <process-definition> ... <node-type-x name=“serve client”> <transition name=“ok” to=“order” /> <transition name=“nok” to=“joke” /> </node-type-x> <node-type-y name=“take order” /> <node-type-z name=“make joke” /> ... </process-definition> Bernd Rücker / bernd.ruecker@camunda.com / 14
  15. 15. Verschiedene Node-Typen jBPM in a nutshell • Task-Node: Human Tasks / Aufgaben • State: Wait-States • Fork / Join • Decision: Automatische Entscheidung • Start-State / End-State • … • Eigene Node-Typen mit Verhalten können implementiert werden Bernd Rücker / bernd.ruecker@camunda.com / 15
  16. 16. jBPM & Java jBPM in a nutshell • Einfache Java-API zur Steuerung der Engine – Prozessstart – Aufgabenliste –… • Aufrufen von „User-Code“ – definierte Stellen im Prozess – Interface & Java-Klassen Bernd Rücker / bernd.ruecker@camunda.com / 16
  17. 17. jBPM & Java jBPM in a nutshell JbpmConfiguration conf = JbpmConfiguration.getInstance(); JbpmContext context = conf. createJbpmContext(); ProcessInstance pi = context.getGraphSession(). findLatestProcessDefinition("Ticket").createProcessInstance(); pi.getRootToken().signal(); List<TaskInstance> tasks = context.getTaskMgmtSession(). findTaskInstances("Vertrieb"); tasks.get(0).end("Ticket schliessen"); context.close(); public class MyAction implements ActionHandler { public void execute(ExecutionContext ctx) { Object var = ctx.getVariable("var"); result = service.doSomething(var); ctx.setVariable("result", result); } } Bernd Rücker / bernd.ruecker@camunda.com / 17
  18. 18. Gemeinsame Sprache, Beispiel jBPM Bernd Rücker / bernd.ruecker@camunda.com / 18
  19. 19. Tooling: Eclipse jBPM in a nutshell Bernd Rücker / bernd.ruecker@camunda.com / 19
  20. 20. The BPM life-cycle Analysis Control Design Iterative Improvement Execution Implementation Bernd Rücker / bernd.ruecker@camunda.com / 20
  21. 21. The problem with process changes • The future is hard to predict • Unintuitive results, especially if different processes are involved • Changes in processes are – Expensive – Explosive, e.g. for “team spirit” in companies • Lots of risks Bernd Rücker / bernd.ruecker@camunda.com / 21
  22. 22. Simulation Simulation is the process of describing a real system and using this model for experimentation, with the goal of understanding the system’s behavior or to explore alternative strategies for its operation. Shannon Bernd Rücker / bernd.ruecker@camunda.com / 22
  23. 23. Business Process Simulation (BPS) • Model of reality = business process + additional information • Helps to predict outcome without putting new processes into production Use cases: • Process changes • New processes (“Business Process Reengineering”) • Changed environment Bernd Rücker / bernd.ruecker@camunda.com / 23
  24. 24. BPS vision Same model as process model & for process additional info execution benchmarks, (stochastic) KPI, … simulation alternative process structures Analysis Control Design BAM Iterative Improvement Life data Execution Implementation from history Bernd Rücker / bernd.ruecker@camunda.com / 24
  25. 25. Typical Simulation Goals • Identify cycle times for new or changed processes • Identify process costs • Benchmark alternative process structures • Forecast effects of changing amount of input events (for example the double amount of orders) • Support capacity or staff planning • Benchmark different parameter configurations Bernd Rücker / bernd.ruecker@camunda.com / 25
  26. 26. Example: Returned Goods process runs: 195 Swimlane Avg, duration (standard derivation) 100 95 Accountant 180 (30) 195 Clerk 180 (60) 165 Tester 30 732,25 (448) 145 20 Accountant dispatcher 180 (30) 325.50 (182) 175 20 Bernd Rücker / bernd.ruecker@camunda.com / 26
  27. 27. Example Questions: process runs: 195 Swimlane • How many people do I need for Avg, duration (standard derivation) a special amount of work? • What is the best tradeoff 100 95 between too much and too less Accounta people? nt 180 (30) 195 Clerk 180 (60) 165 Tester 30 732,25 (448) 145 20 Accounta dispatcher nt 325.50 (182) 180 (30) 175 20 Bernd Rücker / bernd.ruecker@camunda.com / 27
  28. 28. Example Questions: Swimlane process runs: 195 • Is it maybe cheaper to skip the Avg, duration (standard derivation) extended tests and so also refund some not defect goods 100 95 • Is it maybe cheaper to skip all Accountant 180 (30) tests? 195 Clerk 180 (60) 165 Tester 30 732,25 (448) 145 20 Accounta dispatcher nt 325.50 (182) 180 (30) 175 20 Bernd Rücker / bernd.ruecker@camunda.com / 28
  29. 29. Simulation input distribution of start events (amount and time) distribution of waiting time resource pools distribution of duration/processing time for task distribution of duration/processing time for task Bernd Rücker / bernd.ruecker@camunda.com / 29
  30. 30. Simulation discrete simulation Discrete Event Simulation continuous (DES) simulation Bernd Rücker / bernd.ruecker@camunda.com / 30
  31. 31. Discrete Event Simulation • State changes happen at discrete events in time • Nothing happens between 2 neighboring points in time • Finite sequence of model states • Model time is independent of real time Event a Event x Event b Event y Event c Bernd Rücker / bernd.ruecker@camunda.com / 31
  32. 32. Event oriented modeling style 1 2 3 1 2 3 Bernd Rücker / bernd.ruecker@camunda.com / 32
  33. 33. Components of DES • Model state • Simulation clock • Event list • Central controller • Random number generator / Distributions • Statistical counters / data collectors Bernd Rücker / bernd.ruecker@camunda.com / 33
  34. 34. Statistics • Theoretical Distributions • Warm up period Bernd Rücker / bernd.ruecker@camunda.com / 34
  35. 35. The BPS tool – used components • JBoss jBPM – Business Process Engine – Open Source (LGPL) – Backed by RedHat / JBoss • DESMO-J – Java Simulation Framework (DES) – Developed & maintained by the University of Hamburg – Open Source (Apache License) • JasperReports as reporting generator Bernd Rücker / bernd.ruecker@camunda.com / 35
  36. 36. Combination of BPM & DES Business DES- Process Framework: Engine: DESMO-J JBoss jBPM Bernd Rücker / bernd.ruecker@camunda.com / 36
  37. 37. Combination of BPM & DES in action 21:33 21:33 Eventlist 21:40 start process Distributions Counters & data collectors Bernd Rücker / bernd.ruecker@camunda.com / 37
  38. 38. Combination of BPM & DES in action 21:40 21:40 21:33 Eventlist 21:40 start process 21:40 start process 22:07 start process 22:55 parcel arrived Distributions Counters & data collectors Bernd Rücker / bernd.ruecker@camunda.com / 38
  39. 39. Combination of BPM & DES in action 22:55 22:55 Eventlist 22:55 parcel arrived 22:55 parcel arrived Distributions Counters & data collectors Bernd Rücker / bernd.ruecker@camunda.com / 39
  40. 40. Combination of BPM & DES in action 23:41 23:41 Eventlist Distributions Counters & data collectors Bernd Rücker / bernd.ruecker@camunda.com / 40
  41. 41. What was needed for combination? • Special Events in DESMO-J • Clock-Synchronization • Event-Generation at special points in the process execution Additionally: • Resource pools • Queues • Automatic decision taking • Influence on service calls Bernd Rücker / bernd.ruecker@camunda.com / 41
  42. 42. Architecture jBPM Designer support planned Configuration jBPM (used for BAM simulation) Production jBPM Reporting DESMO-J Data source In memory objects Event Generator & Queue DB JasperReports jBPM Simulation Bernd Rücker / bernd.ruecker@camunda.com / 42
  43. 43. Simulation configuration example <experiment name='ReturnDefectiveGoods' time-unit='second' run-time='28800' real-start-time='30.03.1980 00:00:00:000' currency='EUR' unutilized-time-cost-factor='0.0'> <!-- 28800 seconds = 8 hours = 1 working day --> <scenario name="status_quo"> <distribution name="start" sample-type="real" type="erlang" mean="95"/> <distribution name="parcel" sample-type="real" type="normal" mean="28" standardDeviation="17"/> ... <resource-pool name="tester" pool-size="5" costs-per-time-unit="0.025"/> ... <sim-process path="/.../ReturnDefectiveGoods/processdefinition.xml"> <process-overwrite start-distribution="start"/> <state-overwrite state-name="wait for parcel" time-distribution="parcel"> <transition name="parcel arrived" probability="195"/> </state-overwrite> <decision-overwrite decision-name="ordered within the last two weeks?"> <transition name="YES" probability="100"/> <transition name="NO" probability="95"/> </decision-overwrite> ... </sim-process> </scenario> Bernd Rücker / bernd.ruecker@camunda.com / 43
  44. 44. Simulation configuration example 2 <process-definition name='FirstSteps' start-distribution='z'> <resource-pool name='big machine' pool-size='3' /> ... <swimlane name='tester' pool-size='2' /> ... <task-node name='task one'> <task swimlane='tester' time-distribution='time required for task one' /> <transition to='task two' /> </task-node> ... <state name='automated state' time-distribution='xyz'> <resource-needed pool='big machine' amount='2' /> <transition to='end' /> </state> ... </process-definition> Bernd Rücker / bernd.ruecker@camunda.com / 44
  45. 45. Simulation Results SimulationResult scenarioName simulationRunTime * * * ValueStatistics QueueStatistics Distributions name name name mean strategy … standardDerivation observations maximum queueLimit minimum length numberOfObservations minLength maxLength averageLength zeroWaits maxWaitTime averageWaitTime refused stdDevLength Waiting times for Ressource Pool Information resources / process statistics about input cycle times distributions Bernd Rücker / bernd.ruecker@camunda.com / 45
  46. 46. Live Demo & Result Live-Demo Bernd Rücker / bernd.ruecker@camunda.com / 46
  47. 47. Further topics • Analyzing simulation results – Results are just “samples” – Repetitions are needed – Use statistical theory to calculate confidence • Optimization – Not addresses by simulation itself – Simulation only evaluate given scenarios • Open Issues / Possible future work – GUI, support all jBPM features, better reporting, process animation, optimization Bernd Rücker / bernd.ruecker@camunda.com / 47
  48. 48. Conclusion • Tool was developed and is working • Source Code contributed to JBoss jBPM • A showcase / tutorial was developed and is available on camunda homepage • A real-life case study was done with dataphone (Vienna) • Tool can leverage BPS to a wider range of people Bernd Rücker / bernd.ruecker@camunda.com / 48
  49. 49. Fragen & Antworten Bernd Rücker Geschäftsführer Berater, Trainer & Coach bernd.ruecker@camunda.com +49 711 3278645 Unsere Themen • Ganzheitliches BPM • Prozessautomatisierung • SOA, BPEL, XPDL, jBPM, Drools, ESB • BPMN • BPM-Toolauswahl Unsere Leistungen • Beratung • Seminare • Process as a Service (Hosting) Bernd Rücker / bernd.ruecker@camunda.com / 49

×