|
Re: Diificulties to create a node [message #1791170 is a reply to message #1791165] |
Mon, 25 June 2018 12:56 |
|
Hello
It is not so easy to answer precisely without you odesign file.
What happen is that somewhere in your tool, your current self or the variable you use is a instance of Customer that you consider as an instance of Organization. I guess it because you try to modify the Organization.workstations feature.
Regards
Laurent
Laurent Fasani - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
|
Re: Diificulties to create a node [message #1791367 is a reply to message #1791227] |
Thu, 28 June 2018 12:13 |
|
container variable depends on the selection so if your select an Organisation then container is a Organisation. but you can also select a Customer. In this case you have implement the logic for getting the right Organisation instance. For example a trivial implementation is aql:self.organisations->at(1)
Make sure also that you selected the right mapping on your NodeCreationDescription.
regards
Laurent
Laurent Fasani - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Re: Diificulties to create a node [message #1791378 is a reply to message #1791367] |
Thu, 28 June 2018 13:10 |
|
In your metamodel, Workstation is linked to Organisation via a composition. It means that when you create a new Workstation it must be attached to an existing Organisation.
If Workstations and Organisations are displayed with Nodes linked with Edges (see orga-node.png) you will have a problem with your creation tool : if the user click on the diagram background, you don't know to which Organisation the new Workstation should be attached (you have to select an arbitrary Organisation, for example the first one, which is not intuitive for the end user of your tool).
To represent Organisations, I suggest that you replace the Node by a Container containing Workstation nodes (see orga-container.png) . Then your tool will know which organisation is the owner = the one on which the user has clicked. The expression of the ChangeContext becomes very simple "var:self" (see odesign.png).
Frédéric Madiot - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
[Updated on: Thu, 28 June 2018 13:16] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03509 seconds