0% found this document useful (0 votes)
10 views15 pages

UML Activity

The document discusses activity diagrams which are used to represent the internal behavior of operations or use cases. It describes the key concepts of activities, transitions, guards, swimlanes, and provides examples to illustrate these concepts.

Uploaded by

clans2806
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views15 pages

UML Activity

The document discusses activity diagrams which are used to represent the internal behavior of operations or use cases. It describes the key concepts of activities, transitions, guards, swimlanes, and provides examples to illustrate these concepts.

Uploaded by

clans2806
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Activity Diagram

F. ABDALLAH 1
Activity Diagram
• Intended to represent the internal behavior:
– Of an operation
– Of a use case

• An activity diagram represents the execution of a process as a


sequence of steps (or activities)
• This diagram must represent the flow of activities (not of objects) in
detail
• Concepts :
− activity,
− transition,
− guard,
− swimlanes

F. ABDALLAH 2
Concepts

❑ Activity
• Represented by a rounded rectangle, stretched horizontally
• Each activity represents a particular step in the execution of the
including method.

❑Transitions : relate the activities


• Arrow from the current activity to next
• No internal transitions, nor started by events
• The transition is started when the current activity finishes; the
following activity starts

❑ Notation:

F. ABDALLAH 3
Concepts

Activity Check temperature

[Too hot] Check temperature


transition
[too cold]

Other Activity Heat Cool


[too cold] [too hot]

Heat Cool

❑ Specific activities:

begin end

F. ABDALLAH 4
Concepts

❑ Gards : [test]
• Boolean conditions, mutually exclusive, allow the transitions
between activities
• Condition represented by a diamond

Heat

Check temperature

Cool

F. ABDALLAH 5
Concepts

❑ Branching
• The diamond can also be used to represent branching

A1

A3

A2

At the end of A1 or A2, the control flow goes to activity A3

F. ABDALLAH 6
Concepts

❑ Synchronization bar

• Allows to open and to close parallel branches within a flow


execution of a method or a use case.

• Transitions at the beginning of the synchronization bar are started


simultaneously.

• A synchronization bar cannot be crossed until all the transitions in


entry on the bar were started.

F. ABDALLAH 7
Concepts

❑ Synchronization Bar

Cool Stop heating Open window

Stop heating Open window Check temperature

The transitions at the beginning of A synchronization bar is crossed


the synchronization bar are started when all the transitions in entry
simultaneously were started

F. ABDALLAH 8
❑ Example

Fill order

[Not Subscriber]
Assign place
[Subscriber]

Calculate amount
Assign place Calculate reduction

Debit card

Calculate amount

Debit Card

Print Ticket

F. ABDALLAH 9
Concepts
❑ Swimlanes
• Column showing the various responsibilities within a mechanism of
an organization

• Each responsibility is ensured by one or more objects, and each


activity is allocated with a swimlane given

• Relative Position of the swimlanes is not significant

• A transition can freely cross the swimlanes

• We can replace the swimlanes of activities by life lines, as in the


case of the sequences diagrams

• An object can appear several times in the diagrams to increase its


legibility (his state is specified between []).

F. ABDALLAH 10
Concepts

❑ Swimlanes

Teacher Student Jury

Teach

Learn

Control the knowledge Compose

Evaluate

F. ABDALLAH 11
Concepts
❑ Swimlanes

:Consumer :Seller :Inventory management

Request service

pay Take order


Delivering packages

Print invoice
Take invoice and packages

F. ABDALLAH 12
Concepts
❑ Objects
• We can view the objects in an activity diagram
• The manipulation of objects allow to display the modification of their state

Consumer Seller Inventory management

Request Service : order


[done]

pay Take order Delivering packages

: order
[performed]
Print invoice

Take invoice & pakcages

F. ABDALLAH 13
Activity Diagram

❑ How to use an activity diagram


➢ To document a use case
– Clarify the use case
– Show use cases as activities
• Included
• Extending the current use case

F. ABDALLAH 14
❑ How to use an activity diagram
Enter customer information
Print report

<<extends>> <<Constraint>> Choose payment method


{on the demand of
client}
Order Order product
Extension point:
after payment

Order product

Enter customer information [customer did not request ticket]

Choose payment method Print Ticket


[customer
request ticket]

F. ABDALLAH 15

You might also like