Skip to content

ConnectionInstances need to consider the modes of the endpoints #2722

@AaronGreenhouse

Description

@AaronGreenhouse

Please describe the problem your proposed feature would address

When a semantic connections exists between two components, it should only exist in the system operation modes that both components exist in.

When a semantic connection exists between a component and a feature it should only exist in the system operation modes that the component exists in.

What is the impact of the problem?

Currently semantic connections (ConnectionInstance objects) between modal components do not have their InSystemOperationModes attribute set. This attribute is only set if one of the declarative connections that makes up the semantic connection is modal.

This can lead to a view of the instance model where a semantic connection exists, but the components it is connecting do not.

Furthermore, things are complicated by the fact that ConnectionInstance.isActive() does take this information into account:

        public boolean isActive(SystemOperationMode som) {
                if (getInSystemOperationModes().isEmpty() || getInSystemOperationModes().contains(som)) {
                        if (getSource().getComponentInstance().isActive(som)
                                        && getDestination().getComponentInstance().isActive(som)) {
                                return getContainingComponentInstance().isActive(som);
                        }
                }
                return false;
        }

Describe the solution you'd like

The process that applies SOMs to connection instances need to be updated to handle this situation.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions