来源于:EA 中的 Interaction Operators Enterprise Architect User Guide

Operator

Action

alt

Divide up interaction fragments based on Boolean conditions.

opt

Enclose an optional fragment of interaction.

par

Indicate that operands operate in parallel.

loop

Indicate that the operand repeats a number of times, as specified by interaction constraints.

critical

Indicate a sequence that cannot be interrupted by other processing.

neg

Assert that a fragment is invalid, and implies that all other interaction is valid.

assert

Specify the only valid fragment to occur. This operator is often enclosed within a consider or ignore operand.

strict

Indicate that the behaviors of the operands must be processed in strict sequence.

seq

Indicate that the Combined Fragment is weakly sequenced. This means that the ordering within operands is maintained, but the ordering between operands is undefined, so long as an event occurrence of the first operand precedes that of the second operand, if the event occurrences are on the same lifeline.

ignore

Indicate which messages should be ignored during execution, or can appear anywhere in the execution trace.

consider

Specify which messages should be considered in the trace. This is often used to specify the resulting event occurrences with the use of an assert operator.

ref

Provide a reference to another diagram.

The ref fragment is not created using the method described in the Create a Combined Fragment topic. To create a ref fragment, simply drag an existing diagram from the Project Browser onto the current diagram.

Learn more

OMG UML
Specification

The OMG UML specification
(UML Superstructure
Specification, v2.1.1, p. 468-471)
states:

The semantics of a CombinedFragment is
dependent upon the interactionOperator as explained below.

Alternatives

The interactionOperator alt
designates that the CombinedFragment represents a choice of behavior. At most
one of the operands will be chosen. The chosen operand must have an explicit or
implicit guard expression that evaluates to true at this point in the
interaction. An implicit true guard is implied if the operand has no
guard.

The set of traces that defines a choice
is the union of the (guarded) traces of the operands.

An operand guarded by else
designates a guard that is the negation of the disjunction of all other guards
in the enclosing CombinedFragment.

If none of the operands has a guard
that evaluates to true, none of the operands are executed and the remainder of
the enclosing InteractionFragment is executed.

Option

The interactionOperator opt
designates that the CombinedFragment represents a choice of behavior where
either the (sole) operand happens or nothing happens. An option is semantically
equivalent to an alternative CombinedFragment where there is one operand with
non-empty content and the second operand is empty.

Break

The interactionOperator break
designates that the CombinedFragment represents a breaking scenario in the sense
that the operand is a scenario that is performed instead of the remainder of the
enclosing InteractionFragment. A break operator with a
guard is chosen when the guard is true and the rest of the enclosing Interaction
Fragment is ignored. When the guard of the break operand is false,
the break operand is ignored and the rest of the enclosing
InteractionFragment is chosen. The choice between a break operand without a
guard and the rest of the enclosing InteractionFragment is done
non-deterministically.

A CombinedFragment with
interactionOperator break should cover all
Lifelines of the enclosing InteractionFragment.

Parallel

The interactionOperator par
designates that the CombinedFragment represents a parallel merge between the
behaviors of the operands. The OccurrenceSpecifications of the different
operands can be interleaved in any way as long as the ordering imposed by each
operand as such is preserved.

A parallel merge defines a set of
traces that describes all the ways that OccurrenceSpecifications of the operands
may be interleaved without obstructing the order of the OccurrenceSpecifications
within the operand.

Weak Sequencing

The interactionOperator seq
designates that the CombinedFragment represents a weak sequencing between the
behaviors of the operands.

Weak sequencing is defined by the set
of traces with these properties:

1. The ordering of
OccurrenceSpecifications within each of the operands is maintained in the
result.
2. OccurrenceSpecifications on different lifelines from
different operands may come in any order.
3. OccurrenceSpecifications on the same lifeline from
different operands are ordered such that an OccurrenceSpecification of the first
operand comes before that of the second operand.

Thus weak sequencing reduces to a
parallel merge when the operands are on disjunct sets of participants. Weak
sequencing reduces to strict sequencing when the operands work on only one
participant.

Strict Sequencing

The interactionOperator strict
designates that the CombinedFragment represents a strict sequencing between the
behaviors of the operands. The semantics of strict sequencing defines a strict
ordering of the operands on the first level within the CombinedIFragment with
interactionOperator strict. Therefore
OccurrenceSpecifications within contained CombinedFragment will not directly be
compared with other OccurrenceSpecifications of the enclosing
CombinedFragment.

Negative

The interactionOperator neg
designates that the CombinedFragment represents traces that are defined to be
invalid.

The set of traces that defined a
CombinedFragment with interactionOperator negative is equal to the set of traces
given by its (sole) operand, only that this set is a set of invalid rather than
valid traces. All InteractionFragments that are different from Negative are
considered positive meaning that they describe traces that are valid and should
be possible.

Critical Region

The interactionOperator critical
designates that the CombinedFragment represents a critical region. A critical
region means that the traces of the region cannot be interleaved by other
OccurrenceSpecifications (on those Lifelines covered by the region). This means
that the region is treated atomically by the enclosing fragment when determining
the set of valid traces. Even though enclosing CombinedFragments may imply that
some OccurrenceSpecifications may interleave into the region, such as with
par-operator, this is prevented by defining a region.

Thus the set of traces of enclosing
constructs are restricted by critical regions.

Ignore / Consider

(p. 473) The interactionOperator
ignore designates that there are some message types that are not shown
within this combined fragment. These message types can be considered
insignificant and are implicitly ignored if they appear in a corresponding
execution. Alternatively one can understand ignore to mean that the
messages that are ignored can appear anywhere in the traces.

Conversely the interactionOperator
consider designates which messages should be considered within this
CombinedFragment. This is equivalent to defining every other message to be
ignored.

Assertion

The interactionOperator assert
designates that the CombinedFragment represents an assertion. The sequences of
the operand of the assertion are the only valid continuations. All other
continuations result in an invalid trace. Assertions are often combined with
Ignore or Consider.

Loop

The interactionOperator loop
designates that the CombinedFragment represents a loop. The loop
operand will be repeated a number of times.

The Guard may include a lower and an
upper number of iterations of the loop as well as a Boolean expression. The
semantics is such that a loop will iterate minimum the 'minint' number of times
(given by the iteration expression in the guard) and at most the 'maxint' number
of times. After the minimum number of iterations have executed, and the boolean
expression is false the loop will terminate. The loop construct represent a
recursive application of the seq operator where the
loop operand is sequenced after the result of earlier
iterations.

The Semantics of Gates

The gates of a CombinedFragment
represent the syntactic interface between the CombinedFragment and its
surroundings, which means the interface towards other
InteractionFragments.

The only purpose of gates is to define
the source and the target of messages.

Explain of Interaction Operators in UML?的更多相关文章

  1. Python设计模式 - UML - 时序图(Sequence Diagram)

    简介 时序图表示参与者与对象之间.对象与对象之间的动态交互过程及时序关系. 时序图详细而直观地展示了对象随时间变化的状态.调用关系和消息时序,时序图中的主要元素有:参与者(Actor), 对象(Obj ...

  2. 关于UML图形/图示数量总结

    http://www.uml.org/ 第一种说法: UML - Unified Modeling Language UML 共定义了9种图,包括4种结构图和5种形为图: //4种结构图: 类图 对象 ...

  3. UML2.0统一建模语言

      Unified Modeling Language (UML)又称统一建模语言或标准建模语言,是支持模型化和软件系统开发的图形化语言,为软件开发的所有阶段提供模型化和可视化支持,包括由需求分析到规 ...

  4. PowerDesigner16 时序图

    时序图(Sequence Diagram)是显示对象之间交互的图,这些对象是按时间顺序排列的.顺序图中显示的是参与交互的对象及其对象之间消息交互的顺序.时序图中包括的建模元素主要有:角色(Actor) ...

  5. Python设计模式 - UML - 交互概述图(Interaction Overview Diagram)

    简介 交互概述图是将不同交互图衔接在一起的图,属于UML2.0的新增图.交互概述图并没有引入新的建模元素,其主要元素来自于活动图和时序图.交互概述图侧重从整体上概览交互过程中的控制流,包括交互图之间的 ...

  6. 【UML】NO.52.EBook.5.UML.1.012-【UML 大战需求分析】- 交互概览图(Interaction Overview Diagram)

    1.0.0 Summary Tittle:[UML]NO.52.EBook.1.UML.1.012-[UML 大战需求分析]- 交互概览图(Interaction Overview Diagram) ...

  7. BUAAOO P13-P14 UML Interaction

  8. Oracle SQL explain/execution Plan

    From http://blog.csdn.net/wujiandao/article/details/6621073 1. Four ways to get execution plan(anyti ...

  9. UML基础与Rose建模实训教程

    目  录 第1章  初识UML. 1 1.1 初识UML用例图... 1 1.2 初识UML类图... 3 第2章  Rational Rose工具... 6 2.1 安装与配置Rational Ro ...

随机推荐

  1. hdu1008

    //c++// #includeusing namespace std;int main(){int n,j,t,start;while (cin >> n,n){start =0;t = ...

  2. SpringMVC 学习-返回字符串中文乱码问题解决

    一.使用 SpringMVC 框架时,如果 HTTP 请求资源返回的是中文字符串,则会出现乱码.原因如下: SpringMVC 框架可以使用 @RequestBody 和 @ResponseBody ...

  3. 扩展kmp——原创

    扩展kmp                 LRH 所谓扩展kmp指的是与kmp相似的求辅助数组的原理,但是本身与kmp关系不大. 1.exkmp的用途:给定一个主串s和一个子串t,求出s中每一个后缀 ...

  4. 第四十七节,random 随机数模块

    random 随机数模块格式: import random 引入随机模块文件 random.randrange(65,91) 调用随机函数random.randrange(随机数开始范围,随机数结束范 ...

  5. gitc2016——打造互联网技术狂欢盛宴

    gitc2016全球互联网技术大会由麒麟会主办,iTech Club(互联网技术精英俱乐部)协办.网堤安全将作为云安全服务提供商应邀出席本届大会,gitc2016会有怎样的精彩内容?我们一起来一探究竟 ...

  6. 2016 SyScan360 国际前瞻信息安全会议 多角度探讨信息安全

    SyScan360国际前瞻信息安全会议由与中国第一大互联网安全公司-360公司与SyScan前瞻信息安全技术年会(TheSymposiumonSecurityforAsiaNetwork,以下简称Sy ...

  7. 关于IOS的Cocoapods相关问题

    Cocoa Pods确实是一个方便的工具,特别是在敏捷开发多个项目的时候,一个工具重复使用,大量节约时间: 可以及时更新github上面的开源库代码,只要改动Podfile文件中对应的开源库的版本号即 ...

  8. 二、WCF应用的通信过程

    注:本文为学习摘抄,原文地址:http://www.cnblogs.com/iamlilinfeng/archive/2012/09/26/2703759.html 一.概述 WCF能够建立一个跨平台 ...

  9. 用Bash脚本将Linux普通用户添加为系统管理员

    将Linux普通用户添加为系统管理员在Gnome或KDE这样强大与完善的桌面环境下是非常简单的事情,一般来说在用户设置的对话框里就直接有相应选项.不过,出于简洁与高效的风格,自己目前并未使用这些高端但 ...

  10. NOIP2014-普及组复赛-第三题-螺旋矩阵

    题目描述 Description 一个n行n列的螺旋矩阵可由如下方法生成: 从矩阵的左上角(第1行第1列)出发,初始时向右移动:如果前方是未曾经过的格子,则继续前进,否则右转:重复上述操作直至经过矩阵 ...