Sunday, September 7, 2008

Testing Enumerations in Eco Ocl

I can never remember the Ocl syntax used to refer to the value of an enumeration.

The syntax is $enumname$::$enumvalue$ 

Here is a sample Ocl string to select a particular value of VehicleTypes 

"VehicleSupplier.allInstances->select( Type = VehicleTypes::MotorHome)"