Use an entity as reltionship (SIRIUS) #291
-
Hi everyone, i'm having trouble with my entity in my metamodel in Sirius. How do I use an entity (of my metamodel) as a relationship in the diagram in Sirius. As you can see in the image, i want to use the entity goal_relationship as a relationship in the diagram. I also attach a image of the result that i want to get. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi, for this case you need to use so-called "Element-Based Edges": Like a Node Mapping they use a Semantic Candidates Expression and a Domain Class to identify the model elements they represents (in your case, instances of They also need a Source Finder Expression and a (set of) Source Mapping (resp. Target Finder Expression and Target Mapping) to identify, from the instance (of See the documentation for more details. You can also have a look at how the
|
Beta Was this translation helpful? Give feedback.
-
Hi, How can i create a Element Based Edge? I try it to do it, this it what i do: And for create the edge i do it this, but it doesn't work So, how i can do it? |
Beta Was this translation helpful? Give feedback.
Hi, for this case you need to use so-called "Element-Based Edges":
Like a Node Mapping they use a Semantic Candidates Expression and a Domain Class to identify the model elements they represents (in your case, instances of
Goal_RelationShip
).They also need a Source Finder Expression and a (set of) Source Mapping (resp. Target Finder Expression and Target Mapping) to identify, from the instance (of
Goal_RelationShip
) the edge represents, which nodes are the source (resp. target) to point to.See the documentation for more details.
You can also have a look at how the
odesign
of Ecore Tools uses both kinds of edges: