Unable to validate OCL [message #1591770] |
Thu, 29 January 2015 18:39 |
Rishi Kanth Messages: 18 Registered: October 2014 |
Junior Member |
|
|
Hi Group,
I have attached the model I am working with. I am unable to validate the OCL constraints defined in the profile when they are applied on UML Class diagram.
As defined in the model,
Stereotypes : ST1, ST2, ST3 - extend Metaclass Class - ST2 and ST3 are derived from ST1
Stereotypes : Link1, Link2, Link3- extend Metaclass Association - Link2 and Link3 are derived from Link1
I am have define the following OCL on Link1
self.base_Association.memberEnd.class->excluding(null)->exists(extension_ST1->selectByKind(profile::Master::Classes::ST3)<>null)
When I validate OCL (right click on the model, OCL->Validate).
Result - Validate Complete
Expected - Fail, as Link1 is applied between Stereotypes ST1
Please let me know where I am going wrong !
-
Attachment: TestOCL.rar
(Size: 11.02KB, Downloaded 234 times)
|
|
|
Re: Unable to validate OCL [message #1592978 is a reply to message #1591770] |
Fri, 30 January 2015 10:40 |
Ed Willink Messages: 7670 Registered: July 2009 |
Senior Member |
|
|
Hi
Just attempting to validate your profile gives warnings that I have not
seen before, but I suspect they are to do with triple level nesting of
Profiles. Use of a Profile with warnings is unlikely to be successful.
None of your profiles have URIs. OCL uses the URIs as the preferred
basis for package merging and in current released code fails when a
parent Package has a null URI.
Regards
Ed Willink
On 29/01/2015 18:39, Rishi Kanth wrote:
> Hi Group,
>
> I have attached the model I am working with. I am unable to validate the OCL constraints defined in the profile when they are applied on UML Class diagram.
>
> As defined in the model,
> Stereotypes : ST1, ST2, ST3 - extend Metaclass Class - ST2 and ST3 are derived from ST1
>
> Stereotypes : Link1, Link2, Link3- extend Metaclass Association - Link2 and Link3 are derived from Link1
>
> I am have define the following OCL on Link1
>
> self.base_Association.memberEnd.class->excluding(null)->exists(extension_ST1->selectByKind(profile::Master::Classes::ST3)<>null)
>
> When I validate OCL (right click on the model, OCL->Validate).
> Result - Validate Complete
> Expected - Fail, as Link1 is applied between Stereotypes ST1
>
> Please let me know where I am going wrong !
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02842 seconds