IBM Support

Model Check error "Code cannot be generated for dependencies where owner is not the source element" after moving a dependency

Troubleshooting


Problem

You receive this error after running code generation or model checker in IBM Engineering Systems Design Rhapsody

Symptom

Errors (1)
    Code cannot be generated for dependencies where owner is not the source element (1)
        Dependency : class_2_class_1 in Default::class_0
Warnings (0)
Info (0)

Cause

Moving a dependency in the browser by dragging and dropping the dependency element to another location.
In this example, we have a model that uses three classes. Class_0 has a usage dependency to Class_1. This generates an include dependency in the Class_0.h source file.
image 5304
We want to move the dependency to Class_2. When moving a dependency via drag and drop, we are presented with three options:
image 5305
1. Change Owner and Source - This moves both ends of the dependency relation. After regenerating the code, the include dependency to Class_1.h is removed from Class_0.h and added to Class_2.h.
2. Change Owner only - This moves the owner end of the dependency. The model checker is not able to find the other end of the dependency and the code generation cannot complete. A model checker error is shown.
3. Change Source only - This moves the source end of the dependency. The model checker is not able to find the other end of the dependency and the code generation cannot complete. A model checker error is shown.
The effect of the last two options is shown here:
image 5306
Note, the Changing Source/Owner Only options should be used when the source or target of the dependency is read-only. These options should not be used if code generation is required in the project.

Resolving The Problem

The dependency must be deleted and redrawn.

Document Location

Worldwide

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSV36Y","label":"IBM Engineering Systems Design Rhapsody - Model Manager"},"ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Version(s)","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
29 July 2020

UID

ibm16254325