Sei sulla pagina 1di 30

7.

Business Process Mapping


thro Activity Modeling

Business Process Modeling


with Activity Diagrams
Elements of an Activity Diagram
Guidelines for Creating Activity
Diagrams
Activity breakdown structure

BPM With Activity Diagrams


A number of activities support a
business process across several
departments
Activity diagrams model the
behavior in a business process
Sophisticated Flowcharts
Addresses Parallel concurrent
activities and complex processes

Activity Diagrams

Essentially a flow chart showing flow of


control from activity to activity
Models the dynamic aspects of systems
Focus is the work performed in implementation
of an operation or the activities in a use-case
instance
Variant of a state diagram with a slightly
different purpose
To capture actions (work and activities
performed)
And the results of the actions (in terms of
object-state changes)
4

The states in the activity diagram


called action-states transition directly to
the next stage when the action in the
state is performed
Unlike the normal state diagrams the
events are not specified
Another difference is that their actions
may be placed in swimlanes
A swimlane groups activities w.r.t.:
Who is responsible for the activities, or
Where the activities reside in an
organization

An activity diagram is an alternative way


of describing interactions which
expresses
How actions are taken
What they do (change object states)
When they take place (action
sequences)
Where they take place (swimlanes)
Has a start point and an end point

Activity diagrams may be used for


different purposes
To capture the work (actions) that will
be performed when an operation is
executing the instance of an
operation implementation. The most
common usage of activity diagrams
To capture the internal work of an
object

To show how a set of related actions

may be performed, and how they


will affect objects around them
To show how an instance of a usecase may be performed in terms of
actions and object state changes
To show how a business works in
terms of workers (actors),
workflows, organization and objects

An activity is an ongoing nonatomic


execution.

Contents:

Distinguishes activity diagrams from all


other kinds of diagrams
Action states and activity states
Transitions
Objects

Action States:

Are atomic
Cannot be decomposed the action
state is not interrupted by any event
Considered to take insignificant
execution time
Eg, submit plan, initialize, increment
etc

10

Activity States:

Can be further decomposed


Nonatomic may be interrupted
Take some time to complete
Can be thought of as a composite made up
of other activity states and action states
Eg, process bill, prepare purchase order etc
An action state is a special case of an
activity state
An action state is an activity state that
cannot be further decomposed
Zoom into the details of an activity state;
you will find another activity diagram 11

Transitions:

When the action or activity of a state


completes, flow of control passes immediately
to the next action or activity state
This flow is specified by using transitions, which
show the path from one action or activity state
to the next action or activity state
A simple directed line represents this
Semantically these are called
triggerless/completion transitions
The flow of control continues indefinitely
In case of an infinite activity, or
Until a stop state is encountered
12

Branching:

As in a flow chart, branches can be


included
This specifies alternate paths taken
based on some Boolean expression
Branches are represented as a diamond
A branch may have one incoming
transition and two or more outgoing
ones
Guard conditions are placed on each
outgoing transition
13

Forking and Joining:

When modeling workflows of business


processes we might encounter concurrent
flows
We use a synchronization bar to specify
forking and joining of these parallel flows of
control
Represented as a thick horizontal/vertical
line
Fork and join should balance number of
flows leaving a fork should match the
number of flows that enter its
corresponding join
14

Swim lanes:

When modeling workflows of business processes, it


is useful to partition the activity states into groups
Each group represents a component of the business
organization responsible for a set of activities
Each group is called a swim-lane
Separated from its neighbour by a vertical line, each
group specifies a locus of activities
Each swim-lane has a unique name, and represents
a real-world entity
Each swim-lane may be implemented by one or
more classes
In an activity diagram partitioned into swim-lanes,
every activity belongs to exactly one swim-lane
Transitions may cross lanes
15

Object Flow:

Objects may be involved in the flow of


control associated with an activity diagram
Objects can be shown explicitly in an
activity diagram using a dependency
notation, connected to the relevant activity
or transition that creates, destroys, or
modifies these objects
This use of dependency relationships and
objects is called an object flow because it
represents the participation of an object in a
flow of control
16

In addition to participation, we can also


show how an objects role, state and
attribute values change
State of an object can be shown by
naming it in square brackets below the
objects name
Attributes values are shown in
attributes compartment below objects
name

17

Activity Diagram Example

18

Activity Diagram

19

20

Common Uses:
Activity diagrams model the dynamic aspects
of a system
Typically, used in two ways
To model a workflow:
Focus on activities as viewed by actors

that interact and collaborate with the


system
Workflows are used to visualize, specify,
construct, and document business
processes involving the system we are
developing
Here, modeling object flow is of particular
importance
21

To model an operation:

Here, activity diagrams are used as

flowcharts
Models the details of a computation
Modeling of branch, fork, and join
states is very important
The context of the activity diagram,
here, involves the parameters of the
operation and local objects

22

Custome
r

Sales

Accountin Warehou
se
g

23

Modeling a workflow:

Establish a focus for the workflow. May not


be possible to show all the workflows in one
diagram
Select the business objects that have highlevel responsibilities for the overall
workflow. These may be real things from the
vocabulary of the system, or may be
abstract entities
Create a swimlane for each important
business object

24

Identify the preconditions of the


workflows initial state and the postconditions of the workflows final state.
This helps to model the boundaries of
the workflow
Starting at the workflows initial state,
specify the activities and actions that
take place over time and show them in
the activity diagram as either activity
states or action states

25

For complex actions, or set of actions,


combine these into activity states, and
provide a separate activity diagram for each
Show the transitions that connect these
activity and action states.
Start with sequential flows in the workflow
first. Then consider branching. Only then
consider forking and joining
If there are important objects that are
involved in the workflow, show them. Show
their changing values and states (as
necessary) to communicate the intent of
the object flow
26

Modeling an Operation:

An activity diagram can be attached to any


modeling element for visualizing, specifying,
constructing, and documenting that elements
behaviour.
We can attach activity diagrams to classes,
interfaces, components, nodes, use cases, and
collaborations.
The most common element to model is an
operation.
Here, it is simply a flowchart of an operations
actions. But, the primary advantage is its semantic
richness. Any other operation/signal from another
object can be represented along with type checking.
27

To model an operation:
Collect the abstractions involved in this
operation, including the parameters and the
return types.
Identify the preconditions at the operations
initial state and the post conditions at the
operations final state. Also identify the
invariants of the enclosing class that must
hold during the execution of the operation
Starting at the operations initial state,
specify the activities and actions that take
place over time and show them in the
activity diagram as either activity states or
action states.
28

Use branching (as applicable) to


specify conditional paths and iteration
If the operation is owned by an active
class, use forking and joining to show
parallel flows of execution
Ex: An activity diagram for Computing
Fibonacci numbers

29

30

Potrebbero piacerti anche