How to constrain a reference to be from a particular set ? [message #534768] |
Thu, 20 May 2010 09:42 |
Julien Richard-Foy Messages: 3 Registered: May 2010 |
Junior Member |
|
|
One of the properties of my Transition entity is a reference to an Event entity. In the diagram editor generated by GMF I am allowed to set this event property to any of the Event entities of the diagram. But I would like to constrain the possible values for this property to a subset of these entities: those which are already included in a events set defined in an Interaction entity.
I tried to define an OCL constraint on the Transition Mapping :
Interaction.allInstances()->forAll(interaction|interaction.events- >includes(self.event))
But it doesn't work: I can create Transitions in the diagram editor, but they're not drawed and I can't therefore try to set their event property (transitions are registered in the core file though not visible in the diagram).
|
|
|
Powered by
FUDForum. Page generated in 0.02623 seconds