OCL Failing

I am trying to learn OCL to implement validation rules. I'm simply trying to get something to evaluate to true. I have selected the Constrained Element to be InputPin [UML Standard Profile::UML2 Metamodel]. I run the following constraint in Evaluate mode, specifying THIS to be a specific input pin in my model:
yet the result is False. Can anyone help?
- Code: Select all
context InputPin inv getPinType:
body
self.oclIsTypeOf(Pkg::SubPkg::TypeFromInputPinTypeField)
yet the result is False. Can anyone help?