How to model an inferred relationship
It is good practice to create a separate package to accommodate these relationships.
The following steps describe how to create a separate package for an inferred relationship.
- In the Project Explorer, right-click the model and select .
- Enter a name for the new package. For example, ObjType Relationships.
- Add a class object and apply the <<PMP_ObjTyprRel>> stereotype.
- On the Properties page, set the Name(Type) and Sub Type.
- Repeat the previous steps for another object type.
- Add a directed relationship between the two and apply the <<PMP_Relation>> stereotype.
- Use the Role fields to add the category and key
Category,Key
.
The following figure shows an example of the Project Explorer user interface for this scenario.
For this example, the extractor produces the following upsert statement:
CALL UPSERT_OBJTYPEREL (
'FTM Sample App',
'1.0.1',
'TRANSMISSION', -- Object 1 Name(Type)
'PAYMENT_ACK', -- Object 1 SubType
'CSM', -- Object 1 Category
'TransactionId', -- Object 1 Key
'TRANSMISSION', -- Object 2 Name(Type)
'PAY_ORIG', -- Object 2 SubType
'CSM', -- Object 2 Category
'OriginalTransactionId', -- Object 2 Key
'Contains',
'N',
'SCRIPT:ConfigData_output_FTM Sample App_20200401_190452.txt'
);