Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Problem with Link Constraint (OCL)
Problem with Link Constraint (OCL) [message #480651] Tue, 18 August 2009 02:30 Go to previous message
Ivo Petkov is currently offline Ivo Petkov
Messages: 14
Registered: August 2009
Junior Member
Hello,

I posted my problem in GMF section, but there are no answers, so I decided to post it here too ( http://www.eclipse.org/forums/index.php?t=msg&th=152579& amp;start=0&S=0af8f2b4cf467d9a4c4284607c0496aa )
Quote:
Hi all,

If few words:
a CompositeMode is part of my model, it can contain subModes and conditionalConnectors, a connection between these two nodes exists, but I want to allow such connection if both nodes are in one and the same CompositeMode.

I tried with the following target link constraint in the GMFMAP:
CompositeMode.allInstances()->exists(cm| cm.subModes->exists(sm| sm = self) and cm.conditionalConnectors->exists(cc| cc = oppositeEnd))

and this doesn't work because allIntances doesn't work for me, here are the debug logs:

[OCL] Evaluate: remes::CompositeMode
[OCL] Result : org.eclipse.emf.ecore.impl.EClassImpl@9cd7cd (name: CompositeMode) (instanceClassName: null) (abstract: false, interface: false)
[OCL] Evaluate: remes::CompositeMode.allInstances()
[OCL] Result : null
[OCL] Evaluate: remes::CompositeMode.allInstances()->exists(cm : CompositeMode | cm.subModes->exists(sm : SubMode | sm.=(self)).and(cm.conditionalConnectors->exists(cc : ConditionalConnector | cc.=(oppositeEnd))))
[OCL] Result : OclInvalid
[OCL] Evaluate: remes::CompositeMode.allInstances()->exists(cm : CompositeMode | cm.subModes->exists(sm : SubMode | sm.=(self)).and(cm.conditionalConnectors->exists(cc : ConditionalConnector | cc.=(oppositeEnd))))
[OCL] Result : OclInvalid

Please help me to fix this problem.

Thanks in advance,
Ivo
 
Read Message
Read Message
Previous Topic:Re: OCL closures implementation
Next Topic:def expression?
Goto Forum:
  


Current Time: Wed May 22 16:02:22 EDT 2013

Powered by FUDForum. Page generated in 0.02180 seconds