Part VI: Design Continuous - PowerPoint PPT Presentation

1 / 39
About This Presentation
Title:

Part VI: Design Continuous

Description:

Part VI: Design Continuous Activity Diagams State Diagrams * Object Oriented Analysis & Design & UML (Unified Modeling Language) * – PowerPoint PPT presentation

Number of Views:65
Avg rating:3.0/5.0
Slides: 40
Provided by: YusufA3
Category:

less

Transcript and Presenter's Notes

Title: Part VI: Design Continuous


1
Part VI Design Continuous
  • Activity Diagams
  • State Diagrams

2
Content
  • Activity Diagams
  • State Diagrams

3
Activity Diagrams
4
Activity Modeling
  • a specialized type of behavioral modeling
  • concerned with modeling the activities
  • and responsibilities of elements.
  • a special form of state machine to model
  • the computations
  • and workflow
  • Represents the state of execution
  • not states of objects
  • applied in conjunction with
  • sequence and collaboration modeling

5
Activity Diagrams
  • widely used in analysis to model
  • a use case flow
  • flow between the use cases
  • with no use of classes, objects, etc.
  • but also in design to model
  • details of operation
  • details of algorithm

6
Using Activity Diagrams
  • activity diagram can be
  • attached to any modeling element
  • for the purpose of modeling the behavior of that
    element.
  • Activity diagrams are typically attached to
  • use cases
  • classes
  • interfaces
  • components
  • nodes
  • collaborations
  • operations and methods

7
Action States
  • Operation of Object Oriented systems
  • a society of objects
  • Elements communicate with one another
  • each element has
  • the responsibility of reacting
  • to the communications it receives.
  • An action state processing
  • as an element fulfills a responsibility
  • Example (the project management system states)
  • Project Manager Enters Report Criteria
  • Project Management System Generates Report
  • Printer Prints Report

8
Types of action states
  • Initial action state
  • the first action state
  • A final action state
  • the last action state
  • is shown using a bull's eye
  • An activity diagram
  • may have only one initial action state,
  • but may have any number of final action states.

9
Flow Transitions
  • shows how action states
  • are ordered
  • or sequenced.
  • Whenever
  • an action or subactivity state
  • finishes its work,
  • there is a transition
  • out of the state into the next state
  • types of flow transitions
  • control-flow
  • object-flow transitions

10
Control-Flow Transitions
  • indicates
  • the order of action states
  • Once a source action state
  • completes its processing,
  • a target action state
  • starts its processing

11
Example Control Flow Transitions
  • task of generating a report
  • for the project management system
  • order of action states
  • The Project Manager Enters Report Criteria
  • The Project Management System
  • Generates Report
  • The Printer Prints Report

12
Control-flow transitions
13
Default transitions
  • Control-flow transitions
  • are also known as default transitions
  • or automatic transitions,
  • because
  • they are unlabeled
  • and are immediately triggered
  • after the source action state
  • completes processing.

14
Decisions
  • A decision involves
  • selecting one control-flow transition
  • out of many control-flow transitions
  • based upon a condition

15
Swimlanes
  • a visual region in an activity diagram
  • Represents
  • use cases
  • classes
  • components
  • organizational units
  • in business modeling
  • roles
  • in workflow modeling
  • indicates the element
  • has responsibility
  • for action states within the region

16
Object-Flow Transitions
  • Indicates an action state
  • input or output an object
  • can modify object state
  • An object-flow transition
  • is shown as
  • a dashed arrow
  • between
  • an action state
  • and an object.

Activities may input and output objects and can
modify object state show this on an activity
diagram as an object flow
17
Types of Object-Flow Transitions
  • An action state uses an object as input
  • show with object-flow transition arrow
  • Point
  • from the object
  • to the action state.
  • An action state updates or produces an object
  • Show with the object-flow transition arrow
  • Point
  • from the action state
  • to the object

18
Control-flow and object-flow transitions
Without unnecessary control-flow transitions
19
Signals
  • A signal is a way of representing
  • a package of information
  • that is communicated asynchronously
  • between two objects.
  • A signal event occurs
  • when an object receives a signal
  • When an event is received
  • by an object
  • it may trigger a state transition in it

20
Sending Receiving Signals
  • the signal called Order is sent to the
  • MailOrderCompany external object
  • we wait in the signal receipt
  • for a signal called Goods delivered

21
Signals are classifiers
  • Modeled as stereotyped classes.
  • The purpose of a signal is
  • to provide asynchronous communication of
    information
  • between objects and so,
  • unlike ordinary classes,
  • they only have attributes
  • and the single implicit operation
  • send(targetSet)
  • allows them to be sent to a set of target
    objects.
  • As this operation is implicit,
  • it is never actually shown on signal diagrams
  • it is just assumed that it is there for every
    signal.
  • The signal attributes
  • specify the information content of the signal

22
Example GUI events
  • a generalization hierarchy of raw GUI events
    modeled as signals

23
Concurrency
  • selecting multiple transitions simultaneously

24
State Diagrams
25
State Diagrams
  • also known as
  • statechart diagrams
  • state machines (in UML 2.0)
  • depict the lifecycle of elements
  • that make up a system
  • State modeling
  • is a specialized type of behavioral modeling
  • concerned with modeling
  • the lifecycle of an element

26
States Definition
  • A state
  • is a condition of being at a certain time.
  • is drawn as a rounded rectangle
  • with the name of the state in the center
  • can be
  • a passive quality,
  • Example light objectgt On and Off.
  • an active quality (object is doing something
  • Example Person gt moving, sleeping, reading,
  • Example coffeemaker gt Brewing

27
Simple States
  • indicates a condition or situation of an element.
  • Example
  • the project management system
  • Inactive
  • is not available to its users,
  • because it is not started or has been shut down
  • Active
  • started and available to its users
  • Suspended
  • has encountered some severe error,
  • Possible reason
  • is running low on secondary storage
  • requires user intervention

28
Initial and Final States
  • Initial state
  • the state of an element ,
  • when it is created.
  • is shown with a small solid filled circle.
  • A final state
  • the state of an element
  • when it is destroyed.
  • is shown with
  • a circle surrounding a small solid filled circle
  • a bull's eye

29
Transitions
  • A transition,
  • shown with an arrow
  • represents
  • a change of states
  • from a source state to a target state
  • A transition description,
  • written along the arrow,
  • describes the circumstances
  • causing the state change to occur.

30
Trigger
  • A trigger is
  • an event cause a transition.
  • Example
  • User input processing systems
  • a keystroke trigger
  • may cause the system to change states
  • from Gathering input
  • to Processing input.

31
Transition Variations
  • A trigger with no guard
  • the transition is taken
  • when the trigger occurs.
  • This is useful
  • for modeling a state change
  • in response to an event.
  • A trigger with a guard
  • the transition is taken
  • when the trigger occurs
  • if the guard evaluates to true.
  • Otherwise, the transition isn't taken.
  • Combining a trigger and a guard is useful
  • for modeling a transition is blocked
  • depending on a condition.
  • Neither a trigger nor a guard are specified,
  • the transition is taken immediately
  • after the source state's internal behavior

32
The life cycle of an object
  • the life cycle of an AccountApplication object
  • as it passes from pending
  • to approved or rejected
  • and then to finalizing

33
Example how to use
  • State diagram modeling a troll in a FPS game
  • FPS first-person shooter
  • the troll's behavior is determined by his state

34
Composite States
  • A composite state is a state
  • contains one or more state diagrams.
  • Each diagram belongs to a region,
  • regions are divided by a dotted line
  • A state in a region is referred to as a
  • substate of the composite state.
  • Composite states work as follows
  • when the composite state becomes active,
  • the initial pseudostate of each region becomes
    active,
  • and the contained state diagrams begin executing.
  • if a trigger on the composite state occurs
  • The contained state diagrams are interrupted

35
Composite States Example
  • Composite states contain
  • one or more state diagrams
  • execute in parallel

36
Advanced Pseudostates
  • A choice pseudostate
  • used to emphasize a Boolean condition
  • determines
  • which transition is followed.
  • has guards
  • represented on outgoing transitions
  • the transition depends on the guard.

37
Fork and join pseudostates
  • show branching
  • into concurrent states
  • and then rejoining

38
Signals
  • transition-oriented view
  • to draw attention
  • to transitions and transition behavior
  • using special icons for transitions.

39
End of Chapter
Write a Comment
User Comments (0)
About PowerShow.com