In a very flexible design, the links between my parts can be reconfigured. I wanted to do this by creating links with the CreateLinkAction. This works, when I have direct references between my parts. However, I would like to send signals via a port and receive signals from ports.
In the simple example below, I want to connect the button to either one of the two lights. The element responsible for reconfiguring I called "switch" and it has references to all of them. The Activity shown should link the button to light1.
I understand, that the input to CreateLink should be two objects whose types have an association between them, not their ports. However, I have no idea what else I should use. Actually in the simulation, the port contains the same object, since the porttype generalizes the Button and the Light, making the port a behavior port.
In the LinkEndData I set End=p1. This is of course also wrong, since it must be an end of an Association. But ports have InterfaceBlocks as types, and they usually don't have Associations. So, what should I enter here?
The question is, why is it not working? a) my model is wrong, b) the simulation engine has not implemented it or c) SysML (including UML, fUML and PSCS) does not support it.
By the way, using the switch as an intermediate part that routes the output to the selected light does not solve my problem. I don't want to have anything in between the button and the light, except for a pure link. In my real example, all the intermediate switches would make the model impossible to read.
