Você está na página 1de 22

Events

Events
Start Events
Start Events

• The Conditional event (a) starts a process when the related condition becomes true:
“provide additional resources when the utilization of the current ones exceeds 90%”.
• The Signal event (b) is triggered by the reception of a signal. In contrast to a message
which is always sent to a specific receiver, a signal is broadcasted everywhere, from the
same or a different pool: “when the computer system is not available, start a process for
manually processing data”.
• The Multiple event (c) combines many events; if one of them occurs, the process is
started: “a cleaning activity is started when either the cleaning interval has been reached,
or a contamination has been detected”.
• •In the Parallel multiple event (d) all of the combined events must have occurred: “ the
take-off procedure can be started as soon as both the permission has been given and the
engines have been checked”
Intermediate Events
Intermediate events (normal flow)
Intermediate events (linked to Boundary)
End events
Events (In practice)
• Events can be used in the normal process flow:
E-mail
Announce
discussion
issues for
deadline
discussion
warning
Delay 6 day from
announcement

• They represent things that happen during the process.

• Events can also be attached to the boundary of an activity:


Receive
confirmation

2 Days
Send
cancellation
notice

• They indicate that the activity should be interrupted when the Event is triggered.

9
Events
In practice

• Link Events can be used for Off-Page connectors.

• Link Events can be used as “Go-To” objects.

10
Some Types of Events
Terminology of creating/receiving an event
• “Throwing” – event message is generated as a result of an occurrence
• “Catching” – process waits to respond to an indicated event

Simple event
• A defined signal (message) captures the occurrence
• Customer order arrives
• Payment received
• Credit approval task completes

Compound or “complex” event


• A conditional statement made up of simpler events
• Create an event “IF order arrives AND not handled in five minutes
The three basic event types
1) Start - Thin bordered circle (empty=“none” start event)
• Initiates the process (triggered by a signal)

2) End (normal and termination)


• Ends the process
• Single thick bordered circle

3) Intermediate (double-ringed)
Along a sequence flow
• Stop processing along that flow and wait for (catch) the event
• Or generate (throw) the event
On a task/activity border boundary
• Listen for the event over duration of task
• If attached event occurs while activity running, pass control to boundary flow
Event Based Gateway
Exclusive Gateways, based on events
Exclusive Gateways, based on events
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.
Event Based Gateway
The Event-Based Gateway represents a branching point in the Process where the
alternative paths that follow the Gateway are based on Events that occur rather
than the evaluation of the process flow that lead to this point.
A specific Event such as the receipt of a message from a customer, determines
the path that will be taken.
An Event Based Gateway is graphically represented in BPMN using a pentagon
marker inside a double line circle, inside a diamond with a single line.
Event Based Gateway
The following process is an example of a process with an event-based Gateway.
When the execution arrives at the event-based Gateway, process execution is
suspended. Additionally, the process instance subscribes to the alert signal event and
creates a timer which fires after 10 minutes. This effectively causes the process
engine to wait for ten minutes for a signal event. If the signal event occurs within 10
minutes the timer is canceled and execution continues after the signal. If the signal is
not fired, execution continues after the timer and the signal subscription is canceled.
Exercise 1
In the context of a claim handling process, it is sometimes
necessary to send a questionnaire to the claimant to gather
additional information. The claimant is expected to return the
questionnaire within five days. If no response is received after
five days, a reminder is sent to the claimant. If after another five
days there is still no response, another reminder is sent and so
on until the completed questionnaire is received.
Exercise 2 - What is wrong with this model?
Pizza Delivery
• The exercise consists in modeling the interaction between a pizza customer and a pizza vendor.
• The customer selects some pizzas and beverages from the menu of the pizza vendor and orders them.
• After that, the customer waits for the notification that the pizza has been properly assigned to a “delivery
boy”.
• After 60 minutes, if the pizza the notification was not received the costumer will ask for the pizza.
• The process of the pizza vendor is triggered by the order of the customer. After a clerk has collected the
order, the preparation of the pizzas is delegated to the pizza chef. In the meanwhile the clerk starts to
retrieve the beverages.
• The pizza chef follows a specific process to prepare each pizza associated to a specific order. Specifically, for
each pizza, he prepares the ingredients and rolls out the pizza dough, puts the toppings on top of the pizza
and bakes it. After 10 minutes, he packages the pizza and provides it to the clerk.
• When the clerk has collected all the beverages and the packages containing the pizzas of a specific order, he
assigns them to a delivery boy and notifies the customer that the pizzas will be delivered soon.

Você também pode gostar