Class UML 2.5::Operation
Description:
An Operation is a BehavioralFeature of a Classifier that specifies the
name, type, parameters, and constraints for invoking an associated Behavior.
An Operation may invoke both the execution of method behaviors as well
as other behavioral responses. Operation specializes TemplateableElement
in order to support specification of template operations and bound operations.
Operation specializes ParameterableElement to specify that an operation
can be exposed as a formal template parameter, and provided as an actual
parameter in a binding of a template.
Direct Superclasses: TemplateableElement,
ParameterableElement,
BehavioralFeatureDirect Subclasses: Class Precedence List: Operation,
TemplateableElement,
ParameterableElement,
BehavioralFeature,
Feature,
RedefinableElement,
Namespace,
NamedElement,
ElementProperties:
![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
bodyCondition :
Constraint (0 1); -- source
Operation![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
class :
Class (0 1); -- source
Operation![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
datatype :
DataType (0 1); -- source
Operation![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
interface :
Interface (0 1); -- source
Operation![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
isOrdered : Boolean (1 1); -- source
Operation![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
isQuery : Boolean (1 1); -- source
Operation![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
isUnique : Boolean (1 1); -- source
Operation![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
lower : Integer (0 1); -- source
Operation![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
postcondition :
Constraint (0 *); -- source
Operation![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
precondition :
Constraint (0 *); -- source
Operation![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
redefinedOperation :
Operation (0 *); -- source
Operation![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
templateParameter :
OperationTemplateParameter (0 1); -- source
Operation![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
type :
Type (0 1); -- source
Operation![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
upper : UnlimitedNatural (0 1); -- source
Operation![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
ownedTemplateSignature :
TemplateSignature (0 1); -- source
TemplateableElement![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
templateBinding :
TemplateBinding (0 *); -- source
TemplateableElement![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
owningTemplateParameter :
TemplateParameter (0 1); -- source
ParameterableElement![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
concurrency :
CallConcurrencyKind (1 1); -- source
BehavioralFeature![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
isAbstract : Boolean (1 1); -- source
BehavioralFeature![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
method :
Behavior (0 *); -- source
BehavioralFeature![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
ownedParameter :
Parameter (0 *); -- source
BehavioralFeature![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
ownedParameterSet :
ParameterSet (0 *); -- source
BehavioralFeature![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
raisedException :
Type (0 *); -- source
BehavioralFeature![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
featuringClassifier :
Classifier (0 1); -- source
Feature![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
isStatic : Boolean (1 1); -- source
Feature![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
isLeaf : Boolean (1 1); -- source
RedefinableElement![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
redefinedElement :
RedefinableElement (0 *); -- source
RedefinableElement![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
redefinitionContext :
Classifier (0 *); -- source
RedefinableElement![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
elementImport :
ElementImport (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
importedMember :
PackageableElement (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
member :
NamedElement (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
ownedMember :
NamedElement (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
ownedRule :
Constraint (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
packageImport :
PackageImport (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
clientDependency :
Dependency (0 *); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
name : String (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
nameExpression :
StringExpression (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
namespace :
Namespace (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
qualifiedName : String (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
visibility :
VisibilityKind (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
ownedComment :
Comment (0 *); -- source
Element![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
ownedElement :
Element (0 *); -- source
Element![](/se-interop/image/down-arrow.png?hunchentoot-session=10379%3ADD62B46A2F7336C18D5D4A9F2E7BA9E2)
owner :
Element (0 1); -- source
ElementConstraints:
Signature: CMOF_14_3_17a() : Boolean;
Description: 14.3 [17] An Operation can have up to one Parameter whose direction is 'return';
furthermore, an Operation cannot have any ParameterSet per 12.4 [8].
Expression: ownedParameter->select(direction = ParameterDirectionKind::return)->size() < 2 and
ownedParameterSet->isEmpty()
Signature: CMOF_14_3_2() : Boolean;
Description: 14.3 [2] The type of Operation::raisedException is limited to be Class rather than Type.
see also: https://sites.google.com/site/metamodelingantipatterns/catalog/mof/operation-has-non-class-exception
Expression: raisedException->forAll(e | e.oclIsTypeOf(Class))
Operations:
Signature: upper.1() : UnlimitedNatural;
Description: If this operation has a return parameter, upper equals the value of upper
for that parameter. Otherwise upper has no value.
Expression: result = (if returnResult()->notEmpty() then returnResult()->any(true).upper else null endif)
Signature: type.1() : Type;
Description: If this operation has a return parameter, type equals the value of type
for that parameter. Otherwise type has no value.
Expression: result = (if returnResult()->notEmpty() then returnResult()->any(true).type else null endif)
Signature: returnResult() : Parameter;
Description: The query returnResult() returns the set containing the return parameter
of the Operation if one exists, otherwise, it returns an empty set
Expression: result = (ownedParameter->select (direction = ParameterDirectionKind::return))
Signature: lower.1() : Integer;
Description: If this operation has a return parameter, lower equals the value of lower
for that parameter. Otherwise lower has no value.
Expression: result = (if returnResult()->notEmpty() then returnResult()->any(true).lower else null endif)
Signature: isUnique.1() : Boolean;
Description: If this operation has a return parameter, isUnique equals the value of
isUnique for that parameter. Otherwise isUnique is true.
Expression: result = (if returnResult()->notEmpty() then returnResult()->exists(isUnique) else true endif)
Signature: isOrdered.1() : Boolean;
Description: If this operation has a return parameter, isOrdered equals the value of
isOrdered for that parameter. Otherwise isOrdered is false.
Expression: result = (if returnResult()->notEmpty() then returnResult()-> exists(isOrdered) else false endif)
Signature: isConsistentWith(redefiningElement : RedefinableElement; ) : Boolean;
Description: The query isConsistentWith() specifies, for any two Operations in a context
in which redefinition is possible, whether redefinition would be consistent.
A redefining operation is consistent with a redefined operation if it
has the same number of owned parameters, and for each parameter the following
holds: - Direction, ordering and uniqueness are the same. - The corresponding
types are covariant, contravariant or invariant. - The multiplicities
are compatible, depending on the parameter direction.
Expression: result = (redefiningElement.oclIsKindOf(Operation) and let op : Operation = redefiningElement.oclAsType(Operation) in self.ownedParameter->size() = op.ownedParameter->size() and Sequence{1..self.ownedParameter->size()}-> forAll(i | let redefiningParam : Parameter = op.ownedParameter->at(i), redefinedParam : Parameter = self.ownedParameter->at(i) in (redefiningParam.isUnique = redefinedParam.isUnique) and (redefiningParam.isOrdered = redefinedParam. isOrdered) and (redefiningParam.direction = redefinedParam.direction) and (redefiningParam.type.conformsTo(redefinedParam.type) or redefinedParam.type.conformsTo(redefiningParam.type)) and (redefiningParam.direction = ParameterDirectionKind::inout implies (redefinedParam.compatibleWith(redefiningParam) and redefiningParam.compatibleWith(redefinedParam))) and (redefiningParam.direction = ParameterDirectionKind::_'in' implies redefinedParam.compatibleWith(redefiningParam)) and ((redefiningParam.direction = ParameterDirectionKind::out or redefiningParam.direction = ParameterDirectionKind::return) implies redefiningParam.compatibleWith(redefinedParam)) ))
Send questions or comments to
[email protected].