|
Re: OCL expression [message #1196499 is a reply to message #1196290] |
Tue, 19 November 2013 12:53 |
Ed Willink Messages: 7670 Registered: July 2009 |
Senior Member |
|
|
Hi
My first reaction was to use reflection which the Pivot-based OCL
supports, although OMG OCL does not (yet).
However a cleaner solution may occur at the metalevel by applying the
UniqueAttributeNames stereotype to Actors.
context UniqueAttributeNames
inv AttributeNamesAreUnique: Property.allInstances()->select(type =
base_Class)->isUnique(name)
(The above is untested)
Regards
Ed Willink
On 19/11/2013 10:44, dodo babab wrote:
> Hi,
>
> Please, can anyone help me with this problem.
> I have to classes in my meta model, each of them has an attribute (e.g., trustorRole and trusteeRole) The date type (eTupe) for both is the enumeration class (e.e.g, serviceRequester, serviceProvider). I want to create and OCL expression which defines that the attribute name of these two classes should not be the same in the instance of the meta model. To be more clear, my meta model look like in the picture below.
>
> Best Regards
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04846 seconds