Lecture4 ProcessModeling2
Lecture4 ProcessModeling2
231
Business Process Management
Marlon Dumas
marlon.dumas ät ut . ee
1
Business Process
Lifecycle
BPMN Main Elements - Recap
Activity
Message Association
Gateway
Event
Flow
Data Data
Object Store
Lane
BPMN Gateways
http://tinyurl.com/nnnfgd5
Anything wrong with this model?
Is this better?
Identifying sub-processes
Acquire raw materials
Task Sub-process
Loop Loop
19
More on rework and repetition
Structured
cycle (SESE
component)
20
Example: block-structured repetition
Completion
condition
Until Response is approved
Finalise
Assign Investigate
Ministerial
Ministerial Ministerial
Response
Enquiry Enquiry
Ministerial Ministerial
Enquiry Enquiry
received finilized
Prepare Review
Ministerial Ministerial
Response Response
Enquiry Response
investigated reviewed
Must have a
decision activity
21
Parallel repetition: multi-instance activity
Multi-Instance Multi-Instance
Task Sub-process
23
Example: multi-instance activity
Procurement
24
Solution: without multi-instance activity
Procurement
Obtain Quote
from Supplier A
Obtain Quote
from Supplier B
Obtain Quote
from Supplier D
Obtain Quote
from Supplier E
25
Solution: with multi-instance activity
Procurement
cardinality
For each supplier
26
Events
Events
In BPMN, events model something instantaneous happening
during the execution of a process
Types of event:
• Start
• Intermediate
• End
29
BPMN event types
Start Intermediate End
30
Comparison with sending/receiving tasks
= Receive
invoice
Invoice
received
Invoice
= Send invoice
sent
Invoice
= Send invoice
sent
≠
Receive
invoice
Invoice
received
31
So, when to use what?
Use message events only when the corresponding activity would simply
send or receive a message and do nothing else
32
Temporal events
Start Intermediate End
33
Example
PO handling
A Purchase Order (PO) handling process starts when a PO is
received. The PO is first registered. If the current date is not a
working day, the process waits until the following working day
before proceeding. Otherwise, an availability check is
performed and a PO response is sent back to the customer.
34
Recap: Message and Timer events
Start Intermediate End
Catching Catching Throwing Throwing
35
Data-based vs. event-based choices
1
Event-based decision
With the XOR-split gateway, a branch is chosen based on
conditions that evaluate over available data
The choice can be made immediately after the token
arrives from the incoming flow
data-driven event-driven
XOR-split XOR split
38
Solution: event-driven XOR split
Stock replenishment
39
Exception handling
Abortion (terminate event)
This can be done via the Terminate end event: it forces the whole
process to abort (“wipes off” all tokens left behind, if any)
42
Example: terminate event
Abort the process by removing all tokens…
43
Exception handling
Handling exceptions often involves stopping a sub-process and
performing a special activity
External: something goes wrong outside the process, and the execution of the current activity must be
interrupted. Handled with the Message event
Internal: something goes wrong inside an activity, whose execution must thus be interrupted. Handled
with the Error event
Timeout: an activity takes too long and must be interrupted. Handled with the Timer event
All these events are catching intermediate events. They stop the
enclosing activity and start an exception handling routine.
44
Let’s extend our PO handling process
PO handling
A PO handling process starts when a PO is received. The PO is
first registered. If the current date is not a working day, the
process waits until the following working day before
proceeding. Otherwise, an availability check is performed and a
PO response is sent back to the customer.
45
Let’s extend our PO handling process
PO handling
Next working day
weekend/
holiday
Handle PO
Next workingNext
day working day
weekend/ weekend/
holiday holiday
PO Change PO Cancel
received received
Handle PO
Cancelation
Register PO
PO
Change
canceled
8
Internal exception: error event
Start Intermediate End
Error Event – Indicates an error: the ³end´ version generates an
error event while the ³catching intermediate´ version consumes it
when attached to the boundary of an activity
48
Example: internal exception
PO handling
Handle PO
Next workingNext
day working day
weekend/
Consider again ourweekend/
“PO
holiday Handling
holiday process” example with the following extension: if an
item is not available, any weekday
processing related
weekday Check
to the PO must
Check be stopped.
Send PO Send PO Thereafter, the
Register PO
client needs to be notified that the PO cannot Availability be further
Availability processed.
Response Response
PO PO PO PO
Response
Received Registered fulfilled fulfilled
sent
PO Change PO Cancel
received received
Handle PO
Cancelation
Register PO
PO
Change
canceled
49
Throwing and catching
Solution: internal exception error events must have
the same label
PO handling
Handle PO
Handle PO
Nextworking
Next working day
day Items not
weekend/
weekend/ available
holiday
holiday
weekday
weekday Check
Check Send POSend PO
Register PO
Register PO Availability
Availability ResponseResponse
Items
PO
PO
PO available Response PO PO
Response
Received
Received
Registered
Registered fulfilled
fulfilled
sent sent
50
Example: activity timeout
Order-to-transportation quote
Once a wholesale order has been confirmed, the supplier
transmits this order to the carrier for the preparation of the
transportation quote. In order to prepare the quote, the
carrier needs to compute the route plan (including all track
points that need to be traversed during the travel) and
estimate the trailer usage.
By contract, wholesale orders have to be dispatched within
four days from the receipt of the order. This implies that
transportation quotes have to be prepared within 48 hours
from the receipt of the order to remain within the terms of
the contract.
Solution: activity timeout
Order-to-transportation quote
More on the PO handling example…
PO handling
Handle PO
The customer may send a request for address change after the
PO registration. When such a request is received, it is just
registered, without further action.
54
Non-interrupting boundary events
Sometimes we may need to trigger an activity in parallel to the normal flow, i.e. without
interrupting the normal flow.
Must be attached to
the activity’s
boundary
55
Solution: non-interrupting boundary events
PO handling
Handle PO
Customer
address
updated
56
Summary