Previous | UML Classes | Table of Contents | UML Packages | Next |
•
OpaqueExpression (from Kernel ) on page 103
(merge increment)
Description
Provides a mechanism for precisely defining the behavior of an opaque expression. An opaque expression is defined by a behavior
restricted to return one result.
Attributes
No additional attributes
Associations
• behavior: Behavior [0..1] Specifies the behavior of the opaque expression.
• result: Parameter [0..1] Restricts an opaque expression to return exactly one return result. When the invocation of the opaque expression completes, a single set of values is returned to its owner. This association is derived from the single return result parameter of the associated behavior.
Constraints
Issue 8312 - modify first constraint and add OCL to both constraints
[1] The behavior can only have return result parameters.
self.behavior.notEmpty() implies(self.behavior.ownedParameters->select(p | p.direction <> ParameterDirectionKind ::return))->isEmpty()
[2] The behavior must have exactly one return result parameter.
self.behavior.notEmpty() implies(self.behavior.ownedParameter->select(p | p.direction = ParameterDirectionKind ::return))->size() = 1
Semantics
An opaque expression is invoked by the execution of its owning element. An opaque expression does not have formal parameters
and thus cannot be passed data upon invocation. It accesses its input data through elements of its behavioral description.
Upon completion of its execution, a single value or a single set of values is returned to its owner.