[gme-users] Problem with OCL

Akos Ledeczi akos.ledeczi at vanderbilt.edu
Fri Apr 1 10:11:53 CST 2005



Christian:

I was unable to reproduce your error using the same simple meta you 
included. Remarks:

- the Delete event talks about the current model not a child. You need 
to use the lost child event instead.

- if I use that, I do get the constraint violation. If I select Abort, 
it won't delete the atom and I get the same message (Unable to delete 
models) you do. This is how it is supposed to work. If I ignore the 
violation, GME deletes it without any further messages.

The Unable to delete models message comes from any exceptions that are 
raised in the deletion process, for example the one Matt wrote. You must 
have something else going on in your model. For example, if the model is 
an instance than you cannot delete parts of it either.

Hope this helps,
Akos



  Brunette wrote:
> Hi Matt,
> 
> I have checked the constraint on a more simple example and I found the 
> same problem.
> The example is the following :
> 
> 
> 
> So there is only one aspect in which the model and the atom is added.
> 
> I wrote this constraint and linked it to the atom:
> 
> 
> 
> When I use this metamodel and when I delete the atom from its model, the 
> same error message is displayed.
> 
> Christian
> 
> 
> Matthew J. Emerson wrote:
> 
>>Hi Christian.
>>
>>Usually that error message shows up when you try to delete a model from
>>one of its non-primary aspects (a primary aspect for some model element
>>is one in which it may be created and deleted). It may have nothing to
>>do with your constraint.
>>
>>--Matt
>>
>>  
>>
>>>-----Original Message-----
>>>From: Christian Brunette [mailto:Christian.Brunette at irisa.fr]
>>>Sent: Friday, April 01, 2005 4:10 AM
>>>To: gme-users
>>>Subject: [gme-users] Problem with OCL
>>>
>>>Hi,
>>>
>>>I have added a constraint to an atom on the "delete" event with a
>>>priority set to 2.
>>>When I want to delete this atom and this constraint returns false, GME
>>>displays only a error box whose message is: "Unable to delete models".
>>>Does anybody already have the same problem ?
>>>
>>>Thanks,
>>>Christian
>>>
>>>--
>>>Christian Brunette
>>>Post-doctorant in the ESPRESSO team
>>>IRISA-INRIA, Campus de Beaulieu, 35042 Rennes cedex, France
>>>Phone: +33 (0) 2 99 84 72 31, Fax: +33 (0) 2 99 84 71 71
>>>
>>>_______________________________________________
>>>gme-users mailing list
>>>gme-users at list.isis.vanderbilt.edu
>>>http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
>>>    
>>>
>>
>>_______________________________________________
>>gme-users mailing list
>>gme-users at list.isis.vanderbilt.edu
>>http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
>>  
>>
> 
> 
> -- 
> Christian Brunette
> Post-doctorant in the ESPRESSO team
> IRISA-INRIA, Campus de Beaulieu, 35042 Rennes cedex, France
> Phone: +33 (0) 2 99 84 72 31, Fax: +33 (0) 2 99 84 71 71
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> gme-users mailing list
> gme-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users


More information about the gme-users mailing list