Unit 3(advanced state modeling & interaction meodelling)

140

description

Unit 3(advanced state modeling & interaction meodelling)

Transcript of Unit 3(advanced state modeling & interaction meodelling)

Page 1: Unit  3(advanced state modeling & interaction meodelling)
Page 2: Unit  3(advanced state modeling & interaction meodelling)

https://sites.google.com/a/cmrit.ac.in/manoj-c5559/

Page 3: Unit  3(advanced state modeling & interaction meodelling)

UNIT – 3

ADVANCED STATE MODELING, INTERACTION MODELING:

State Modeling: Nested state diagrams; Nested states; Signal Advanced generalization; Concurrency; A sample state model; Relation of class and state models; Practical tips. Interaction Modeling: Use case models; Sequence models; Activity models. Use case relationships; Procedural sequence models; Special constructs for activity models.

Page 4: Unit  3(advanced state modeling & interaction meodelling)

Two major features are introduced for controlling complexity and combinatorial explosion in state diagrams◦ Nested state diagrams◦ Concurrent state diagrams

Many other features are also added◦ propagated transitions◦ broadcast messages◦ actions on state entry, exit◦ …

S2

S1

Nested State Diagrams

Concurrent State Diagrams

Page 5: Unit  3(advanced state modeling & interaction meodelling)

Activities in states are composite items denoting other lower-level state diagrams

A lower-level state diagram corresponds to a sequence of lower-level states and events that are invisible in the higher-level diagram.

Page 6: Unit  3(advanced state modeling & interaction meodelling)

When one state is complex, you can include substates in it.◦ drawn as nested rounded

rectangles within the larger state

Caution: Don't over-use this feature.◦ easy to confuse separate states

for sub-states within one state

superstate

substates

Page 7: Unit  3(advanced state modeling & interaction meodelling)

A state may be represented as nested substates.◦ In UML, substates are shown by nesting them in a superstate box.◦ A substate inherits the transitions of its superstate.

Page 8: Unit  3(advanced state modeling & interaction meodelling)

Idle

off hook / play dial tone

on hook

Active[valid subscriber]

PlayingDialTone

Dialing Connecting

digitdigit

complete

Talking

connected

Page 9: Unit  3(advanced state modeling & interaction meodelling)

Simple State

Complex State

Substate1

entry: entry action

Substate2

Substate1

entry: entry action

Substate2

event( args )[ cond ] / action t̂arget.event(args)event( args )[ cond ] /

action t̂arget.event(args)

event( args )[ cond ] / action t̂arget.event(args)

event( args )[ cond ] / action t̂arget.event(args)

Page 10: Unit  3(advanced state modeling & interaction meodelling)

Super-state

A Bevent-1

C

event-2

A B

C

event-1

event-2event-2

Page 11: Unit  3(advanced state modeling & interaction meodelling)

Checking

do / check Item

Dispatchingdo / initiate delivery

Delivering

[all items checked && some items not in stock]Order item

[all items checked && all items available]Dispatch items

[all items ava

ilable]

Item re

ceived

delivery

get first item

Cancelingcancelled

Ordering

Exit/ Item receiveddo / order Item

*[all items checked]get next item

entry / deliver Items

do / Remove Item

Page 12: Unit  3(advanced state modeling & interaction meodelling)
Page 13: Unit  3(advanced state modeling & interaction meodelling)

Transitions can be specific◦ A transition can be from a specific

substate (T1)◦ A transition can be to a specific

substate inside the nested state (T2) Transitions can be general◦ We saw that a transition from the

superstate is valid for all substates (T3)◦ A transition into the superstate (T4)

normally goes to the default initial state (start state leading to F)

T1

S

A B

E

F

CD

T2T4

T3

Page 14: Unit  3(advanced state modeling & interaction meodelling)

◦ concurrency is a property of systems in which several computations are executing simultaneously, and potentially interacting with each other.◦ Dashed line indicates that an order is in two different states, e.g. Checking &

Authorizing◦ When order leaves concurrent states, it’s in a single state: Canceled, Delivered

or Rejected

◦ Concurrent Sub states - Used when two or more state diagrams are executing concurrently within a single object.

Page 15: Unit  3(advanced state modeling & interaction meodelling)

Complex systems usually have concurrency◦ “subsystems” that operate (mostly)

independently Heart monitor device◦ The power supply and the heart

monitoring application are really concurrent subsystems◦ They should be modeled that way!!◦ They are mostly independent: the

monitoring application doesn’t care where it gets its power

Heart Monitor

MonitoringSubsystem

PowerSubsystem

Page 16: Unit  3(advanced state modeling & interaction meodelling)

Startup

Alarm

Operational

Off

Switch on

Switch offStartup

Complete

Problemdetected

Running

Monitoring Subsystem

MainsBattery

Mains off

Mains on

Dotted lineseparatesconcurrent statemachines

Power Subsystem

Page 17: Unit  3(advanced state modeling & interaction meodelling)

release keyturn key to startIgnition

turn key off

[Transmissionin Neutral]

depress accelerator

release accelerator

Accelerator

Transmissionpush R

push N

push Fpush N

upshift

downshift

upshift

downshift

stopForward

depress brake

release brake

Brake

Car

off starting on

Neutral Reverse

first second third

onoff onoff

Page 18: Unit  3(advanced state modeling & interaction meodelling)

Two types of concurrency1. System concurrency◦ State of overall system as the aggregation of state diagrams, one

for each object. Each state diagram is executing concurrently with the others.

2. Object concurrency◦ An object can be partitioned into subsets of states (attributes and

links) such that each of them has its own subdiagram. ◦ The state of the object consists of a set of states: one state from

each subdiagram.◦ State diagrams are divided into subdiagrams by dotted lines.

Page 19: Unit  3(advanced state modeling & interaction meodelling)
Page 20: Unit  3(advanced state modeling & interaction meodelling)

The class model describes the class & objects in a system and their relationship.

The state model describes the life cycles of the objects.

The interaction model describes how the objects interact.

The interaction model starts with use cases that are then elaborated with sequence and activity diagrams

Page 21: Unit  3(advanced state modeling & interaction meodelling)

Use case: focuses on functionality of a system- i.e, what a system does for users

Sequence diagrams: shows the object that interact and the time sequence of their interactions

Activity diagrams: elaborates important processing steps

Page 22: Unit  3(advanced state modeling & interaction meodelling)
Page 23: Unit  3(advanced state modeling & interaction meodelling)
Page 24: Unit  3(advanced state modeling & interaction meodelling)
Page 25: Unit  3(advanced state modeling & interaction meodelling)
Page 26: Unit  3(advanced state modeling & interaction meodelling)
Page 27: Unit  3(advanced state modeling & interaction meodelling)

Functional vs. Non-Functional

Requirements

Functional

Non-Functional

Functional requirement are user ‘visible’ features and aretypically initiated by stakeholders of the system – generate report, login, etc.

Non-functional requirements are ‘non-visible’ features and but required for a effective running of an application – security, backup, etc.

Page 28: Unit  3(advanced state modeling & interaction meodelling)
Page 29: Unit  3(advanced state modeling & interaction meodelling)

Use Case diagrams show the various activities the users can perform on the system.

◦ System is something that performs a function.

They model the dynamic aspects of the system.

Provides a user’s perspective of the system.

29

Page 30: Unit  3(advanced state modeling & interaction meodelling)

A use case is a model of the interaction between External users of a software product (actors) and The software product itself

More precisely, an actor is a user playing a specific role describing a set of user scenarios capturing user requirements contract between end user and software developers

Page 31: Unit  3(advanced state modeling & interaction meodelling)

Use case diagrams are used to visualize, specify, construct, and document the (intended) behavior of the system, during requirements capture and analysis.

Provide a way for developers, domain experts and end-users to Communicate.

Serve as basis for testing.

Use case diagrams contain use cases, actors, and their relationships.

31

Page 32: Unit  3(advanced state modeling & interaction meodelling)

Actors: A role that a user plays with respect to the system, including

human users and other systems. e.g., inanimate physical objects (e.g. robot); an external system that needs some information from the current system.

Use case: A set of scenarios that describing an interaction between a user and a system, including alternatives.

System boundary: rectangle diagram representing the boundary between the actors and the system.

Association: Communication between an actor and a use case; Represented by a solid line.

Page 33: Unit  3(advanced state modeling & interaction meodelling)

Actors

Could be human beings, other systems, timers and clocks or hardware devices.

Actors that stimulate the system and are the initiators of events are called primary actors (active)Actors that only receive stimuli from the system are called secondary actors (passive)

Page 34: Unit  3(advanced state modeling & interaction meodelling)

Actors

Who/what will be interested in the system?

Who/what will want to change the data in the system?

Who/what will want to interface with the system?

Who/what will want information from the system?

Page 35: Unit  3(advanced state modeling & interaction meodelling)

1. Avoid showing communication between actors.

2. Actors should be named as singular. i.e student and NOT students. NO names should be used – i.e John, Sam, etc.

Page 36: Unit  3(advanced state modeling & interaction meodelling)
Page 37: Unit  3(advanced state modeling & interaction meodelling)

1. Start by identifying the actors of the system

2. Define the goals of the system and how they can be achieved using the systems’ actors

3. Illustrate these goals and actors actions using use-case diagram(s)

37

Page 38: Unit  3(advanced state modeling & interaction meodelling)

A use case describes a sequence of actions a system performs to yield an observable result or value to a particular actor

Naming convention = verb + noun (or) verb + noun-phrase, ◦ e.g. withdraw cash

A good use case should:◦ Describe a sequence of transactions performed by a system that

produces a measurable result (goal) for a particular actor◦ Describe the behavior expected of a system from a user's

perspective◦ Enable the system analyst to understand and model a system from

a high-level business viewpoint◦ Represent the interfaces that a system makes visible to the

external entities and the interrelationships between the actors and the system

38

Page 39: Unit  3(advanced state modeling & interaction meodelling)

Use case is a particular activity a user can do on the system.

Is represented by an ellipse.

Following are two use cases for a library system.

39

ReserveBorrow

Page 40: Unit  3(advanced state modeling & interaction meodelling)
Page 41: Unit  3(advanced state modeling & interaction meodelling)

• What are the tasks of each actor?• Will any actor create, store, change, remove, or read

the information?• Will any actor need to inform the system about the

sudden, external changes?• Does any actor need to informed about certain

occurrences in the system?• What use cases will support and maintain the system?• Can all functional requirements be performed by the

use cases?

Page 42: Unit  3(advanced state modeling & interaction meodelling)

Construct Description Notation

Use-case A sequence of transactions performed by a system that produces

a measurable result for a particular actor

Actor A coherent set of roles that users playwhen interacting with these use cases

System Boundary

The boundary between the physical system and the actors who interact with the physical system

42

Page 43: Unit  3(advanced state modeling & interaction meodelling)
Page 44: Unit  3(advanced state modeling & interaction meodelling)
Page 45: Unit  3(advanced state modeling & interaction meodelling)

• Functionality provided by the system• Consist of a series of steps which collectively add

value to the user of the system• Examples

– Issue a book to a member– Receive a book back from a member– Query the current location of a book– Maintain member’s information– Maintain book’s information

Page 46: Unit  3(advanced state modeling & interaction meodelling)
Page 47: Unit  3(advanced state modeling & interaction meodelling)

47

Actor

Association System boundary

Use-case

System name

Page 48: Unit  3(advanced state modeling & interaction meodelling)

48A Library System.

client employee

supervisor

library system

borrow

reserve

Order title

Fine payment

Page 49: Unit  3(advanced state modeling & interaction meodelling)

49

Teacher

Student

Printing administrator

Grade system

Record grades

View grades

DistributeReport cards

Create report cards

Page 50: Unit  3(advanced state modeling & interaction meodelling)
Page 51: Unit  3(advanced state modeling & interaction meodelling)
Page 52: Unit  3(advanced state modeling & interaction meodelling)

Extend: a dotted line labeled <<extend>> with an arrow toward the base case. The extending use case may add behavior to the base use case. The base class declares “extension points”.

<<extend>>

Include: a dotted line labeled <<include>> beginning at base use case and ending with an arrows pointing to the include use case. The include relationship occurs when a chunk of behavior is similar across more than one use case. Use “include” in stead of copying the description of that behavior.

<<include>>

Page 53: Unit  3(advanced state modeling & interaction meodelling)

The base use case explicitly incorporates the behavior of another use case at a location specified in the base.

The included use case never stands alone. It only occurs as a part of some larger base that includes it.

ניתוח מערכות מידע 53

base included<<include>>

Page 54: Unit  3(advanced state modeling & interaction meodelling)

Enables to avoid describing the same flow of events several times by putting the common behavior in a use case of its own.

ניתוח מערכות מידע 54

updatinggrades

outputgenerating

verifyingstudent id

<<include>>

<<include>>

Page 55: Unit  3(advanced state modeling & interaction meodelling)
Page 56: Unit  3(advanced state modeling & interaction meodelling)

Include relationships are used when two or more use cases share some common portion in a flow of events

This common portion is then grouped and extracted to form an inclusion use case for sharing among two or more use cases

Most use cases in the ATM system example, such as Withdraw Money, Deposit Money or Check Balance, share the inclusion use-case Login Account

56

Page 57: Unit  3(advanced state modeling & interaction meodelling)

57

Login Account

(Included use case)

Withdraw Money

(Base use case)

Page 58: Unit  3(advanced state modeling & interaction meodelling)

58

Page 59: Unit  3(advanced state modeling & interaction meodelling)

The base use case implicitly incorporates the behavior of another use case at certain points called extension points.

The base use case may stand alone, but under certain conditions its behavior may be extended by the behavior of another use case.

ניתוח מערכות מידע 59

base extending<<extend>>

Page 60: Unit  3(advanced state modeling & interaction meodelling)

In UML modeling, you can use an extend relationship to specify that one use case (extension) extends the behavior of another use case (base)

This type of relationship reveals details about a system or application that are typically hidden in a use case

60

Page 61: Unit  3(advanced state modeling & interaction meodelling)

61

Process Excess Amount (Extending use case)

Withdraw Money (Base use case)

If condit ional guard is true, extending f low is executed

Page 62: Unit  3(advanced state modeling & interaction meodelling)

62

Page 63: Unit  3(advanced state modeling & interaction meodelling)

Slide 2 (of 48)

Page 64: Unit  3(advanced state modeling & interaction meodelling)

Figure 16.12

Page 65: Unit  3(advanced state modeling & interaction meodelling)

Generalization.

ניתוח מערכות מידע 65

student

non-graduatestudent

graduatestudent

Page 66: Unit  3(advanced state modeling & interaction meodelling)

Construct Description Notat ion

Associat ion The participation of an actor in a use case, i.e. an instance of an actor and instances of a use case communicating with each other

Generalization A taxonomic relationship between a general use case and a more specific use case. The arrow head points to the general use case

Extend A relationship between an extension use case and a base use case, specifying how the behavior of the extension use case can beinserted into the behavior defined for the base use case. The arrow head points to the base use case

66

Page 67: Unit  3(advanced state modeling & interaction meodelling)

Construct Description Notation

Include A relationship between a base use case and an inclusion use case, specifying how the behavior for the inclusion use case is inserted into the behavior defined for the base use case. The arrow head points to theinclusion use case

67

Page 68: Unit  3(advanced state modeling & interaction meodelling)

Both Make Appointment and Request Medication include Check Patient Record as a subtask (include)

The extension point is written inside the base case Pay bill; the extending class Defer payment adds the behavior of this extension point. (extend)

Pay Bill is a parent use case and Bill Insurance is the child use case. (generalization)

(TogetherSoft, Inc)

Page 69: Unit  3(advanced state modeling & interaction meodelling)
Page 70: Unit  3(advanced state modeling & interaction meodelling)
Page 71: Unit  3(advanced state modeling & interaction meodelling)
Page 72: Unit  3(advanced state modeling & interaction meodelling)
Page 73: Unit  3(advanced state modeling & interaction meodelling)

Each use case may include all or part of the following:

Title or Reference Name - meaningful name of the UC Author/Date - the author and creation date Modification/Date - last modification and its date Purpose - specifies the goal to be achieved Overview - short description of the processes Cross References - requirements references Actors - agents participating Pre Conditions - must be true to allow execution Post Conditions - will be set when completes

normally Normal flow of events - regular flow of activities Alternative flow of events - other flow of activities Exceptional flow of events - unusual situations Implementation issues - foreseen implementation

problems

ע יד

מת

כוער

מח

תוני

73

Page 74: Unit  3(advanced state modeling & interaction meodelling)
Page 75: Unit  3(advanced state modeling & interaction meodelling)

The sequence model elaborates the themes of use cases.

Two kinds of sequences models

Scenarios

Sequence diagram

Page 76: Unit  3(advanced state modeling & interaction meodelling)

A scenario is a sequence of events that occurs during one particular execution of a system.

For example:John logs in, transmits a message from John to the

broker system.

Page 77: Unit  3(advanced state modeling & interaction meodelling)
Page 78: Unit  3(advanced state modeling & interaction meodelling)
Page 79: Unit  3(advanced state modeling & interaction meodelling)

A sequence diagram shows the participants in an interaction and the sequence of messages among them.

A sequence diagram shows the interaction of a system with its actors to perform all or part of a use case.

Each use case requires one or more sequence diagrams to describe its behaviour.

Page 80: Unit  3(advanced state modeling & interaction meodelling)

Sequence diagrams, also known as event diagrams or event scenarios, illustrate how processes interact with each other by showing calls between different objects in a sequence.

These diagrams have two dimensions:

The vertical lines show the sequence of messages and calls in chronological order

Horizontal elements show object instances where the messages are relayed.

Page 81: Unit  3(advanced state modeling & interaction meodelling)

Components Of A Sequence Diagram

Sequence Diagram

MessagesActive objects

Activation Box LifelineControl Information

Page 82: Unit  3(advanced state modeling & interaction meodelling)

Active Objects:◦ Any objects that play a role in the system◦ Can be any object or class that is valid within the system◦ Can be an Actor that is external to the system and derives benefits

from the systemMessages:◦ Used to illustrate communication between different active

objects.◦ Used when an object needs

to activate a process of a different object to give information to another object

Page 83: Unit  3(advanced state modeling & interaction meodelling)

Lifeline◦ Denotes the life of actors/objects over time during a sequence

Focus of control (activation box)◦ Means the object is active and using resources during that time

period

Control information◦ Shows the control flow in the system◦ Creation and destruction of an object through <<create>> and

<<destroy>>

Page 84: Unit  3(advanced state modeling & interaction meodelling)

Squares with object type, optionally preceded by object name and colon◦ write object's name if it clarifies the diagram◦ object's "life line" represented by dashed vert. line

84

Page 85: Unit  3(advanced state modeling & interaction meodelling)

Objects are displayed at the top of the diagramThe vertical dimension represents timeEach object has a dashed line – lifeline – extending below it – to indicate the period of time during which objects playing that role actually exist

Object Name

Page 86: Unit  3(advanced state modeling & interaction meodelling)

Creation: arrow with 'new' written above it

Deletion: an X at bottom of object's lifeline

86

Page 87: Unit  3(advanced state modeling & interaction meodelling)

The messages in an interaction are drawn from top to bottom, in the order that they are sent. Messages are shown as arrows pointing from the lifeline of the role sending the message to the lifeline of the receiver. When a message is sent, control passes from the sender of the message to the receiver.

Object Name Object Name

message

Page 88: Unit  3(advanced state modeling & interaction meodelling)

Return of control is shown using dashed arrow returning to the calling object.

Object Name Object Name

message

Page 89: Unit  3(advanced state modeling & interaction meodelling)

Message (method call) indicated by horizontal arrow to other object◦ write message name and arguments above arrow

89

Page 90: Unit  3(advanced state modeling & interaction meodelling)

Activations - show when a method is active – either executing or waiting for a subroutine to return

◦ Either that object is running its code, or it is on the stack waiting for another object's method to finish

90

Page 91: Unit  3(advanced state modeling & interaction meodelling)

• Period of time during which an object is processing a message, Shown on a lifeline as a narrow rectangle whose top is connected to a message.

• When an object finishes processing a message, control returns to the sender of the message

Object Name Object Name

message

Page 92: Unit  3(advanced state modeling & interaction meodelling)

a : Assembly part : CatalogEntry

getNumber()

: Client

count(part)

return number

Lifeline

Activation(optional)

Messages

control returns to the sender of the message (optional)

Page 93: Unit  3(advanced state modeling & interaction meodelling)
Page 94: Unit  3(advanced state modeling & interaction meodelling)

Caller Phone Recipient

Picks up

Dial tone

Dial

Ring notification Ring

Picks up

Hello

Page 95: Unit  3(advanced state modeling & interaction meodelling)
Page 96: Unit  3(advanced state modeling & interaction meodelling)
Page 97: Unit  3(advanced state modeling & interaction meodelling)

Activity diagrams and use cases are logical model which describe the business domain’s activities without suggesting how they are conduct.

A diagram that emphasizes the flow of control from activity to activity in an object.

Similar to the traditional program flowchart.

Used to provide detail for complex algorithms.

Primary activities and the relationships among the activities in a process.

Page 98: Unit  3(advanced state modeling & interaction meodelling)

Purpose

◦ to model a task (for example in business modelling)

◦ to describe a function of a system represented by a use case

◦ to describe the logic of an operation

◦ to model the activities that make up the life cycle in the Unified Process

Page 99: Unit  3(advanced state modeling & interaction meodelling)

Initial Node Control Flow Action or Activity Object Flow Branch

Merge

Fork Join

Final Node

09/29/14 99

Page 100: Unit  3(advanced state modeling & interaction meodelling)

This represents the start of the flow of an activity diagram.

An activity diagram contains a single start node.

The name of the initial node is entered on the node. It takes the form of an adjective.

09/29/14 100

Page 101: Unit  3(advanced state modeling & interaction meodelling)

A control flow connects any combination of: ◦ activities ◦ branches◦ merges◦ forks◦ joins

A control flow has direction, which is indicated by the arrow head – you may only traverse the control flow in the direction of the arrow.

A control flow may not enter an initial state. A control flow may not exit a final node. A control flow is the representation of an occurrence of an event. The name of the event is entered on the control flow. It takes the

form of something has been done, noun-verb(past-tense)

09/29/14 101

Page 102: Unit  3(advanced state modeling & interaction meodelling)

The activity represents the actions that occur as a result of an incoming event from a control flow.

The name of the activity is entered on the activity and takes the form of something being done, present tense verb-noun

09/29/14 102

Page 103: Unit  3(advanced state modeling & interaction meodelling)

The branch is used to show alternative paths in the activity diagram.

Label the decision node with a question(?). Do not label the merge, (unless you have a good

reason to). One control flow enters the decision node and two

or more alternative control flows exit the decision node.

Only one of the paths may be transitioned as the result of an event occurring.

Each exiting control flow contains the condition under which it is taken (called a guard), dependent upon the answer to the question. These guards must be mutually exclusive.

09/29/14 103

Page 104: Unit  3(advanced state modeling & interaction meodelling)

The guards on exiting control flows must cover all possible outcomes of the question being asked by the branch.◦ The simplest way to ensure all possible outcomes are covered is

to phrase the branch question such that the only possible answers are ‘Yes’ or ‘No’. Note, this can add extra branches to the diagram.

Two or more control flows enter the merge node and one control flow exits.

Page 105: Unit  3(advanced state modeling & interaction meodelling)

09/29/14 105

The fork may be represented by vertical or horizontal bars.

The fork represents that the flow through the diagram has split into 2 paths that are running in parallel (multitasking).

The fork has a single control flow on entry and several control flows exiting.

Use a fork when there is no requirement on the order of activities in a flow. ◦ For example, the Dematerializer receives an

event that the door is shut. It now suspends the cargo and creates a vacuum, but these actions may be performed in parallel, so we model them with a fork.

Page 106: Unit  3(advanced state modeling & interaction meodelling)

09/29/14 106

For every fork there should be a join (if not your activity diagram is broken).

The join may be represented by vertical or horizontal bars.

A join simply shows that when the parallel activities have finished that they then come back to join a single flow again.

The join has several control flows entering and a single control flow on exit.

The exiting control flow cannot be executed until every incoming control flow has completed.

There is no need to label the fork or join.

Page 107: Unit  3(advanced state modeling & interaction meodelling)

The final node represents the termination of the activity diagram.

There may be several termination states in a single diagram.

Label the final node with an adjective.

09/29/14 107

Page 108: Unit  3(advanced state modeling & interaction meodelling)
Page 109: Unit  3(advanced state modeling & interaction meodelling)

[Condition]

For each X:

START POINT

END POINT

STEP

TRANSITION

DECISION POINT

GUARD

REPEATED STEPS

PARALLEL STEPS

Page 110: Unit  3(advanced state modeling & interaction meodelling)
Page 111: Unit  3(advanced state modeling & interaction meodelling)
Page 112: Unit  3(advanced state modeling & interaction meodelling)
Page 113: Unit  3(advanced state modeling & interaction meodelling)

START POINT

Page 114: Unit  3(advanced state modeling & interaction meodelling)

The Start Point represents the EVENT that

triggers the use case.

Page 115: Unit  3(advanced state modeling & interaction meodelling)

END POINT

Actor elects to Add Customer

Page 116: Unit  3(advanced state modeling & interaction meodelling)

Actor elects to Add Customer

Label the End Point to EXPLICITLY confirm

that the intent of the use case has been achieved.

Page 117: Unit  3(advanced state modeling & interaction meodelling)

Actor elects to Add Customer

Customer added

Page 118: Unit  3(advanced state modeling & interaction meodelling)

Actor elects to Add Customer

Customer added

This makes it clear to the reader that the use case

is complete and that nothing further is needed

in order to fulfil the intent.

Page 119: Unit  3(advanced state modeling & interaction meodelling)

Actor elects to Add Customer

End of process

Page 120: Unit  3(advanced state modeling & interaction meodelling)

To reach the End Point…

Page 121: Unit  3(advanced state modeling & interaction meodelling)

… you need to model STEPS.

Page 122: Unit  3(advanced state modeling & interaction meodelling)

Link the steps with

TRANSITIONS.

Page 123: Unit  3(advanced state modeling & interaction meodelling)
Page 124: Unit  3(advanced state modeling & interaction meodelling)

Transitions use arrow heads to show the

direction of process flow.

Page 125: Unit  3(advanced state modeling & interaction meodelling)

I like to put a note against any step that achieves the goal of

the use case.

Goal X achieved

Page 126: Unit  3(advanced state modeling & interaction meodelling)

… because it might not be the last step.

Goal X achieved

Page 127: Unit  3(advanced state modeling & interaction meodelling)

Often in a use case the System has to make a decision

based on business rules...

Page 128: Unit  3(advanced state modeling & interaction meodelling)

The actual decision takes place within a

STEP

Page 129: Unit  3(advanced state modeling & interaction meodelling)

System determines

whether X or Y The actual decision takes place within a

STEP

Page 130: Unit  3(advanced state modeling & interaction meodelling)

System determines

whether X or Y A DECISION POINT is then used to help the reader navigate

the diagram.

Page 131: Unit  3(advanced state modeling & interaction meodelling)

DECISION POINT

Page 132: Unit  3(advanced state modeling & interaction meodelling)

Decision Points contain text which

describes the nature of the decision to be

made.

Page 133: Unit  3(advanced state modeling & interaction meodelling)

So was it X or Y?

Page 134: Unit  3(advanced state modeling & interaction meodelling)

Decision points allow the flow to branch

away from the Primary Path.

Page 135: Unit  3(advanced state modeling & interaction meodelling)

[Condition 2]

[Condition 1]

Transitions coming out of

Decision Points must have a

GUARD.

Page 136: Unit  3(advanced state modeling & interaction meodelling)

[IT WAS “Y”]

[IT WAS “X”]

A Guard needs to explicitly describe a

condition which must be true in order to proceed down that

path.

Page 137: Unit  3(advanced state modeling & interaction meodelling)

[Condition 2]

[Condition 1]

If the flow rejoins the

Primary Path, it is known as an Alternate Path.

Page 138: Unit  3(advanced state modeling & interaction meodelling)

[Condition 2][Condition 1]

You can show how paths rejoin by

using a MERGE POINT.

Page 139: Unit  3(advanced state modeling & interaction meodelling)

[Condition 2][Condition 1]

You can show how paths rejoin by

using a MERGE POINT.

Page 140: Unit  3(advanced state modeling & interaction meodelling)

[Condition 2][Condition 1]

I prefer to model merging paths like this.