Refining the hierarchy of reactive classes

You can refine the hierarchy of reactive classes without using overrides and unoverrides (without losing any information).

About this task

For example, suppose you have class C inheriting from class A, as shown in the following object model diagram.

Object model diagram - example showing simple inheritance

Suppose you want to change the hierarchy so C inherits from B, which in turn inherits from A. Therefore:

  • The statechart that C inherited from A is now inherited from B; B inherits its statechart from A.
  • The inheritance between A and C is deleted.
  • C does not lose any information because its inherited elements reference new GUIds.

To change the hierarchy:

Procedure

  1. Using either the browser or the Diagram Tools, create inheritance between B and A.
  2. Create inheritance between C and B.
  3. Rhapsody® displays a window that informs you that you are adding a level of inheritance, and asks you to confirm the deletion of the inheritance between C and A. Click Yes.

Results

The following figure shows the revised object model diagram.

Object model diagram - example showing hierarchy inheritance