Upload
others
View
6
Download
0
Embed Size (px)
Citation preview
© DFKI - JK
Modeling for Architects II: Business Processes, BPMN 2.0, Object Lifecyles
Architectural Thinking for Intelligent Systems
Winter 2019/2020
Prof. Dr. habil. Jana Koehler
© DFKI - JK
Agenda Analyzing business processes with BPMN 2.0
Basic and advanced language elements
Style conventions
Syntactically and semantically correct models
Pattern and Anti-pattern
Process model and instance of a process
Understanding Business Object Lifecycles
Architectural Thinking For Intelligent Systems: BPMN2
© DFKI - JK
Tutorial Assignment 2
We practice the usage of BPMN 2.0 with a number of exercises.
Architectural Thinking For Intelligent Systems: BPMN3
© DFKI - JK
Understanding and Modeling Business Processes
Architectural Thinking For Intelligent Systems: BPMN4
© DFKI - JK
Why Process Models?
Understanding the processes in an organization
Create documentation for audits
Execution of simulations for process optimization
Comparison of process variants
Specification of requirements for changes/automations
Service orientation
Business capability management
Architectural Thinking For Intelligent Systems: BPMN5
© DFKI - JK
Everything is a Process …
Architectural Thinking For Intelligent Systems: BPMN6
http://blog.frapu.de/index.php?entry=entry090720-212758 Frank Puhlmann (inubit) Blog
Sequence Flow
Events
Gateways
Data Objects
Activities
+
+ +
+
Need fordelicious
cake
1/2 sachet vanilla pudding
250 ml milk1 tbsp sugar
Continue with 2
125 g butter500 g sugar1 tbsp Milk
1 pinch of saltMix butter,
sugar, milk and salt until creamy
“Donauwellen”finished
1 tbspKakau
100 g dark chocolate glaze
15 g clarified butter
Cool the cake
1 glass sour cherries
Cool the cake
Continue with 2
Bake cake
30 min.
Spread the cherries onthe dough
Liquefy the couverture with the clarified butter and pour over the cake.
makepudding
Heat butter and stir with
powdered sugar until creamy
Mix the puddingin portions with the butter cream andpour onto the cake
100 g butter25 g powdered sugar
200 g flour1/2 sachet baking soda
Mix the flour with the baking powder
and stir into the mixture
Spread half of the dough in the baking tin Mix the rest of
the dough with the Kakouand spread on the light dough
Preheat oven to 180 °
© DFKI - JK
BPMN 2.0 Poster
Architectural Thinking For Intelligent Systems: BPMN7
http://signavio.com/
© DFKI - JK
History of BPMN First initiative at OMG in September 2000 Version 1.0 of the standard in May 2004
– Graphical symbols, informal semantics, many examples, first tools
Version 1.1 in January 2008, approx. 60 vendors Version 1.2 in January 2009 Version 2.0 Proposal of IBM/SAP/Oracle in June
2009– Metamodel, formal semantics, technical
attributes Adoption of version 2.0 in January 2011
– http://www.omg.org/spec/BPMN/ Current version 2.0.2 since 2014
Architectural Thinking For Intelligent Systems: BPMN8
© DFKI - JK Architectural Thinking For Intelligent Systems: BPMN9
ValidateOrder
Reject Order
AnalyzeOrder
PerformCredit Check
Accept Order
Accept orReject?
OrderValidated
OrderAccepted
Accept
Reject
AcceptOrder
InformCustomer
InformDistribution
AcceptOrder
Validate Order
AnalyzeOrder
RejectOrder
Reject
Accept
EPK – UML Activity Diagrams – BPMN
PerformCredit Check
© DFKI - JK
BPMN Focuses on Connected Businesses
Architectural Thinking For Intelligent Systems: BPMN10
© DFKI - JK
Process Views (Scheer)
ARIS = Architecture of Integrated Information Systems
Business Process Management 2016 - BPMN11
Products and services of the enterprise, business capabilitiesgoals and business value of processes
Activities and sub-processes
Data and their states, events
Process owners/participants roles, organizational structure
Data View
FunctionalView
Performance View
Organisational View
Control View
© DFKI - JK
Which Partners Interact? - BPMN Conversation Diagram
Architectural Thinking For Intelligent Systems: BPMN12
WarehouseCustomer
Delivery
Financial Service Provider
Webshop
Supplier
© DFKI - JK
How do Processes of Partners Proceed?- BPMN Collaboration Diagram (Process Model)
Architectural Thinking For Intelligent Systems: BPMN13
http://www.brsilver.com/wp-content/comp2.gif
© DFKI - JK
Recommended Modeling Tools
http://academic.signavio.com/ Software as a Service cloud solution
https://camunda.com/download/modeler/ Download and install local instance on your computer
Architectural Thinking For Intelligent Systems: BPMN14
© DFKI - JK
Analyze a Process
1. Where are process boundaries? Which start and end events/conditions occur? (Processes)
2. Which individual steps must be executed in the process? (Activities)
3. Which process paths (happy path, exceptions) are described? (Gateways and sequence flow)
4. Which organizations are involved? (Pools)5. Which essential business objects (data) are exchanged
between the participants? (Messages)
Architectural Thinking For Intelligent Systems: BPMN15
© DFKI - JK
Activities
Architectural Thinking For Intelligent Systems: BPMN16
A step/a task in the process– represents a business function– has inputs/outputs
Task (atomic process step, not further refined) Subprocess (refined in further BPMN diagram)
IncludeHistory of
Transactions
IncludeStandard Text
Receive CreditReport
Expanded Sub-Process
No
Approve? YesApproval
Globally definedSubprocess
© DFKI - JK
Task Marker and Task Types
Architectural Thinking For Intelligent Systems: BPMN17
manual (outside BPMS)
business rules task
script task (code for BPMS)
loop taskmulti-instance taskcompensation task
send taskreceive task
service taskuser task
© DFKI - JK
Modeling Process Participants - Lanes
Architectural Thinking For Intelligent Systems: BPMN18
Ord
erin
gSe
rvic
e
Prod
uctM
anag
emen
t
Pack
agin
gSh
ippi
ng
ReceiveOrder
RetrieveProduct fromWarehouse
PrepareProduct forShipping
ShipProduct
© DFKI - JK
Modeling Cross-Organizational Processes - Pools
Architectural Thinking For Intelligent Systems: BPMN19
https://www.signavio.com/post/bpmn-pools-and-lanes/
© DFKI - JK
Gateway Semantics
Architectural Thinking For Intelligent Systems: BPMN20
Inclusive Gateway (OR)
Parallel Gateway (AND)
Exclusive Gateway (XOR)Token flow (Petri nets)
State of a process = Distribution of tokens in the net (marking)
© DFKI - JK
Process paths without gateways
Architectural Thinking For Intelligent Systems: BPMN21
What cannot be modelled without gateways??Synchronizations of parallel paths!!
© DFKI - JK
Connectors
Architectural Thinking For Intelligent Systems: BPMN22
Sequence Flow
Message Flow
Association
© DFKI - JK
Adhoc Process
Architectural Thinking For Intelligent Systems: BPMN23
© DFKI - JK
Data Modeling and Data Flow
Architectural Thinking For Intelligent Systems: BPMN24
Research theTopic
ResearchNotes
Write Text
Research theTopic
ResearchNotes
Write Text
Task BTask A Yes
Task C
No
DataObject
Task D
© DFKI - JK
Using Data in Models
Architectural Thinking For Intelligent Systems: BPMN25
© DFKI - JK
Processes interact with each other via Data Exchange
Architectural Thinking For Intelligent Systems: BPMN26
© DFKI - JK
Events "An Event is something that “happens” during the course of a
Process. "
These Events affect the flow of the Process and usually have a cause or an impact and in general require or allow for a reaction. The term “event” is general enough to cover many things in a Process. The start of an Activity, the end of an Activity, the change of state of a document, a Message that arrives, etc., all could be considered Events." (BPMN 2.0 Spec, p. 233)
ARIS Method 7.0, 4-98, 10/2006– “By an event we understand the fact that an information object
has taken on a business-relevant state which is controlling or influencing the further procedure of the business process.”
Architectural Thinking For Intelligent Systems: BPMN27
© DFKI - JK
The most important Events
Architectural Thinking For Intelligent Systems: BPMN28
Start
End
Intermediate
Wait for a message to arrive/send a message
Wait for a certain period of time or a point in time
Trigger compensation/ error handling
Sequence flow"GOTO"
© DFKI - JK
Event-based Gateway
Architectural Thinking For Intelligent Systems: BPMN29
message
conditional
signal
intermediate events
one of the arising events must occur
© DFKI - JK
Example
Architectural Thinking For Intelligent Systems: BPMN30
© DFKI - JK Architectural Thinking For Intelligent Systems: BPMN31
Link Event"Off page" Connector
© DFKI - JK
Intermediate Event
Architectural Thinking For Intelligent Systems: BPMN32
IncrementTally
ReceiveVotes
Send Ballot
© DFKI - JK
Attached Intermediate Event
Architectural Thinking For Intelligent Systems: BPMN33
2 Days
ReceiveConfirmation
SendCancellation
Notice
intermediate timer, boundary, interrupting
non-interrupting
© DFKI - JK
Advanced Modeling with Events
Architectural Thinking For Intelligent Systems: BPMN34
compensation events connecting to compensation tasks
non-interrupting message
interrupting error
interrupting error
interrupting compensation
throwing compensation
© DFKI - JK
Artifacts
Architectural Thinking For Intelligent Systems: BPMN35
© DFKI - JK
Summary: The most important diagram elements I
Architectural Thinking For Intelligent Systems: BPMN36
Events
Activities
Gateways
Flow Objects
Pool
Lanes (within a Pool)
Nam
e
Swimlanes
Nam
e Nam
eN
ame
SequenceFlow
Message Flow
Association
Connectors
© DFKI - JK
Summary: The most important diagram elements II
Architectural Thinking For Intelligent Systems: BPMN37
Data
Input
Output
InitiatingMessage
Response Message
Artifacts
Comments
Groupings ofelements
Own elementsCollection
© DFKI - JK
Summary
Architectural Thinking For Intelligent Systems: BPMN38
BPMN
Flow Objects Data Connecting Objects Swimlanes Artifacts
Events
Activity
Gateway
Task
Subprocess
Data Object
Data Input
Data Output
Data Store
Sequence Flow
Message Flow
Association
Pool
Lane
GroupText Annotation
© DFKI - JK
Examen-Relevant BPMN Notation
39
Always
Blank
Subprocess
Gateways
Subprocesses
Tasks Types
Connections
Start Events
Artifacts
Swimlanes
Data
User Service
Intermediate EventsPool La
neLa
ne
Blank
Message
Message Time Condition
Time Condition
End Events
Sequence AssociationMessage
XOR AND
Blank
IndividualSymbols
Comment
Data StoreMessage
(Request / Answer)
OR
Data Object
Link
GGrouping
© DFKI - JK
BPMN Style (Bruce Silver)
Process logic must be reflected in the diagram Introduce hierarchies, a process model fits on 1 page Present external participants through abstract pools Customer-oriented processes start with a message from the
customer Annotate XOR gateways with Yes/No or condition Message start events begin with "Receive X" Explicitly name end states, distinguish success/failure Identify message flows with the name of the message object
Architectural Thinking For Intelligent Systems: BPMN40
© DFKI - JK
Workflow Pattern (Aalst et al)
More at workflowpatterns.com
Architectural Thinking For Intelligent Systems: BPMN41
b) Parallel Splita) Exclusive Choice c) Simple Merge d) Synchronization
e) Sequence f) Arbitrary Cycles
© DFKI - JK
Modeling with Structured Fragments
Architectural Thinking For Intelligent Systems: BPMN42
a1 a2 a3
a5
a1 a2 a3 a4
...a5
a1 a2 a4a3
bn
b1
c1...
...a5
a1 a2 a4a3
ck
bn
b1
© DFKI - JK
Model versus Instance
Model describes the basic process flow of a process with all essential paths
Exactly one path is traversed in an instance
Architectural Thinking For Intelligent Systems: BPMN43
A-B-CB-A-C
A-CB-C
© DFKI - JK
Errors in Process Models
Process model leads to more execution paths than intended– Additional instances of a task– Cause : lack of synchronization– Livelock: Infinite iteration of a process without the
possibility of progression
Process model leads to fewer execution paths than intended– Some tasks are not executed in some or all instances– Cause: deadlock
Architectural Thinking For Intelligent Systems: BPMN44
© DFKI - JK Architectural Thinking For Intelligent Systems: BPMN45
A process model is sound if it does not contain a deadlock and no lack of synchronization.
© DFKI - JK
Deadlock vs. Lack of Synchronization
Lack of Synchronization (LoS)– Some paths/activities are
unexpectedly traversed multiple times
– Risk of uncontrolled data access due to multiple execution of activities
– Multiple tokens on one edge
Architectural Thinking For Intelligent Systems: BPMN46
Deadlock– Process is blocked– Some activities are never performed– Token remains stuck in the process
without reaching final state
© DFKI - JK
Sequential Antipattern
Architectural Thinking For Intelligent Systems: BPMN47
LoS
Deadlock
Lack of Synchronization due to AND-XOR
Potential Lack of Synchronization due to IOR-XOR
Deadlock due to XOR-AND
Potential LoS
© DFKI - JK
Cyclic Antipattern
Architectural Thinking For Intelligent Systems: BPMN48
Cyclic Deadlock due to AND-AND and AND-XOR
Cyclic Lack of Synchronization due to XOR-AND
Potential Lack of Synchronization due to XOR-IOR
Deadlock
Deadlock
LoS
Potential LoS
© DFKI - JK
Modeling in the Real World
Architectural Thinking For Intelligent Systems: BPMN49
© DFKI - JK
Data, Data, Data ... and their Lifecycles
Data (business objects) exist in different states Processes change these states Process goals can be described by the (final) states of
business objects
Architectural Thinking For Intelligent Systems: BPMN50
© DFKI - JK
Basic Questions
Which business objects do the processes work with?
Who has access to which business objects?
Which states of the business objects do the process actors know?
How do the business objects interact through their states?
Architectural Thinking For Intelligent Systems: BPMN51
© DFKI - JK
Enrollment Process
Business properties– Application dossier
• submit• check formally• check in detail• make a decision
– Invoice• create and send• monitor incoming payments
– Student legitimation• create• send
Architectural Thinking For Intelligent Systems: BPMN52
Applicationsubmitted
Applicationaccepted
Applicationrejected
Formal check
Admitted
Check in detail
Rejected
.
.
.
© DFKI - JK
Processes and Object Lifecycles
Processes change data– driven and controlled by events and rules
Event as “business-relevant state of an information object which is controlling or influencing the further procedure of the business process” [ARIS]– Which state of one or more objects triggers a process?– Which states are successful final states of objects (= process
objectives)?– Which states require error handling?– In which states do which rules control the admissibility of actors'
activities?
Architectural Thinking For Intelligent Systems: BPMN53
© DFKI - JK
Business Rules and Object Lifecycles
Architectural Thinking For Intelligent Systems: BPMN54
on SaleAcquired
Available
on Rent
Returned
In Service
Damaged
Allocated
Overdue
“A car from another branch may be allocated, if there is a suitable car available and there is time to transfer it to the pick-up branch.”
“If a car is three days overdueand the customer has not arranged an extension, insurance cover lapses and the police must be informed.”
Rules ensure the integrity of data and regulate the behavior of actors
© DFKI - JK
Error States in Lifecycle
Architectural Thinking For Intelligent Systems: BPMN55
© DFKI - JK
Levels of Process Modeling
Architectural Thinking For Intelligent Systems: BPMN56
End-end process(multiple objects)
Workflow((partial) lifecycle - one object)
Activities(state transitions - one object)
+ rules+ roles
© DFKI - JK
Summary
BPMN 2.0 is an accepted standard for business process modeling
High-quality models are important for correct analysis and simulations and facilitate implementation in IT
Approx. 60-90 % of all non-trivial process models (at least one cyclic path or 2 different gateways) are semantically incorrect, i.e. cannot be executed
Style conventions improve model comprehensibility, the use of structured model fragments avoids execution errors
Modeling in a more data-oriented way with business object life cycles works often better in practice than pure activity flows
Architectural Thinking For Intelligent Systems: BPMN57
© DFKI - JK
Working Questions:
1. What was the motivation behind BPMN?2. Which BPMN diagrams exist and what are they used for?3. What basic groups of elements are included in the notation
and how are they used correctly in the model?4. What is the semantics of AND, XOR and OR Gateways?5. What are the most important style conventions for BPMN?6. What is the difference between a model and an instance of
that model?7. What are Deadlock and Lack of Synchronization errors?
Give examples of gateway combinations in BPMN models leading to these errors.
Architectural Thinking For Intelligent Systems: BPMN58