I want to model the following scenario:
Example:
Message position
Message movement
This is what i modeled in Sirius so far
The issue here is that I cannot link the message position twice to the message movement. Can you please provide a approach of modelling this problem?
Your modelization is lacking one "layer" to represent your "message type" / "message instance" structure.
I think what you need to do is something a bit like this:
MessageType
with a containment towards BaseType
(which IMO should be renamed something like MessageDataType
)MessageInstance
with a containment towards itself and a reference to a MessageType
.Then you end user must first create a MessageType
instance, called "position" and a second one called "movement". Then create three MessageInstance
instances, two pointing towards MessageType
"movement" and one containing the first two MessageInstance
instances.
I would also advise seriously thinking about how you want to name your concepts, because there is a potential confusion between an Ecore instance of one of your EClass and the fact that you are effectively modeling a type/instance structure.