Sequence - Orange168/NotesOnReading GitHub Wiki
###Sequence A case scenario
####Name and type
- 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
####Combined Fragments
- Alternative fragment (denoted “alt”) models if…then…else constructs.
- Option fragment (denoted “opt”) models switch constructs.
- Break fragment models an alternative sequence of events that is processed instead of the whole of the rest of the diagram.
- Parallel fragment (denoted “par”) models concurrent processing.
- 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.
- Strict sequencing fragment (denoted “strict”) encloses a series of messages which must be processed in the given order.
- Negative fragment (denoted “neg”) encloses an invalid series of messages.
- Critical fragment encloses a critical section.
- Ignore fragment declares a message or message to be of no interest if it appears in the current context.
- Consider fragment is in effect the opposite of the ignore fragment: any message not included in the consider fragment should be ignored.
- Assertion fragment (denoted “assert”) designates that any sequence not shown as an operand of the assertion is invalid.
- 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.
- a local variable 'r' was introduced to clarify that it is the result of getBounds that is added.
- 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"