Slides - Fundamentals of BPM
Download
Report
Transcript Slides - Fundamentals of BPM
Business Process Modelling
-9.2/2013 -
Marcello La Rosa
Queensland University of Technology
Brisbane, 19 September 2013
Quick Repeat from Week 8
• What is a process event?
• What is the difference between a message and a timer
event?
• How to interrupt an activity?
© INB/INN320 9.2/2011 – 19 September 2013
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
• This is why BPMN distinguishes data-driven and eventdriven XOR-splits
data-driven XOR-split
© INB/INN320 9.2/2011 – 19 September 2013
event-driven XOR split
3
Example: event-based decision
Restaurants submit orders to suppliers to replenish
their food stocks every Thursday. The process for
completing an order starts when a restaurant
receives either a “PO Response” or an error
message. However it may also happen that no
response is received at all. If no response is received
by Friday afternoon or if an error message is
received, the purchasing officer should be notified.
Otherwise, the PO Response is processed normally.
© INB/INN320 9.2/2011 – 19 September 2013
4
A possible solution
PO Response
Received
Process PO
Response
Ordering
completed
Error Message
Received
From
“Order
submission”
© INB/INN320 9.2/2011 – 19 September 2013
Friday
afternoon
Notify
Purchasing
Officer
Ordering
failed
5
Quiz: find the bugs
Send
Questionnaire
Filled
Questionnaire
Received
Send reminder
not Intermediate Timer
Event
© INB/INN320 9.2/2011 – 19 September 2013
After 5 days
6
Solution: event-based decision
Send
Questionnaire
Filled
Questionnaire
Received
Send reminder
After 5 days
© INB/INN320 9.2/2011 – 19 September 2013
7
Pool
1 1
Pool
Remember the quiz from slide 23 of Week 8?
A
A
B
B
Message y
Message y
Message x
Pool
Pool22
c1
c1
D
C C
Message z
D
F
Not c2 Not c2
Not c1Not c1
© INB/INN320 9.2/2011 – 19 September 2013
Message z
Message x
E
E
c2
c2
F
8
Interlude: multiple start events
The first such event that occurs, will trigger an instance of the process.
PO Response
Received
Process PO
Response
Error Message
Received
Friday
afternoon
© INB/INN320 9.2/2011 – 19 September 2013
Notify
Purchasing
Officer
9
What is this process doing?
good
delivered
From “Process Invoice
Relating to PO”
POD received
Verify Goods
Delivery
good not
delivered
To “Create Goods
Receipt - Centralised”
Request Proof
of Delivery
(POD)
From “Process Blocked
Invoice Relating to PO”
5 working
days
© INB/INN320 9.2/2011 – 19 September 2013
10
BPMN Modelling
- Exception Handling -
Simplest form of exception: Terminate event
• 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)
© INB/INN320 9.2/2011 – 19 September 2013
Example: terminate event
Signal the negative outcome…
PO Response
Received
Process PO
Response
Ordering
completed
Error Message
Received
From
“Order
submission”
© INB/INN320 9.2/2011 – 19 September 2013
Friday
afternoon
Notify
Purchasing
Officer
Ordering
failed
Example 2: terminate event
Abort the process by removing all tokens…
© INB/INN320 9.2/2011 – 19 September 2013
Example: our PO handling process (see Week 8)
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.
Anytime after the PO has been registered, the customer may
send a “PO change request”. When such a PO change 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 change request needs to be handled.
© INB/INN320 9.2/2011 – 19 September 2013
15
Solution
Handle PO
Next working day
weekend/
holiday
PO
Received
Check
Availability
weekday
Register PO
Send PO
Response
PO
Registered
Response
sent
PO Change
received
Register PO
Change
© INB/INN320 9.2/2011 – 19 September 2013
PO
fulfilled
PO Cancel
received
Handle PO
Cancelation
PO
canceled
16
Exception handling
• Handling exceptions often involves stopping a sub-process and
performing a special activity
• Types of exceptions for an activity (task/sub-process) in BPMN:
Timeout: an activity takes too long and must be interrupted. Handled
with the Timer event
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
All these events stop the enclosing activity and start an exception
handling routine.
© INB/INN320 9.2/2011 – 19 September 2013
Internal exceptions: error event
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
Must be attached to the
activity’s boundary
© INB/INN320 9.2/2011 – 19 September 2013
Example: error event
Consider 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/
holiday
weekend/
holiday
weekday
Register PO
PO
Received
weekday
Check Send PO
Check
Availability Availability Response
PO
Registered
PO
fulfilled
PO Change
received
Register PO
Change
© INB/INN320 9.2/2011 – 19 September 2013
Send PO
Response
PO Cancel
received
Handle PO
Cancelation
PO
canceled
Response
sent
PO
fulfilled
Solution
Handle PO
Next working day
Items not
available
weekend/
holiday
PO
Received
Check
Availability
weekday
Register PO
PO
Registered
PO Change
received
Register PO
Change
Items
available
Send PO
Response
Response
sent
PO
fulfilled
Items not
available
PO Cancel
received
Handle PO
Cancelation
PO
canceled
Notification
sent
Must catch an error
event thrown from
within the same activity
© INB/INN320 9.2/2011 – 19 September 2013
20
Compensation Handling
• May be used as part of an exception handling
procedure
• Rollback of completed process activities
E.g.: Bookings for holidays have successfully been
completed. However, it turns out that the given credit
card details were incomplete. A booking rescission
is necessary.
• Triggered by throwing Compensate Event
• Compensation Handler (triggered by
a catching Compensate event)
performs the rollback
© INB/INN320 9.2/2011 – 19 September 2013
Compensation
handler
Compensate event
Compensate Event – Indicates that the enclosing process must be
compensated: the “throwing intermediate” and the “end” version
generate the compensation event while the “intermediate catching”
version consumes it when attached to the boundary of an activity
Must be attached to the
activity’s boundary
© INB/INN320 9.2/2011 – 19 September 2013
Example: compensation event
Let’s extend out PO Handling process.
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 in parallel.
During these two sub-processes, a PO cancellation may
be received from the customer. In this case, both subprocesses are stopped, and a compensation routine is
performed for each of them (e.g. reimbursement and/or
goods return may need to occur).
© INB/INN320 9.2/2011 – 19 September 2013
Possible solution: compensation event
Fulfil and Pay PO
Payment
Cancel PO
Reimbursement
Handle PO
PO Received
+
Fulfillment
Only one compensate
activity must be linked
from a catching
compensate event, via a
directed association
Cancel PO
Goods return
PO Cancel received
© INB/INN320 9.2/2011 – 19 September 2013
Cancel PO
PO
fulfilled
and paid
Recap: Terminate, Error and Compensate events
Terminate: Triggering the
immediate termination of a
process.
Error: Catching or throwing
named errors.
Compensate: Handling or
triggering compensation.
© INB/INN320 9.2/2011 – 19 September 2013
End
Throwing
Boundary
Interrupting
Catching
Intermediate
Non-interrupting boundary events
Sometimes we may need to trigger a task/sub-process in
parallel to the normal flow, i.e. without interrupting the normal
flow.
This can be achieved by using non-interrupting boundary
events:
– Double dashed border
– Attached to the boundary of a task/sub-process
© INB/INN320 9.2/2011 – 19 September 2013
Example: non-interrupting boundary events
Again, our PO handling process…
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.
Anytime after the PO has been registered, the customer may send a “PO
The customer
may
send
a “Customer
address
request”
change
request”.
When
such
a PO change
requestchange
is received,
any after
the PO registration.
When
is The
received,
it is just
processing
related to the
POsuch
must aberequest
stopped.
PO change
request is
registered,
without
furtherthe
action.
then
registered.
Thereafter,
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 chance request
needs to be handled.
© INB/INN320 9.2/2011 – 19 September 2013
Solution: non-interrupting boundary events
Handle PO
weekend/
holiday
Register PO
Check working
day
PO
Received
PO Cancel
received
Next working day
weekday
Address
change
received
Handle PO
Cancelation
PO
canceled
© INB/INN320 9.2/2011 – 19 September 2013
Check
Availability
Send PO
Response
Update
customer
address
PO
handled
Customer
address
updated
An alternative: Event Sub-Process
To handle events that may not refer to a particular task/subprocess within a process.
• Placed into a process or sub-process
• Depicted within a dotted rectangle with rounded corners
Event Sub-Process
Event
Sub-Process
+
• Is activated when its start event is triggered
• It may or may not interrupt the parent process or subprocess, depending on the type of its start event:
– Non-Interrupting:
– Interrupting:
© INB/INN320 9.2/2011 – 19 September 2013
Example: Event Sub-Process
Handle PO
weekend/
holiday
Register PO
Check working
day
Next working day
weekday
Check
Availability
Send PO
Response
PO
Received
Handle Po Cancelation
Handle Address Change
Handle PO
Cancelation
PO Cancel
received
when the event sub-process is
inside a sub-process, it can only
be receptive of those events that
occur during the execution of the
enclosing sub-process
© INB/INN320 9.2/2011 – 19 September 2013
PO
canceled
Address
change received
Update
customer
address
Customer
address changed
PO
handled
Recap: Events
Untyped: indicate start point,
state changes or final states.
Message: Receiving and
sending messages.
Timer: Cyclic timer events,
points in time, time spans or
timeouts.
Link: Off-page connectors.
Two corresponding link events
equal a sequence flow.
Error: Catching or throwing
named errors.
Compensate: Handling or
triggering compensation.
Terminate: Triggering the
immediate termination of a
process.
© INB/INN320 9.2/2011 – 19 September 2013
End
Throwing
Boundary NonInterrupting
Boundary
Interrupting
Catching
Intermediate
Event Sub-Process
Non-Interrupting
Event Sub-Process
Interrupting
Top-Level
Start
References
Required
• Sections 4.4.3 and 4.5 of Chapter 4 of textbook “Fundamentals of BPM”
Recommended
• OMG (2011): BPMN 2.0 Specification
• BPM Offensive (2011): BPMN 2.0 Poster
• OGM (2010): BPMN 2.0 By Example
Web References
• OMG BPM Initiative
• BPMN Community
Books on BPMN
• Silver B. (2011): “BPMN Method & Style” 2nd Edition, Cody-Cassidy
© INB/INN320 9.2/2011 – 19 September 2013
A/Prof. Marcello La Rosa
IS School Academic Director
(Corporate Programs and Partnerships)
BPM Discipline, IS School
Science & Engineering Faculty
Queensland University of Technology
126 Margaret Street
Brisbane QLD 4000
Australia
p +61 (0)7 3138-9482
e [email protected]
w www.marcellolarosa.com
© INB/INN320 9.2/2011 – 19 September 2013