Constraints:

No additional constraints.

Operations:

Signature: oppositeEnd() : MessageEnd;Description: This query returns a set including the MessageEnd (if exists) at the opposite
end of the Message for this MessageEnd.Expression: result = (message->asSet().messageEnd->asSet()->excluding(self))

Signature: isSend() : Boolean;Description: This query returns value true if this MessageEnd is a sendEvent.Expression: result = (message.sendEvent->asSet()->includes(self))

Signature: isReceive() : Boolean;Description: This query returns value true if this MessageEnd is a receiveEvent.Expression: result = (message.receiveEvent->asSet()->includes(self))

Signature: enclosingFragment() : InteractionFragment;Description: This query returns a set including the enclosing InteractionFragment this
MessageEnd is enclosed within.Expression: result = (if self->select(oclIsKindOf(Gate))->notEmpty() then -- it is a Gate let endGate : Gate = self->select(oclIsKindOf(Gate)).oclAsType(Gate)->asOrderedSet()->first() in if endGate.isOutsideCF() then endGate.combinedFragment.enclosingInteraction.oclAsType(InteractionFragment)->asSet()-> union(endGate.combinedFragment.enclosingOperand.oclAsType(InteractionFragment)->asSet()) else if endGate.isInsideCF() then endGate.combinedFragment.oclAsType(InteractionFragment)->asSet() else if endGate.isFormal() then endGate.interaction.oclAsType(InteractionFragment)->asSet() else if endGate.isActual() then endGate.interactionUse.enclosingInteraction.oclAsType(InteractionFragment)->asSet()-> union(endGate.interactionUse.enclosingOperand.oclAsType(InteractionFragment)->asSet()) else null endif endif endif endif else -- it is a MessageOccurrenceSpecification let endMOS : MessageOccurrenceSpecification = self->select(oclIsKindOf(MessageOccurrenceSpecification)).oclAsType(MessageOccurrenceSpecification)->asOrderedSet()->first() in if endMOS.enclosingInteraction->notEmpty() then endMOS.enclosingInteraction.oclAsType(InteractionFragment)->asSet() else endMOS.enclosingOperand.oclAsType(InteractionFragment)->asSet() endif endif)