<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://training-course-material.com/index.php?action=history&amp;feed=atom&amp;title=OCUP2I_07_Interactions</id>
	<title>OCUP2I 07 Interactions - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://training-course-material.com/index.php?action=history&amp;feed=atom&amp;title=OCUP2I_07_Interactions"/>
	<link rel="alternate" type="text/html" href="https://training-course-material.com/index.php?title=OCUP2I_07_Interactions&amp;action=history"/>
	<updated>2026-04-21T08:51:12Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://training-course-material.com/index.php?title=OCUP2I_07_Interactions&amp;diff=42728&amp;oldid=prev</id>
		<title>Filip Stachecki: /* seq⌘ */</title>
		<link rel="alternate" type="text/html" href="https://training-course-material.com/index.php?title=OCUP2I_07_Interactions&amp;diff=42728&amp;oldid=prev"/>
		<updated>2016-09-20T10:34:24Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;seq⌘&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:Private]]&lt;br /&gt;
[[Category:OCUP2]]&lt;br /&gt;
&lt;br /&gt;
==Module 7. Interactions⌘==&lt;br /&gt;
===References⌘===&lt;br /&gt;
UML 2.5 specification:&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
** Intervals&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Chapter 12: Packages&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
** Packages&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Chapter 20: Information Flows&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
===Sequence Diagram⌘===&lt;br /&gt;
[[File:SimpleSequenceDiagram.png]]&lt;br /&gt;
* Participants are represented by a rectangle and a dashed line (lifeline)&lt;br /&gt;
* Messages are represented by arrows between lifelines&lt;br /&gt;
* Time runs from top to bottom&lt;br /&gt;
* The entire diagram represents one interaction&lt;br /&gt;
&lt;br /&gt;
====Event Occurrences⌘====&lt;br /&gt;
[[File:SequenceEventOcc.png]]&lt;br /&gt;
* send event is denoted by an exclamation mark (&amp;#039;&amp;#039;&amp;#039;!p&amp;#039;&amp;#039;&amp;#039;)&lt;br /&gt;
* receive event is denoted by question mark (&amp;#039;&amp;#039;&amp;#039;?p&amp;#039;&amp;#039;&amp;#039;)&lt;br /&gt;
* A valid sequence for the interaction: &amp;#039;&amp;#039;&amp;#039;&amp;lt; !p, ?p, !q, ?q &amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;It&amp;#039;s not the only valid sequence!&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
====Event Occurrences valid trace⌘====&lt;br /&gt;
[[File:SequenceEventOcc2.png]]&lt;br /&gt;
&lt;br /&gt;
====Event Occurrences Rule⌘====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Send&amp;#039;&amp;#039;&amp;#039; event &amp;#039;&amp;#039;&amp;#039;before receive &amp;#039;&amp;#039;&amp;#039;event&lt;br /&gt;
* The order of events along one lifeline is &amp;#039;&amp;#039;&amp;#039;relevant&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
* The position of one event relative to an event on another lifeline is &amp;#039;&amp;#039;&amp;#039;insignificant&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
===Fragments⌘===&lt;br /&gt;
[[File:ClipCapIt-160614-113008.PNG]]&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Combined Fragment&amp;#039;&amp;#039;&amp;#039; is an interaction fragment which defines a combination (expression) of interaction fragments.&lt;br /&gt;
** &amp;#039;&amp;#039;&amp;#039;Interaction Operator&amp;#039;&amp;#039;&amp;#039; specifies the meaning of Combined Fragment&lt;br /&gt;
** &amp;#039;&amp;#039;&amp;#039;Interaction Operands&amp;#039;&amp;#039;&amp;#039; are separated by a dashed horizontal line. The Interaction Operands together make up the framed Combined Fragment&lt;br /&gt;
** &amp;#039;&amp;#039;&amp;#039;Interaction Constraint&amp;#039;&amp;#039;&amp;#039; is shown in square brackets &amp;#039;&amp;#039;&amp;#039;covering the lifeline where the first event occurrence will occur&amp;#039;&amp;#039;&amp;#039;, positioned above that event&lt;br /&gt;
&amp;lt;source lang=bnf&amp;gt; &amp;lt;interactionconstraint&amp;gt; ::= ‘[‘ (&amp;lt;Boolean-expression&amp;gt; | ‘else‘) ‘]’ &amp;lt;/source&amp;gt;&lt;br /&gt;
====Interaction Operator Kind⌘====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table border=&amp;quot;1px&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;tr bgcolor=&amp;quot;#E3E3E3&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;&amp;#039;&amp;#039;&amp;#039;Only one operand fragments&amp;#039;&amp;#039;&amp;#039;&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;#039;&amp;#039;&amp;#039;One or more operands fragments&amp;#039;&amp;#039;&amp;#039;&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;/tr&amp;gt;&lt;br /&gt;
		&amp;lt;tr&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;#039;&amp;#039;&amp;#039;opt&amp;#039;&amp;#039;&amp;#039; - option&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;#039;&amp;#039;&amp;#039;neg&amp;#039;&amp;#039;&amp;#039; - negative&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;#039;&amp;#039;&amp;#039;alt&amp;#039;&amp;#039;&amp;#039; - alternatives&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;/tr&amp;gt;&lt;br /&gt;
		&amp;lt;tr&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;#039;&amp;#039;&amp;#039;break&amp;#039;&amp;#039;&amp;#039;&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;#039;&amp;#039;&amp;#039;assert&amp;#039;&amp;#039;&amp;#039; - assertion&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;#039;&amp;#039;&amp;#039;par&amp;#039;&amp;#039;&amp;#039; - parallel&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;/tr&amp;gt;&lt;br /&gt;
		&amp;lt;tr&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;#039;&amp;#039;&amp;#039;loop&amp;#039;&amp;#039;&amp;#039;- iteration&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;#039;&amp;#039;&amp;#039;consider&amp;#039;&amp;#039;&amp;#039;&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;#039;&amp;#039;&amp;#039;strict&amp;#039;&amp;#039;&amp;#039; - strict sequencing&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;/tr&amp;gt;&lt;br /&gt;
		&amp;lt;tr&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;#039;&amp;#039;&amp;#039;critical&amp;#039;&amp;#039;&amp;#039;&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;#039;&amp;#039;&amp;#039;ignore&amp;#039;&amp;#039;&amp;#039;&amp;lt;/td&amp;gt;&lt;br /&gt;
			&amp;lt;td&amp;gt;&amp;#039;&amp;#039;&amp;#039;seq&amp;#039;&amp;#039;&amp;#039; - weak sequencing&amp;lt;/td&amp;gt;&lt;br /&gt;
		&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====alt⌘====&lt;br /&gt;
[[File:ClipCapIt-160915-095849.PNG]]&lt;br /&gt;
* The interaction Operator &amp;#039;&amp;#039;&amp;#039;alt&amp;#039;&amp;#039;&amp;#039; designates that the Combined Fragment represents a choice of behavior. &lt;br /&gt;
* At most one of the operands will be chosen.&lt;br /&gt;
&lt;br /&gt;
====opt⌘====&lt;br /&gt;
[[File:ClipCapIt-160915-100310.PNG]]&lt;br /&gt;
* The interaction Operator opt designates that the Combined Fragment represents a choice of behavior where either the (sole) operand happens or nothing happens.&lt;br /&gt;
&lt;br /&gt;
====break⌘====&lt;br /&gt;
[[File:ClipCapIt-160915-100509.PNG]]&lt;br /&gt;
* The interaction Operator &amp;#039;&amp;#039;&amp;#039;break&amp;#039;&amp;#039;&amp;#039; designates that the Combined Fragment represents a breaking scenario in the sense that the operand is a scenario that is performed instead of the remainder of the enclosing &amp;#039;&amp;#039;&amp;#039;Interaction Fragment&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
* A Combined Fragment with interaction Operator break should cover all Lifelines of the enclosing Interaction Fragment.&lt;br /&gt;
&lt;br /&gt;
====loop⌘====&lt;br /&gt;
[[File:ClipCapIt-160915-101101.PNG]]&lt;br /&gt;
&amp;lt;source lang=bnf&amp;gt;&lt;br /&gt;
 &amp;lt;loop-operator&amp;gt;::==loop[‘(‘ &amp;lt;minint&amp;gt; [‘,’ &amp;lt;maxint&amp;gt; ] ‘)’]&lt;br /&gt;
 &amp;lt;minint&amp;gt; ::= non-negative natural&lt;br /&gt;
 &amp;lt;maxint&amp;gt; ::= non-negative natural greater than or equal to &amp;lt;minint&amp;gt; | ‘*’ as unlimited&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* If only &amp;lt;minint&amp;gt; is present, this means that &amp;lt;minint&amp;gt; = &amp;lt;maxint&amp;gt; = &amp;lt;integer&amp;gt;.&lt;br /&gt;
* If only loop, then this means a loop with unlimited upper bound and with 0 as lower bound.&lt;br /&gt;
=====loop example⌘=====&lt;br /&gt;
[[File:ClipCapIt-160915-101509.PNG]]&lt;br /&gt;
&lt;br /&gt;
====par⌘====&lt;br /&gt;
[[File:ClipCapIt-160915-115956.PNG]]&lt;br /&gt;
* The interaction Operator &amp;#039;&amp;#039;&amp;#039;par&amp;#039;&amp;#039;&amp;#039; designates that the Combined Fragment represents a parallel merge between the behaviors of the operands. &lt;br /&gt;
* The OccurrenceSpecifications of the different operands can be &amp;#039;&amp;#039;&amp;#039;interleaved&amp;#039;&amp;#039;&amp;#039; in any way as long as the ordering imposed by each operand as such is &amp;#039;&amp;#039;&amp;#039;preserved&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
====strict⌘====&lt;br /&gt;
* The interaction Operator &amp;#039;&amp;#039;&amp;#039;strict&amp;#039;&amp;#039;&amp;#039; designates that the Combined Fragment represents a strict sequencing between the behaviors of the operands.&lt;br /&gt;
&lt;br /&gt;
====seq⌘====&lt;br /&gt;
* The interaction Operator &amp;#039;&amp;#039;&amp;#039;seq&amp;#039;&amp;#039;&amp;#039; designates that the Combined Fragment represents a weak sequencing between the behaviors of the operands.&lt;br /&gt;
* Weak sequencing reduces to a parallel merge when the operands are on disjunct sets of participants. &lt;br /&gt;
* Weak sequencing reduces to strict sequencing when the operands work on only one participant.&lt;br /&gt;
&lt;br /&gt;
===Interaction Use⌘===&lt;br /&gt;
* Interaction Use is an interaction fragment which allows to use another interaction.&lt;br /&gt;
* It is shown as a Combined Fragment symbol where the operator is called ref.&lt;br /&gt;
[[File:ClipCapIt-160614-105446.PNG]]&lt;br /&gt;
&lt;br /&gt;
Interaction Use referring the Interaction EstablishAccess with (input) argument “Illegal PIN.” Within the optional CombinedFragment there is another Interaction Use without arguments referring OpenDoor&lt;br /&gt;
&lt;br /&gt;
===Part Decomposition⌘===&lt;br /&gt;
[[File:ClipCapIt-160614-152939.PNG]]&lt;br /&gt;
* A &amp;#039;&amp;#039;&amp;#039;Part Decomposition&amp;#039;&amp;#039;&amp;#039; is an Interaction Use that specifies fragmentation of a lifeline within one Interaction by an Interaction.&lt;br /&gt;
* The messages that go into (or go out from) the decomposed lifeline are interpreted as actual gates that are matched by corresponding formal gates on the decomposition.&lt;br /&gt;
&lt;br /&gt;
===Gate⌘===&lt;br /&gt;
&lt;br /&gt;
===State Invariant⌘===&lt;br /&gt;
[[File:StateInvariant.png]]&lt;br /&gt;
* A state invariant is an interaction fragment which represents a runtime constraint on the participants of the interaction. &lt;br /&gt;
* It may be used to specify different kinds of constraints, such as values of attributes or variables, internal or external states, etc.&lt;br /&gt;
* The Constraint is evaluated immediately prior to the execution of the next Occurrence Specification.&lt;br /&gt;
* If the Constraint is true, the trace is a valid trace; if the Constraint is false, the trace is an invalid trace.&lt;br /&gt;
* Notation:&lt;br /&gt;
** as text in curly brackets on the lifeline&lt;br /&gt;
** as state symbol represents the equivalent of a constraint that checks the state of the object represented by the Lifeline&lt;br /&gt;
** as a Note associated with an OccurrenceSpecification&lt;br /&gt;
====State Invariant example⌘====&lt;br /&gt;
[[File:ClipCapIt-160613-161321.PNG]]&lt;br /&gt;
====Unexpected trigger reception⌘====&lt;br /&gt;
* The interpretation of the reception of an Event occurrence that does not match a valid trigger for the current State, state invariant, or pre-condition &amp;#039;&amp;#039;&amp;#039;is not defined&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
* It can be ignored, rejected, or deferred; an exception can be raised; or the application can stop on an error.&lt;br /&gt;
&lt;br /&gt;
===Communication Diagram⌘===&lt;br /&gt;
[[File:CommunicationDiagram.png]]&lt;br /&gt;
* Communication Diagrams focus on the interaction between Lifelines where the &amp;#039;&amp;#039;&amp;#039;architecture of the internal structure and how this corresponds with the message passing is central&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
* The sequencing of Messages is given through a sequence numbering scheme.&lt;br /&gt;
* Communication Diagrams correspond to simple Sequence Diagrams.&lt;br /&gt;
* A Lifeline represents an individual &amp;#039;&amp;#039;&amp;#039;participant&amp;#039;&amp;#039;&amp;#039; in the interaction.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
The Interaction described by a Communication Diagram in Figure 17.26 shows messages m1 and m3 being sent&lt;br /&gt;
concurrently from :r towards two instances of the part s. The sequence numbers show how the other messages are&lt;br /&gt;
sequenced. 1b.1 follows after 1b and 1b.1.1 thereafter etc. 2 follows after 1a and 1b.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
====Message⌘====&lt;br /&gt;
[[File:UMLCommunicationMessage.png]]&lt;br /&gt;
* A message is shown as a line from the sender to the receiver. &lt;br /&gt;
* The send and receive events may both be on the same lifeline. &lt;br /&gt;
* The form of the line or arrowhead reflects properties of the message:&lt;br /&gt;
** [[File:SynchronousMessage.png]] Synchronous message (send message and suspend execution while waiting for response)&lt;br /&gt;
** [[File:AsynchronousMessage.png]] Asynchronous message (send message and proceed immediately without waiting)&lt;br /&gt;
** [[File:ReplyMessage.png]] Reply message (reply to synchronous message)&lt;br /&gt;
====Sequence Expression⌘====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Sequence expression&amp;#039;&amp;#039;&amp;#039; is used to specify an ordering of messages.&lt;br /&gt;
&amp;lt;source lang=bnf&amp;gt;&lt;br /&gt;
 &amp;lt;sequence-expression&amp;gt; ::= &amp;lt;sequence-term&amp;gt; [‘.’ &amp;lt;sequence-term&amp;gt;]* ‘:’ &amp;lt;message-name&amp;gt;&lt;br /&gt;
 &amp;lt;sequence-term&amp;gt; ::= &amp;lt;integer&amp;gt; [&amp;lt;name&amp;gt;] [&amp;lt;recurrence&amp;gt;]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* Examples:&lt;br /&gt;
** 1a:m1&lt;br /&gt;
** 1b.1:m3&lt;br /&gt;
** 1b.1.1.1:m2&lt;br /&gt;
====Sequence Expression rules⌘====&lt;br /&gt;
* The integer represents the sequential order of the Message within the next higher level of procedural calling. &lt;br /&gt;
* Messages that differ in one integer term are sequentially related at that level of nesting. Example: Message 3.1.4 follows Message 3.1.3. &lt;br /&gt;
* The name represents a concurrent thread of control. Messages that differ in the final name are concurrent at that level of nesting. Example: Message 3.1a and Message 3.1b are concurrent.&lt;/div&gt;</summary>
		<author><name>Filip Stachecki</name></author>
	</entry>
</feed>