OCL query creation fails when using UML profile [message #1715211] |
Fri, 20 November 2015 09:36 |
Jens Bürger Messages: 55 Registered: October 2012 |
Member |
|
|
Hello everyone,
I have UML models using UML profiles, for example a state machine and annotations at transitions. I want to evaluate OCL conditions programmatically using the pivot implementation.
As discussed in this thread, this should work and indeed does actually work in the OCL Xtext console.
But programmatically, evaluating "ordinary" queries like
Transition.allInstances()
does work fine, but as soon as the profile element is involved, even creation of the query fails:
Query (for example):
Transition.allInstances().extension_ensureRole->excluding(null).role
Beginning of the stack trace:
org.eclipse.ocl.pivot.utilities.SemanticException: The 'UML::StateMachine' constraint is invalid: 'Transition.allInstances().extension_ensureRole->excluding(null).role'
1: Unresolved Property 'Set(UML::Transition[*|1])::extension_ensureRole'
at org.eclipse.ocl.pivot.utilities.PivotUtil.checkResourceErrors(PivotUtil.java:144)
at org.eclipse.ocl.pivot.internal.context.AbstractParserContext.parse(AbstractParserContext.java:154)
at org.eclipse.ocl.pivot.internal.helper.OCLHelperImpl.createQuery(OCLHelperImpl.java:145)
...
So, this is the same error as we had in the abovementioned thread bevor the fix to the OCL implementation.
I am using Eclipse Mars .1 and the OCL pivot implementation (1.0.1.v20150907-1007) .
Eclipse project containing source code, test model and UML profile is attached.
-
Attachment: ocltest.zip
(Size: 11.90KB, Downloaded 180 times)
|
|
|
Powered by
FUDForum. Page generated in 0.02181 seconds