Hello, everyone. Is it possible to get the logical components from a component exchange.
In fact, I can already list all the component exchanges of the Logical Architecture diagram using the following script. For example, component exchanges 1, 2, and 3 in Figure 1.
diagram_name = “xxx"
for diag in JavaList(org.eclipse.sirius.business.api.dialect.DialectManager.INSTANCE.getAllRepresentationDescriptors(model.session),Diagram):
if diag.get_name() == diagram_name:
for comp in diag.get_represented_elements():
if isinstance(subcom, ComponentExchange):
print(subcom.get_name())
However, an error (Figure 3) occurred when I attempted to list both component exchanges and logical components (For example, Component Exchange 2; Logical Component B; Logical Component A in Figure 2)using the script described below.
LogicalComponent2ComponentExchange=subcom.get_name() + ";" + subcom.get_connected_components()
It is worth mentioning that when we obtained the CommunicationMean corresponding to the Operational Entity before, the following script was feasible, but it is not applicable to the current problem.
OperationalEntity2CommunicationMean=com.get_name()+ ";" + com.get_source_entity().get_name()+";" + com.get_target_entity().get_name()