Module 8 - Sequence Diagram Part 2 Flashcards
Constraint in sequence diagrams
1) all constraints appear in _________
2) all constraints constraint 1 and at most 2 event occurrences on lifelines
3) all constraints specify assertions that must be true for a execution to be valid
curly braces
time constraints are anchored to a single event occurrence that points to the event occurrence that is being constraint.
This example shows the time constraint is anchored to the ___________________
message sent part of fireThruster()
time constraint conveys a specific time or a window of time for a single ____occurance to occur … never multiple event occurrences .
event
what does this time constraint “executionTime” mean ?
Note : the time constraint is placed in the sending portion of the Firetrhusters message
it is conveying that Firethruster message is sent at time = executionTime.
what design decision is being conveyed with this time constraint ?
this conveys a window of time for that FireThruster message to be sent between 2am and 2:05 am GMT.
a time constraint does not convey the idea of _______
waiting
. it does not wait for a time to occur like an accept event actions where a ________ arrivessignal event arrives.
Duration constraint conveys the valid duration of time between a pair of _________ occurrences. the design is conveying that the firethruster message should execute anywhere 2min to 5 min long
event
a state invarient specifies a bool condition that must be true the moment when the contrained event occurs in order for the ____ to be valid
trace
the state invariant focuses on a single event occurrence being ___________
constrained.
current orbit radius = ordered orbit radius when true
4 common kinds of combined fragments in a sequence diagram
- opt - optional
- alt - alternative
- loop
- par - parallel ( concurrency )
what do they have in common ?
1. they represent
2. they have a rectangle in a seq diagram
3. they have an interaction operator ( keyword like opt , par … )
4. they have at least one interaction operand
5. each interaction operand can optionally have a guard.
what is a combined fragment in a seq diagram ?
a mechanism that allows you to add control logic to an interaction
the opt ( optional ) combined fragment rep
guard expression placement in the interaction operand
you should place the guard on top of the lifeline that has the first event occurrence on that lifeline.
language law: opt can only have one region in the combined fragment
its all or nothing decision logic.
when does the guard expression get evaluation in an opt combined fragment ?
the last event occurrence get executed
alt represents decisions logic with multiple outcomes. it must have multiple interaction operands to follow model law. The guard that is true represents which operation fires.
the moment the last event occurs right before the fc lifeline received the sensorStatus message in this case all the guards get evaluated
the guard that is true evaluates .