Uploaded by im.alobaid

week 3

advertisement
Recap from last lecture
Types of Gateways
•
Default flow/path:
–
What does happen if token could not proceed XOR gateway OR gateway?  will through an exception (runtime error).
–
The simple way to manage this case is by using default flow.
There is another way to handle exceptions (we will see it later).
–
Default flow mechanism: all flows are examined; then if there
is no true condition, the default flow is applied. It does not
mean the default is true all the time.
–
Default path has small slash and it is used with OR and XOR
gateways.
–
Default path and risks in some cases??
Types of Gateways
4- Complex gateways:
–
It is used in a situation when we want specific number of true
conditions are applied. This means this complex gateway will
wait until the defined number of tokens arrive and then
proceed to the next step.
–
Although the complex gateway can be used in splitting and
joining, it is not often used.
–
We use annotation with the complex gateway to indicate the
specific number of token should expect.
–
It is represented by the following shape
*
Types of Gateways
•
Complex gateways example:
– You want to buy a computer form one of two online shops
but you want it as soon as possible regardless of the price.
You send both of them an order request and then you will
go with the first positive response.
– Model this simple process by not using complex gateway
(the other three gateways) and then by using complex gate
way.
Special tasks
1- Typification:
– Primarily, task types are intended to model processes that are technically
executable.
Special tasks
1- Typification:
– Task’s types are:
• Manual task: it is a task that is executed by human being and does
not affect the completion of the task assigned by the process engine. E.g.
file a document , cook pizza.
•
User task: it is a task that is executed by a person but it affects the
completion of the task assigned by the process engine; the process engine
expects sort of confirmation such as data input or to click a button. User
task is part of work flow management. E.g. approve a vacation.
Special tasks
•
Service task: it is a task that is done by software. The process engine
executes them automatically as the task is a program function.
Normally it is a web service, but it could be another implementation.
So, it is part of process-oriented implementation integration.
•
Receive and send tasks: they are used to send and receive messages.
They are alternatives to catching and throwing message events; if you
use them, do not use catching and throwing message events. Normally
these tasks are technical and are used by process engine for calling web
services through message queues and accepting service requests for
processing.
Special tasks
•
Script task: it is a script that is executed by the process engine
directly; the script should be written in a language that is interpreted by
the process engine.
•
Business rule task: it is used to apply business rules. We will see
details of this later (THINK of DMN!!).
•
Custom task type: this type is used to define your own type with
your special symbol to customize your diagram and express your
organization’s conditions; e.g. answering phone call.
– In which level of management people will be interested in
these details?
Activity markers
1- Loop (repetition):
– We practiced so far a linear structure which means each activity is performed
at most once… BUT …
– What will you do when you want to model a situation that needs to repeat
some activities in a business process?
– Could you do it using gateways we have seen ??? YES as
following:
• Try to identify activities or the block of activities that need to be repeated. We call
this a repetition block. And identify the entry points and exit points.
• The last activity of the repetition block must be decision activity to direct the flow
to go back before the repetition block starts or to continue with other activities.
• The decision activity has two outcomes and we use XOR-split which allows us to
go back to the repetition block or continue with rest of activities of a process.
• We use XOR-join to model the connection of the branch that goes back to just
before repetition block.
Activity markers
1- Loop (repetition):
– The logic is that some activities need to be repeated until defined
conditions apply.
– BPMN2.0 offers special activity with Loop symbol to do the repetition
instead of using gateways or conditional flows.
Activity markers
1- Loop (repetition):
– It looks like “do-while” or “while-do”.
– You attach the condition on which a loop task executes for the first time
(see next slide), or use annotation on repeated executions (see previous
slide).
– Think of structured and unstructured cycles.
Activity markers
1- Loop (repetition):
Activity markers
2- Multiple task (parallel repetition):
– The loop activity allows us to capture sequential repetition (instances are
executed one after the other). But in some situations, we want to run the
instances of loop activity at the same time.
– A multi-instance (task) activity is offered by BPMN2.0 to execute activity
or sub-process (group of activities) many times in parallel (concurrently).
– Assume you want to model a business process for getting quotes from 5-7
suppliers … using gateways are complex – not dynamic – needs to be
updated from time to time. See next diagram …
Activity markers
2- Multiple task (parallel repetition):
– Compare between the following two alternatives:
Activity markers
2- Multiple task (parallel repetition):
Activity markers
2- Multiple task (parallel repetition):
– Two ways to determine the number of multi-instance activity to be
created/instantiated:
1. Using data object (collection type) as input to the multi-instance activity.
This collection could be retrieved from database.
2. Using annotation to specify a specific number of instances or minimum
number we want to create.
– When multi-instance is triggered and based on required number of
instances, the same number of tokens are created for every instance.
When required instances of multi-instance activity are completed, all other
instances are canceled and their tokens are destroyed.
Questions
References
1. Fundamentals of business process management
(marlon Dumas, Marcello La Rosa, Jan Mendling, and Hajo A.Reijer).
2. Real-Life BPMN
(Jakob
Freund and Bernd Rucker)
Download