Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » OCL query creation fails when using UML profile
OCL query creation fails when using UML profile [message #1715211] Fri, 20 November 2015 09:36
Jens Bürger is currently offline Jens BürgerFriend
Messages: 53
Registered: October 2012
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
does work fine, but as soon as the profile element is involved, even creation of the query fails:
Query (for example):


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(
	at org.eclipse.ocl.pivot.internal.context.AbstractParserContext.parse(
	at org.eclipse.ocl.pivot.internal.helper.OCLHelperImpl.createQuery(

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:
    (Size: 11.90KB, Downloaded 105 times)
Previous Topic:Let statements for collection of collections
Next Topic:How to use Pivot OCL thread-safely?
Goto Forum:

Current Time: Sun Jul 12 04:52:46 GMT 2020

Powered by FUDForum. Page generated in 0.01574 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top