Creating a diagram

To create an S2 Services Structure diagram


  1. In the Containment Tree, select the S2 package and do one of the following:
    • From the selected package's shortcut menu, select Create Diagram > S2 Services Structure.

    • In the modeling tool's main menu, click Create Diagram, search for S2 Services Structure, and select it.
  2. Name a diagram or leave it with the default name.

Creating an element

When the diagram is created, you can start creating the appropriate elements. An example is described using the Service element, but the same is valid for other structural elements.


To create a Service in a diagram


  1. In the diagram palette, click the Service and then click the appropriate place on the diagram pane.

  2. Name the element.

Back to top

To create a Service in a Containment tree


  1. In the Containment tree, right-click the needed package, and from the shortcut menu, select Create Element. Search for the Service and select it.

  2. Name the element.
  3. Drag the created element from the Containment tree to the diagram pane.


The structure of each Service can be modeled using the S2 Service Internal Structure.


To create the elements from other resources (e.g., Word, Excel, HTML)


  1. Copy a list in your resource.
  2. In a diagram, press Ctrl+V and from the Paste Special dialog, choose Element
  3. From the Select Type dialog, choose Service (or another appropriate element).

For more information about creating the elements from other resources, see Creating elements from other resources.

Connecting the Services

When a Service is created, you can start connecting them using the Composition and Aggregation relationships.

Back to top

To connect the elements with the Composition relationship


  1. Select an element which will be the Composition End.
  2. From the Smart Manipulator,  which appears after you select the element, choose Directed Composition.

    You can also select the Composition relationship from the diagram palette.


  3. Move the mouse pointer over the target element and click to finish the action.

Back to top

Once the Composition relationships is created, in the Containment tree, you can see the Composite element and note the Service Roles (Part Properties) displayed within the namespace of the Composite element and how the element type and multiplicity are shown.


To connect the elements with the Aggregation relationship


  1. Select an element that will be the Aggregation End.
  2. In the diagram palette, click the black arrow near the Association and choose Directed Aggregation.

  3. Click the element which is the Aggregation End and draw the relationship to the Reference End.

Changing the role name and specifying multiplicity

To change the role name


  1. Right-click the selected Role end of the relationship.
  2. From the shortcut menu, select Edit Name. The default name will be displayed.

You can edit the default name on the diagram, in the Containment tree, or in the role's Specification window

Back to top

To specify multiplicity


  1. Right-click the selected Role end of the Composite relationship.
  2. At the bottom of the shortcut menu, choose one of the default multiplicity values.

You can always change the multiplicity value on the diagram or in the Specification window of the role element.

Back to top

Displaying created structure

If you already have created a structure in the Containment tree, you can display it on the diagram. There are three ways to display the structure:

  • Relationship (direct) Notation. Using this notation, the structure will be displayed on a diagram pane with the elements connected with relationships.
  • Attribute Compartment Notation. If you use these notations, the structure will be displayed as the attributes in the Attributes compartment.
  • Structure (Nested elements) Notation. If you use these notations, the structure will be displayed in the Structure compartment.


To display a created structure on a diagram (Direct Notation)


  1. Drag the selected element with the part properties onto the diagram.
  2. Right-click that element, and from its shortcut menu, select Display > Display Related Elements.
  3. In the Display Related Elements dialog, select Association.

    If Resource Artifacts (or other structural elements) were related using the Resource Association relationship, select the Resource Association also.
  4. Click OK.

Back to top

To display a created structure on a diagram (Attribute Compartment Notation)


  1. Drag the selected element with the part properties onto the diagram.
  2. Select the element and click the Compartments, smart manipulator.
  3. In the Compartments menu, select Attributes.

    When connecting the elements with Composition/Aggregation relationships, the roles are Association Ends. In such a case, the roles will not be displayed in the Attributes compartment, only in the Structure compartment.

Back to top

To display a created structure on a diagram (Structure (Nested elements) Notation)


  1. Drag the selected element with the part properties onto the diagram.
  2. Do one of the following:
  3. In the Display Parts/Ports dialog, select the parts you want to be displayed.
  4. Click OK.


Back to top