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. 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. 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. 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. 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. 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. 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. 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. Gemeinsame Sprache
Was leistet die Business Process Engine
Quelle: Tom Baeyens, JBoss
Bernd Rücker / bernd.ruecker@camunda.com / 10
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. 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. 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
19. Tooling: Eclipse
jBPM in a nutshell
Bernd Rücker / bernd.ruecker@camunda.com / 19
20. The BPM life-cycle
Analysis
Control Design
Iterative Improvement
Execution Implementation
Bernd Rücker / bernd.ruecker@camunda.com / 20
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. 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. 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. 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. 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
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. 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. 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
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
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. Statistics
• Theoretical Distributions
• Warm up period
Bernd Rücker / bernd.ruecker@camunda.com / 34
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. Combination of BPM & DES
Business
DES- Process
Framework: Engine:
DESMO-J JBoss
jBPM
Bernd Rücker / bernd.ruecker@camunda.com / 36
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. 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. 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. Combination of BPM & DES in action
23:41 23:41
Eventlist
Distributions
Counters &
data
collectors
Bernd Rücker / bernd.ruecker@camunda.com / 40
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. 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. 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
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. Live Demo & Result
Live-Demo
Bernd Rücker / bernd.ruecker@camunda.com / 46
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. 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