|Previous||UML Classes||Table of Contents||UML Packages||Next|
OpaqueExpression (from Kernel ) on page 103
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.
No additional attributes
• 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.
Issue 8312 - modify first constraint and add OCL to both constraints
 The behavior can only have return result parameters.
self.behavior.notEmpty() implies(self.behavior.ownedParameters->select(p | p.direction <> ParameterDirectionKind ::return))->isEmpty()
 The behavior must have exactly one return result parameter.
self.behavior.notEmpty() implies(self.behavior.ownedParameter->select(p | p.direction = ParameterDirectionKind ::return))->size() = 1
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.