Model dependencies and project references

References and dependencies can be defined at different levels in your workspace. Projects, transformation configurations, and models can all define references.

Cross model references can be added between models without any explicit dependency between projects in a regular UML model. For example, if two models are open, you can drag classes from one model onto a class diagram from another model and then draw relationships between classes. However, doing this does not invoke code generation of the dependent model to resolve code-level dependencies when the current UML development model is built.

In order to resolve code-level dependencies, you must first create project references so that the builder can track dependencies and pre-build dependent projects. In addition, you create references, or references are created automatically for you, from a dependent transformation configuration to a required transformation configuration in the referenced project. The transformation configurations then manage the dependencies among the target domain language projects.

For example, when a transformation is run, either manually by you or during a project build, the following operations happen:

  1. The transformation detects that another class in a different project is required before the class in its set of sources can be generated.
  2. If a project reference to the required project exists, the transformation prompts you either to allow the operation to add the dependent class from the other project to its set of sources or to add a dependency to a transformation configuration in the other project.
  3. The transformation executes domain-specific code to establish the dependency in the domain language project.

Feedback