PDF Archive

Easily share your PDF documents with your contacts, on the Web and Social Networks.

Share a file Manage my documents Convert Recover Search Help Contact



UML cont .pdf



Original filename: UML- cont.pdf
Title: UML Activity Diagram
Author: glory

This PDF 1.5 document has been generated by Microsoft® Office PowerPoint® 2007, and has been sent on pdf-archive.com on 26/05/2011 at 04:53, from IP address 124.106.x.x. The current document download page has been viewed 1250 times.
File size: 3.7 MB (70 pages).
Privacy: public file




Download original PDF file









Document preview


Activity diagrams help users to describe visually the
sequence of actions that leads you through the
completion of a task.
Activity diagrams are a useful analysis tool and can
be used for process reengineering, i.e., redesigning

process. In this way, activity diagrams are a
progressive

An activity diagram is pretty close to a flowchart.
The symbols are similar but not the same.
Activity diagrams are good at helping you to
capture, visualize, and describe an ordered set of
actions from a beginning to an end. Activity diagrams
are created as a finite set of serial actions or a
combination of serial and parallel actions.

An activity diagram is pretty close to a flowchart.
The symbols are similar but not the same.
Activity diagrams are good for capturing details

Initial Node
Every activity diagram has one initial node symbol. This
is a solid circle.

Control Flow
A control flow is a directed arrow. A control flow is also
referred to as just a flow or an edge.
A common way to adorn a control flow is to add a guard
condition. A guard condition acts as a sentinel that
requires a test be passed before flow continues. In
code, commonly this would be implemented as an ifconditional test.

Different Ways of Showing Flows
Using Connector Nodes

Using Objects

Different Ways of Showing Flows
Using Pins - analogous to parameters in
implementation. The name or value of a pin leaving
one action should be thought of as an input parameter
to the next action.
Actions

Action nodes are the things that you do or that
happen in an activity diagram

Actions
•Two of the most important aspects of actions are the order in

which they occur and the name you give them.
•Actions are permitted to have one or more incoming flows and
only one outgoing flow.

•If there is more then one incoming flow, then the

action will not transition until all incoming flows have
reached that action.
•Actions can split into alternate paths using the
decision node or
•transition into parallel flows using the fork node
•but only a single flow actually should be attached as
an outgoing flow for an action.

Adding Preconditions and Postconditions

Preconditions and postconditions can be added to
a model using a note—the stereotype symbols with
the word precondition or the word postcondition in
between and the name of the condition.
The note is attached to the action to which the
condition or conditions applies. This is referred to
as design by contract and often is implemented in
code as an assertion combined with a conditional
test.

Decision and Merge Nodes
Decision and merge nodes were called decision
diamonds in flowcharts. Decision and merge nodes
use the same symbol and convey conditional
branching and merging.
Transition Forks and Joins
A fork exists to depict parallel behavior, and a join is
used to converge parallel behavior back into a single
flow.

Using Swimlanes
If we want to show who or what is responsible for
various actions, we can add a swimlane (or partition).

Using Multidimensional Partitions

Indicating Timed Signals
Types of signals - A signal indicates that an outside
event has fired and that event initiates the activity.
Time signal

The hourglass shape of the time signal is used to
specify
an interval of time. For example, we could
use the time signal to indicate that the "Expire Listing"
activity
Send signal
Accept signal. will start after the listing has been
available for 30 days (Figure 3-18). The receive
67

Indicating Timed Signals
Accept signal

Capturing Input Parameters
Activity diagrams can have input parameters, e.g., in
in every instance that we are talking about doing
something with a listing. We could show a "Listing“

Capturing Input Parameters

Showing Exceptions
An exception is shown as a zigzagging
line (or "lightning bolt") with the name of the class of the
exception adorning the zigzagging line. The exception handler
can be modeled as an action node with the name of the action
in the node and the exception flow connecting to an input pin
on the exception action node .
The node containing the exception handler has no return flow.
An exception handler just hangs off the action that caused the
error to occur.
It is important to remember that we are capturing general flow
and actions; during this phase, we do not have to indicate how
we are handling the exception.

Showing Exceptions

Terminating Activity
Diagrams
When you reach the end of an activity,
add an activity final node.
If you reach the end of a flow and nothing
else happens, add a flow final node.
You can have more than one activity final
node and flow final node in a single
activity diagram.

Sequences have an explicit time ordering and are linear
from top to bottom.
Elements of Sequence Diagrams
Object Lifelines
A lifeline is a rectangle with a vertical line descending
from the rectangle.
The lifeline represents an instance of a class, and the
vertically descending line is a convenient place to attach
incoming and outgoing messages.
Adding multiple lifelines to a single diagram and
attaching these with time-ordered messages permits you to
show all
the classes and messages necessary to complete a scenario
described by a use case.

Object Lifelines

Object Lifelines

Activating a Lifeline
Objects have a lifetime. When we begin using an object and when we are done
using an object unless the object represents a finite resource.

In both cases, the activation line represents the span of an object's lifetime for
practical purposes.
It is also important to know that an object can be represented as being created and
destroyed using a single lifeline.
The activation symbol is a vertical rectangle replacing the lifeline for the duration
of that instance's existence , keep in mind that an object can be created and
destroyed multiple times and that one lifeline is used to represent all instances of
that class in a sequence.

Object Lifelines

Sending Messages
Messages are directed lines connecting lifelines. The line
begins at one lifeline, and the arrow points toward a lifeline
containing the message invoked.
The message can begin and end on the same lifeline; this is a
nested call.
A filled-in triangle represents a synchronous message.
 A stick triangle represents an asynchronous message,
and a dashed line is used for return messages.
Included as possible messages are found messages and lost
messages. A found message is a message with a known
receiver, but the sender is not known, and
a lost message has a known sender but no specified receiver.

Sending Messages

Sending Messages

Adding Constraints and Notes
You can add notes and constraints to help
disambiguate the meaning of particular aspects of
your sequence diagrams.
For example, we could add a note to the diagram that
indicates that we are using SHA1 and a salt value and
storing the password in an encrypted form only .

Adding Constraints and Notes

Using Interaction Frames
Interaction frames (or combined fragments) are new
in UML version 2.0. Interaction frames are rectangular
regions used to organize interaction diagrams (sequence
and timing diagrams).
Interaction frames can surround an entire interaction
diagram or just part of a diagram.
Each interaction frame is tagged with a specific
word (or an abbreviated form of that word),
and each kind of interaction frame conveys some specific
information.

Using Interaction Frames

Using Interaction Frames

Using Interaction Frames

Discovering Objects and Messages
Sequence diagrams are also good at helping
you to discover classes and methods.
The classes can be identified easily as a noun
name for the instance of your objects, and
methods are the messages that are invoked on
an object.
It may not be immediately evident what the
parameters for these methods are, but classes
and methods are a good start.

A collaboration diagram—redubbed a
communication diagram in UML version 2.0—
conveys the same information as a sequence
diagram.

Where time ordering is implicit in the linear layout
of a sequence diagram, we explicitly indicate the
time ordering by numbering the messages in
geometrically organized collaboration diagrams.

Symbols
Rectangle - called classifier role, it represents
the objects
Connector - a line indicating the message, it
represent connected objects,
Named arrow indicates the message as well as
the sender and receiver.
Collaboration has the same elements but fewer
details. The compact nature and fewer elements
make collaborations convenient when doodling
designs

Collaboration diagrams have other
common elements such as notes,
constraints, and stereotypes.

These elements are used the same way
they are used in sequence diagram

Interaction diagrams provide you with
enough information to begin coding.
The objects are instances of classes, so
you need to define a class for each object.
Messages generally equate to methods,
and the method is placed in the class of
the receiver (not the caller).

Class diagrams are the most common and
the most important view of the design that you
will create.
Class diagrams are called static diagrams
because they don't depict action.
What class diagrams do is show you things and
their relationships.
Class diagrams are designed to show all the
pieces of your solution—which pieces are related
to or used as parts of new wholes—and should
convey a sense of the system to be built at rest.

The nouns and verbs that describe your
problem sufficiently are the easiest classes
to find.
It can help you to complete a useful
analysis of the problem, but you will end
up designing and using many more
classes that are necessary to fill in the
blanks.


Related documents


PDF Document oomdsyllabus
PDF Document oomdunit3
PDF Document uml cont
PDF Document devry cis 339 ilab 4 sequence
PDF Document cis 339 ilab 4 sequence communication and state diagrams
PDF Document cpt230 sample exam question two solution


Related keywords