Defining CDM Scenario Entities and Relationships

In a composite data model, all the entities in a JDL file are attached to the scenario type that is defined in the JDL file. There is nothing to do in the entity block to achieve this, except for putting this block in the same JDL file as the scenarioType block that defines the scenario type.

Entity names must be unique across the application data model.

Relations between two entities of the same scenario type are declared by simply including them in the same JDL file as the two entities.

Relations from an entity in scenario type ST1 to an entity in scenario type ST2 are declared by including them in the JDL file that defines ST1. In addition, visibility on scenario type ST2 must be declared by adding an import statement in the scenarioType block for ST1.

@Description("Data that yields a new plan")
scenarioType TransactionalData {
   import MasterData
}

The above allows the JDL file that contains this block to declare relations from entities of TransactionalData to entities of MasterData.

No cycles are allowed in the graph of scenario type imports and an import statement can only refer to a scenario type that is defined in one of the JDL files mentioned in the include statements of the application block.