Chapter 4: Advanced Process Modeling
Contents
Process Modeling in the BPM Lifecycle
Chapter 4: Advanced Process Modeling
Contents
More on rework and repetition
XOR-join: entry point
XOR-split: exit point
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
Example: block-structured repetition
Must have a decision activity
Completion condition
Loop Activity or (Arbitrary) Cycle?
Arbitrary Cycles
Arbitrary = unstructured, i.e. it can have multiple entry and exit nodes (non-SESE).
8
entry point
exit point
exit point
entry point
Exercise 4.1
Exercise 4.1
Example: multi-instance activity
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
Procurement
Solution: without multi-instance activity
12
Procurement
Parallel repetition: multi-instance activity
Provides a mechanism to indicate that an activity is executed multiple times concurrently
Useful when the same activity needs to be executed for multiple entities or data items, such as:
13
Solution: with multi-instance activity
14
cardinality
Procurement
Further example: multi-instance activity
15
After a car accident, a statement is sought from the witnesses that were present, in order to lodge the insurance claim. As soon as the first two statements are received, the claim can be lodged to the insurance company without waiting for the other statements.
Motor insurance claim lodgement
Solution: multi-instance activity
Multi-instance pool
denotes multiple participants of the same type
Data collection�denotes a set of data objects of the same type
(determines cardinality of multi-instance activity)
Completion condition indicates minimum number of instances required to complete
(≤ cardinality)
Motor insurance claim lodgement
Our order-to-cash example…�now with pools, messages and MI markers
17
Exercise 4.2
Model the following process fragment.
After a car accident, a statement is sought from two witnesses out of the five that were present in order to lodge the insurance claim. As soon as the first two statements are received, the claim can be lodged with the insurance company without waiting for the other statements
Uncontrolled Repetition: Ad-hoc sub-process
Contains activities to be executed in arbitrary order and number of times
May define order of sub-set of activities by sequence flow
Can be used in an early version of a process diagram�when the order of execution is still unknown
Completion condition
Example: Ad-hoc sub-process
20
Exercise 4.3: Army recruitment
21
A typical army selection process starts by shortlisting all candidates’ applications. Those shortlisted are then called to sit the following tests: drug and alcohol, eye, color vision, hearing, blood, urine, weight, fingerprinting and doctor examination. The color vision can only be done after the eye test, while the doctor examination can only be done after color vision, hearing, blood, urine and weight have been tested. Moreover, it may be required for some candidates to repeat some of these tests multiple times in order to get a correct assessment, e.g. the blood test may need be repeated if the candidate has taken too much sugar in the previous 24 hours. The candidates that pass all tests are asked to sit a mental exam and a physical exam, followed by an interview. Only those that also pass these two exams and perform well in the interview can be recruited in the army.
Model the following process snippet.
Chapter 4: Advanced Process Modeling
Contents
How do we model this scenario?
23
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.
PO handling
Events handling
In BPMN, events model something instantaneous happening during the execution of a process
They affect the process flow:
24
BPMN event types
25
Example: message events
Start event
(receive)
Intermediate catching event
(receive)
End event
(send)
Comparison with sending/receiving tasks
=
=
=
≠
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
Example: 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.
Start�event
Intermediate catching event
Intermediate catching event
Coming back to our scenario…
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.
PO handling
Multiple start events
The first start event that occurs will trigger an instance of the process
Exercise 4.4: Internet Service Provider
35
The ISP sends an invoice by email to the customer on the first working day of each month (Day 1). On Day 7, the customer has the full outstanding amount automatically debited from its bank account. If an automatic transaction fails for any reason, the customer is notified on Day 8. On Day 9, the transaction that failed on Day 7 is re-attempted. If it fails again, on Day 10 a late fee is charged to the customer’s bank account. At this stage, the automatic payment is no longer attempted. On Day 14, the Internet service is suspended until payment is received. If the payment is still outstanding on Day 30, the account is closed and a disconnection fee is applied. A debt-recovery procedure is then started.
Model the billing process of an Internet Service Provider (ISP).
Racing events: 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
Sometimes, the choice must be delayed until an event happens
🡪 The choice is based on a “race” among events
Two types of XOR split:
36
data-driven XOR-split
event-driven�XOR split
Example: Event-based decision
37
Exercise 4.6: Stock replenishment
A restaurant chain submits a purchase order (PO) to replenish its warehouses every Thursday. The restaurant chain’s procurement system expects to receive either a “PO Response” or an error message. However, it may also happen that no response is received at all due to system errors or due to delays in handling the PO on the supplier’s side. If no response is received by Friday afternoon or if an error message is received, a purchasing officer at the restaurant chain’s headquarters should be notified. Otherwise, the PO Response is processed normally.
Model the following process.
Matching choices in different business parties
Matching a data-driven choice at Client
Lead-to-Quote
What’s wrong with this collaboration diagram?
19
Auction creation
Solution
Auction creation
Exercise 4.7
Fix the following�collaboration diagram.
Recap: message and timer events
Chapter 4: Advanced Process Modeling
Contents
Process abortion
Exceptions are events that deviate a process from its “normal” course
The simplest form of exception is to notify that there is an exception (negative outcome)
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
Signal the negative outcome…
Example 2: terminate event
47
Abort the process by removing all tokens…
Exercise 4.8
Revise the examples presented so far by using the terminate event appropriately.
Exception handling
�
Internal: something goes wrong inside an activity, whose execution must thus be interrupted. Handled with the Error event
External: something goes wrong outside the process, and the execution of the current activity must be interrupted. Handled with the Message event
Timeout: an activity takes too long and must be interrupted. Handled with the Timer event
49
Handling exceptions often involves stopping a sub-process and performing a special activity
Types of exceptions for an activity (task/sub-process):
All these events are catching intermediate events. They stop the enclosing activity and start an exception handling routine.
Internal exception: error event
50
Must be attached to the activity’s boundary
Example: internal exception
51
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.
PO handling
Solution: internal exception
52
Must catch an error event thrown from within the same activity
Throwing and catching error events must have the same label
PO handling
One more example: internal exception
Extend the claim handling process shown below as follows:
After checking the insurance policy, a possible outcome is that the insurance is invalid. In this case, any processing is cancelled and a letter is sent to the customer. In the case of a complex claim, this implies that the damage checking is cancelled if it has not yet been completed.
53
Solution: internal exception
54
Example: external exception
55
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
Solution: external exception
8
PO handling
Exercise 4.9
Model the following routine for accessing an Internet bank service.
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
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.
Order-to-transportation quote
Solution: activity timeout
Order-to-transportation quote
Example: Non-interrupting boundary events
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
PO handling
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.
This can be achieved by using non-interrupting boundary events
61
Must be attached to the activity’s boundary
Solution: non-interrupting boundary events
62
PO handling
Exercise 4.11
Consider the process for assessing loan applications below.�
Exercise 4.11
Extend this process as follows.�
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
[…] Further, if the customer sends a PO cancelation request after the PO registration, the PO processing must be stopped and the change request needs to be handled.
65
[…] Further, if the customer sends a PO cancelation request after the PO registration, the request is first assessed. Based on the progress of the order 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.
PO handling
Complex Exceptions: Signal event
Can be attached to the activity’s boundary
Solution: non-interrupting event + signal event
Broadcasts a signal to all catching signal events bearing same label
PO handling
Event sub-process
To handle events that may not refer to a particular task/ sub-process within a process
Example: event sub-process
PO handling
Only receptive of events occurring during the execution of the enclosing sub-process
Event sub-processes or boundary events?
Exercise 4.12
Model the following business process for reimbursing expenses.
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
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
PO handling
Activity compensation
73
Solution: activity compensation
74
Only one compensate activity must be linked from a catching compensate event
The compensate activity can be a sub-process
PO handling
Compensate event
75
Must be attached to the activity’s boundary
Exercise 4.13
Modify the model created in Exercise 4.13 as follows.
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
77
Chapter 4: Advanced Process Modeling
Contents
Processes and Business Rules
79
Example: conditional event
80
Replenishment order
Exercise 4.14
Model the following business process snippet.
In a stock exchange, stock price variations are continuously monitored during the day. A day starts when the opening bell rings and concludes when the closing bell rings. Between the two bells, every time the stock price changes by more than 10%, the entity of the change is first determined. Next, if the change is high, a “high stock price” alert is sent, otherwise a “low stock price” alert is sent.
Chapter 4: Advanced Process Modeling
Contents
Recap
Recap (cont‘ed)