FBPM2 Chapter04 AdvancedProcessModeling
FBPM2 Chapter04 AdvancedProcessModeling
Contents
1. More on Rework and Repetition
2. Handling Events
3. Handling Exceptions
4. Processes and Business Rules
5. Recap
Process Modeling in the BPM Lifecycle
Process
Management Processes
Support Processes
Process Process
monitoring analysis
Executable Insights on
process weaknesses and
model their impact
Process Process
implementation To-be process redesign
model
Chapter 4: Advanced Process Modeling
Contents
1. More on Rework and Repetition
2. Handling Events
3. Handling Exceptions
4. Processes and Business Rules
5. Recap
More on rework and repetition
Structured
cycle (SESE
fragment)
SESE = Single Entry Single Exit fragment, i.e. a fragment delimited by a single entry
node and a single exit node (there are no other incoming arcs into the fragment or
outgoing arcs from the fragment)
Block-structured repetition: Loop Activity
BPMN also provides the loop activity construct to allow the repetition of a task or
sub-process
Task Sub-process
Loop Loop
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
Loop Activity or (Arbitrary) Cycle?
Arbitrary Cycles
Arbitrary = unstructured, i.e. it can have multiple entry and exit nodes (non-SESE).
A B C D
exit point
8
Exercise 4.1
Identify the entry and exit points that delimit the unstructured cycles in the process
model shown below. What are the repetition blocks?
Exercise 4.1
Identify the entry and exit points that delimit the unstructured cycles in the
process model shown below. What are the repetition blocks?
Model the business process shown below using a loop activity.
Example: multi-instance activity
Procurement
In procurement, typically a quote is to be obtained from all preferred
suppliers (assumption: five preferred suppliers exist). After all quotes
are received, they are evaluated and the best quote is selected. A
corresponding purchase order is then placed.
11
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
12
Parallel repetition: multi-instance activity
Multi-Instance Multi-Instance
Task Sub-process
Useful when the same activity needs to be executed for multiple entities
or data items, such as:
Request quotes from multiple suppliers
Check the availability for each line item in an order separately
Send and gather questionnaires from multiple witnesses in the context of an
insurance claim
13
Solution: with multi-instance activity
Procurement
cardinality
For each supplier
14
Further example: multi-instance activity
15
Solution: multi-instance activity
Motor insurance claim lodgement
Multi-instance pool
Data collection denotes multiple
denotes a set of data participants of the
objects of the same type same type
(determines cardinality of
multi-instance activity)
Completion
condition indicates
minimum number of
instances required to
complete
(≤ cardinality)
Our order-to-cash example…
now with pools, messages and MI markers
17
Exercise 4.2
Completion
Can be used in an early version of a process diagram condition
when the order of execution is still unknown
Until all KPIs reviewed
Example: Ad-hoc sub-process
20
Exercise 4.3: Army recruitment
21
Chapter 4: Advanced Process Modeling
Contents
1. More on Rework and Repetition
2. Handling Events
3. Handling Exceptions
4. Processes and Business Rules
5. Recap
How do we model this scenario?
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.
23
Events handling
24
BPMN event types
25
Example: message events
Court
Administra-
tion
Judiciary
Invoice
= Receive
invoice
received
Invoice
= Send invoice
sent
Invoice
= Send invoice
sent
≠
Receive
invoice
Invoice
received
So, when to use what?
Use message events only when the corresponding activity would simply send or
receive a message and do nothing else
Typed or Untyped Event?
Exercise 4.4
Is there any other activity in the loan assessment model below that can be replaced
by a message event?
Temporal events
In a small claims tribunal, callovers occur once a month to set down the
matter for the upcoming trials. The process for setting up a callover starts
three weeks prior to the callover day, with the preparation of the callover
list containing information such as contact details of the involved parties
and estimated hearing date. One week prior to the callover, the involved
parties are notified of the callover date. Finally, on the callover day, the
callover material is prepared and the callover is held.
Prepare
Prepare Contact Hold
callover
callover list parties callover
material
3 weeks prior 1 week prior callover day callover
to callover to callover held
day day
Start Intermediate Intermediate
event catching event catching event
Coming back to our scenario…
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.
Next working day
weekend/
holiday
The first start event that occurs will trigger an instance of the process
PO Response
Received
Process PO
Response
Error Message
Received
Notify
Friday Purchasing
afternoon Officer
Exercise 4.4: Internet Service Provider
35
Racing events: Event-based decision
data-driven event-driven
XOR-split XOR split
36
Example: Event-based decision
37
Exercise 4.6: Stock replenishment
Matching a
data-driven
choice at
Client
What’s wrong with this collaboration diagram?
Auction creation
19
Solution
Auction creation
Exercise 4.7
Fix the following
collaboration diagram.
Recap: message and timer events
Catching Throwing
Contents
1. More on Rework and Repetition
2. Handling Events
3. Handling Exceptions
4. Processes and Business Rules
5. Recap
Process abortion
Exceptions are events that deviate a process from its “normal” course
This can be done via the Terminate end event: it forces the whole
process to abort (“wipes off” all tokens left behind, if any)
45
Example 1: terminate event
46
Example 2: terminate event
47
Exercise 4.8
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
All these events are catching intermediate events. They stop the enclosing activity and
start an exception handling routine.
49
Internal exception: error event
Must be attached to
the activity’s boundary
50
Example: internal exception
PO handling
Consider again our “PO Handling process” example with the following extension:
if an item is not available, any processing related to the PO must be stopped.
Thereafter, the client needs to be notified that the PO cannot be further
processed.
Handle PO
Next workingNext
day working day
weekend/ weekend/
holiday holiday
51
Solution: internal exception Throwing and catching
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
Items not
available
Notification
sent
simple or
complex
Check Policy
claim
Classify Claim
Claim Claim
received complex checked
Check Damage
claim
53
Solution: internal exception
Check insurance
Policy is
invalid invalid
policy
Policy is
invalid
Notify
Customer
Claim
rejected
54
Example: external exception
PO handling
A PO change request may be received anytime after the PO is registered.
This request includes a change in quantity or line items. When such a
request is received, any processing related to the PO must be stopped.
The PO change request is then registered. Thereafter, the process
proceeds as it would do after a normal PO is registered. Further, if the
customer sends a PO cancelation request after the PO registration, the
PO processing must be stopped and the cancelation request must be
handled.
PO handling
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
Exercise 4.9
The routine for logging into an Internet bank account starts once the credentials entered from
the user have been retrieved. First, the username is validated. If the username is not valid, the
routine is interrupted and the invalid username is logged. If the username is valid, the number
of password trials is set to zero. Then, the password is validated. If this is not valid, the
counter for the number of trials is incremented and if lower than three, the user is asked to
enter the password again, this time together with a CAPTCHA test to increase the security
level. If the number of failed attempts reaches three times, the routine is interrupted and the
account is frozen. Moreover, the username and password validation may be interrupted should
the validation server not be available. Similarly, the server to test the CAPTCHA may not be
available at the time of log in. In these cases, the procedure is interrupted after notifying the
user to try again later. At any time during the log in routine, the customer may close the web
page, resulting in the interruption of the routine.
Exercise 4.10: 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
Example: Non-interrupting boundary events
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.
60
Non-interrupting boundary events
Must be attached to
the activity’s boundary
61
Solution: non-interrupting boundary events
PO handling
Handle PO
Customer
address
updated
62
Exercise 4.11
Consider the process for assessing loan applications below.
Exercise 4.11
An applicant who has decided not to combine the loan with a home insurance
plan may change its mind any time before the eligibility assessment has been
completed. If a request for adding an insurance plan is received during this
period, the loan provider will simply update the loan application with this request.
Complex Exceptions
PO handling
[…] Further, if the customer sends a PO cancelation request after the
PO registration,
PO registration, the
the request
PO processing must be stopped
is first assessed. andthe
Based on theprogress
change
request
of needs
the order to be handled.
handling (e.g. if items have already been fetched from
external warehouses) a penalty is determined and communicated to
the customer. The customer has 48 hours to accept the penalty and go
on with the cancelation or to stop the cancelation and continue with
the order handling.
65
Complex Exceptions: Signal event
PO
PO Broadcasts
Items not Address
a signal to all
PO Cancel
Cancel to be
received
received canceled available change
Handle PO catchingreceived
signal events
Cancelation
Charge Handle PO bearing same label
Update
PO Notification
penalty cancelation customer
canceled sent
PO address
canceled
Request PO Customer
to stop to be address
received canceled updated
Determine Notify
cancelation penalty
penalty to customer
Request PO
to continue not
received canceled
48 hours
Event sub-process
To handle events that may not refer to a particular task/ sub-process within a
process
Event Sub-Process
Event
Sub-Process
+
Interrupting:
Example: event sub-process
PO handling
Handle PO
Handle PO
Cancelation
PO Cancel PO Items Notification
received canceled not available Only
sent receptiveof events
occurring during the
execution of the enclosing
Update
customer sub-process
address
Address Customer
change received address updated
PO Change Handle
received PO
inquiry
PO PO Inquiry
Register PO Inquiry handled
Change received
Event sub-processes or boundary events?
Exercise 4.12
After an expense report is received from an employee, the employee is notified of the
receipt of the report. Next, a new account must be created if the employee does not
already have one. The report is then reviewed for automatic approval. Amounts
under EUR 1,000 are automatically approved while amounts equal to or over EUR
1,000 require manual approval. In case of rejection, the employee must receive a
rejection notice by email. In case of approval, the reimbursement is deposited directly
to the employee's bank account and an approval notice is sent to the employee via
email, with the details of the money transfer. At any time during the review, the
employee can send a request for amount rectification. In that case the rectification is
registered and the report needs to be reviewed again. Moreover, if the report is not
handled within 30 days, the process is stopped and the employee receives a
cancelation notice email so that he can resubmit the expense report from scratch.
Example: activity compensation
PO handling
After a PO has been registered, checked, and a response has been
sent back, a payment sub-process and a fulfilment sub-process are
started. During these two sub-processes, a PO cancellation may be
received from the customer. In this case, both sub-processes are
stopped, and their effects are reverted (e.g. reimbursement and/or
goods return may need to occur).
72
Activity compensation
Compensation
handler
73
Solution: activity compensation The compensate
activity can be a
PO handling sub-process
Fulfil and Pay PO
Payment
Cancel PO
Re-
imbursement
Handle PO
PO Received + PO
Fulfillment fulfilled
and paid
PO Cancel received
74
Cancel PO
Compensate event
If the report is not handled within 30 days, the process is stopped, the
employee receives a cancelation notice email and must resubmit the
expense report. However, if the reimbursement for the employee’s expenses
had already been made, a money recall needs to be made, to get the money
back from the employee, before sending the cancelation notice email.
Recap: Events
Start Intermediate End
Boundary Non-
Interrupting
Interrupting
Boundary
Throwing
Catching
Untyped: indicate start point,
state changes or final states.
Compensate: Handling or
triggering compensation.
77
Chapter 4: Advanced Process Modeling
Contents
1. More on Rework and Repetition
2. Handling Events
3. Handling Exceptions
4. Processes and Business Rules
5. Recap
Processes and Business Rules
• Conditional events
79
Example: conditional event
Replenishment order
80
Exercise 4.14
Contents
1. More on Rework and Repetition
2. Handling Events
3. Handling Exceptions
4. Processes and Business Rules
5. Recap
Recap