Sequence - Orange168/NotesOnReading GitHub Wiki

###Sequence A case scenario

case scenario ####Name and type

  • used stereotypes for objects

used stereotypes for objects

####Messages

  • Self Message A self message can represent a recursive call of an operation, or one method calling another method belonging to the same object.

  • Lost and Found Messages

  • Duration and Time Constraints

  • Lifeline Start and End

LifeLine Start and End

####Combined Fragments

  1. Alternative fragment (denoted “alt”) models if…then…else constructs.
  1. Option fragment (denoted “opt”) models switch constructs.
  2. Break fragment models an alternative sequence of events that is processed instead of the whole of the rest of the diagram.
  3. Parallel fragment (denoted “par”) models concurrent processing.
  4. Weak sequencing fragment (denoted “seq”) encloses a number of sequences for which all the messages must be processed in a preceding segment before the following segment can start, but which does not impose any sequencing within a segment on messages that don’t share a lifeline.
  5. Strict sequencing fragment (denoted “strict”) encloses a series of messages which must be processed in the given order.
  6. Negative fragment (denoted “neg”) encloses an invalid series of messages.
  7. Critical fragment encloses a critical section.
  8. Ignore fragment declares a message or message to be of no interest if it appears in the current context.
  9. Consider fragment is in effect the opposite of the ignore fragment: any message not included in the consider fragment should be ignored.
  10. Assertion fragment (denoted “assert”) designates that any sequence not shown as an operand of the assertion is invalid.
  11. Loop fragment encloses a series of messages which are repeated.

####Condition #####Basic

#####Repeated

A more common use of repetition is sending the same message to different elements in a collection. In such a scenario, the receiver of the repeated message is a multiobject and the guard indicates the condition that controls the repetition.

Multiple message are sent int the same iteraction

If the receiver of a repeated message is a collection, the condition is generally used to specify a filter for the elements.

  1. a local variable 'r' was introduced to clarify that it is the result of getBounds that is added.
  1. the loop condition is used as a filter on the elements of the figures collection.

####Gate A gate is a connection point for connecting a message inside a fragment with a message outside a fragment.

UML 2 Sequence Diagram[UML 2 Sequence Diagram] [UML 2 Sequence Diagram]: http://www.sparxsystems.com/resources/uml2_tutorial/uml2_sequencediagram.html "UML 2 Sequence Diagram" [A Quick Introduction to UML Sequence Diagrams][A Quick Introduction to UML Sequence Diagrams] [A Quick Introduction to UML Sequence Diagrams]: http://www.tracemodeler.com/articles/a_quick_introduction_to_uml_sequence_diagrams/ "A Quick Introduction to UML Sequence Diagrams"