问题描述
BoUML中的ReadVariableAction活动动作允许选择一个类及其属性,并通过创建输出图钉来返回该属性(请参见下图和
但是什么是该动作的语义?
根据
但是BoUML既不允许为活动创建变量,也不允许将变量名传递给ReadVariableAction
似乎我可以使用ReadVariableAction,如下所示
但是从UML的角度来看这是错误的模型。
读/写/的语义清除/添加/删除BoUML中的变量操作是...错误!
很显然,当我在BoUML中添加活动时,我误解了这一部分,要理解的规范涉及活动或结构化活动节点的变量。因此,由于错误,我允许选择的变量是类的属性。另一个结果是,您无法为活动或结构化活动节点定义变量。
Mea culpa
ReadVariableAction activity action in BoUML allows to choose a class and its attribute and returns the attribute through creation of output pin (see figure below and BoUML documentation):
But what is the semantic of that action? What does ReadVariableAction operation actually return?
According to clause 16.9.3.1 Variable Action of The Unified Modeling Language Specification Version 2.5:
Clause 15.2.2 Abstract Syntax below says that Variable subsets ownedMember, so the variable should be identifiable by name.
But BoUML neither allows creation of variables for an activity nor passing a name of a variable to ReadVariableAction.
It seems that I could use ReadVariableAction as shown below
But it's wrong model from UML's point of view.
The semantic of the read/write/clear/add/remove variable actions in BoUML is ... wrong !
Clearly I misunderstood that part when I added the activities in BoUML, I didn't read well the norm to understood that concerns variable of the activity or a structured activity node. So by error the 'variable' I allow to choose is an attribute of a class. An other consequence is you cannot define variables for an activity nor structured activity node.
Mea culpa
这篇关于BoUML中UML的ReadVariableAction的语义是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!