Once you have created a relationship definition within Relationship Designer Express, you are ready to implement the relationship within the map. For instructions on creating relationship definitions, see Creating relationship definitions.
To implement a relationship, you can use the relationship function blocks in the map's destination object or add Mapping API methods to the code of attributes in the map's destination object.
Table 89 shows the function blocks to use.
Table 89. Relationship function blocks
Kind of relationship | Function block | For more information |
---|---|---|
Lookup | General/APIs/Relationship/Retrieve Instances
General/APIs/Relationship/Retrieve Participants | "Using lookup relationships" |
Simple Identity | General/APIs/Identity Relationship/Maintain Simple Identity Relationship
General/APIs/Identity Relationship/Maintain Child Verb | "Using simple identity relationships" |
Composite Identity | General/APIs/Identity Relationship/Maintain
Composite Relationship General/APIs/Identity Relationship/Maintain Child Verb General/APIs/Identity Relationship/Update My Children (optional) | "Using composite identity relationships" |
Custom | General/APIs/Relationship/Create Relationship
General/APIs/Identity Relationship/Add My Children General/APIs/Relationship/Add Participant |
|
Table 89 shows the Mapping API methods that maintain the different
kinds of relationships.
Table 90. Mapping API methods for relationships
Kind of relationship | Mapping API method | For more information |
---|---|---|
Lookup | retrieveInstances()retrieveParticipants() | "Using lookup relationships" |
Simple Identity | maintainSimpleIdentityRelationship()
maintainChildVerb() | "Using simple identity relationships" |
Composite Identity | maintainCompositeRelationship()maintainChildVerb()
updateMyChildren() (optional) | "Using composite identity relationships" |
Custom | create()addMyChildren()addParticipant() | "Maintaining custom relationships" |
When transforming relationship attributes, a map needs to know the calling context of the map. To determine the calling context, the map needs the following information from the map execution context:
For more information, see "Calling contexts".
These two factors tell the map what actions need to be taken on the relationship tables.
For the relationships in Table 89, the associated Mapping API methods perform the appropriate operations on the relationship tables. Therefore, these methods require that the calling context and business object verb be passed in as arguments.