Prev Next

Nested Ports in SysML

This statement is derived from the SysML 1.5 Specification:

'Ports nest other Ports in the same way that Blocks nest other Blocks. The type of the Port is a Block (or one of its specializations) that also has Ports.'

For example, a complex number is made up of two members (of type Real) - the real value and the imaginary value. This is represented by the ComplexNumber Block with two Ports, Real and Imaginary. The  Equation Block has a Port that takes a ComplexNumber, but we might want to connect the real and imaginary portions of that variable to different sources. Therefore we have to show them, on the Equation Port, in order to connect them.

This SysML Block Definition diagram shows how ports nest other ports in the same way that blocks nest other blocks, in Sparx Systems Enterprise Architect.

This facility is available in Enterprise Architect for all versions of SysML and for UML.

Create Nested Ports in SysML

In describing this procedure, we use a representation of the earlier example as a framework for the steps.

  1. Create a SysML Block named 'Equation' with a Port also named 'Equation'.
  2. Create a SysML Block named 'ComplexNumber' with Ports named 'Real' and 'Imaginary'.
  3. Display the Properties window (press Alt+1) for the 'Equation' Port and select the 'Property' page.
  4. In the 'Type' field, click on the drop-down arrow and select the 'Select Type' option, then locate and select the 'ComplexNumber' Block element; this sets the 'Type' field to 'ComplexNumber'.
  5. Right-click on the 'Equation' Port and select the 'Features | Interaction Points' option. The Features & Properties window displays at the 'Interaction Points' tab.
  6. Select the 'Show Owned/Inherited' checkbox. The 'Real' and 'Imaginary' Ports are shown in the list panel.
  7. Select the checkboxes against 'Real' and 'Imaginary'. The two Ports are now nested in the 'Equation' Port.