Creating component instances

Component instances represent executable processes, objects, or libraries that run or reside on processing resources (nodes) during program execution. They are represented by the UML component symbol: a box with two small rectangles on the left side.

About this task

A component instance is an instance of a component type. Unlike components, there is no special naming convention for component instances. Drawing a component instance inside a node indicates that the component instance lives or runs on that node during run time.

You can add a component instance to a deployment diagram using the Component tool or the IBM® Rational® Rhapsody® browser.

Adding component instances with the Diagram Tools

Procedure

  1. With a node already drawn on your deployment diagram, click the Component Diagram button
    Component Diagram button
    in the Diagram Tools.
  2. Draw the component instance inside the node. The product creates the component instance inside the selected node.
  3. Edit the default name of the component instance, then press Enter.

    The component type is not part of the name for the component instance. The full name of a component instance is the same as it displays in the browser.
  4. Assign the component instance a type by opening its Features window and setting an existing component in the Component Type box.

Results

Note: You cannot draw a component instance outside of a node in a deployment diagram.

You can populate a deployment diagram with component instances by dragging them from the Rational Rhapsody browser onto the diagram. The product creates a component instance based on the selected node.

Adding component instances with the browser

Procedure

  1. Depending on the method you want to use:
    • Right-click a node in the browser and select Add New > Component Instance, as shown in the following figure, or
      Browser showing Add New > Component Instance
    • Right-click a component instance category, and select Add New Component Instance.
      Browser, right-click component instance category to see Add New Component Instance menu command
  2. Edit the default name of the component instance.
  3. With both the browser and the deployment diagram editor in view, click‑drag‑and‑drop the component instance from the browser onto the diagram.

Feedback