IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Defining and transforming data > Create relationships > Static relationships > Invoking static relationships from maps
Calling static relationships from an inbound map
You can invoke a static relationship by calling it from an inbound map.
To call a static relationship from an inbound map, follow these steps:
Procedure
- Create a map called SAPAddressToAddress (for example).
- Create a custom transformation from SAPAddress to Address:
This custom transformation will call the static relationship API.
- Click Details on the Properties tab. This will show the Java code window.
- Call the retrieveInstanceIds API passing in the relationshipName, roleName and the input business object. A list of instanceIds will be returned. If that in this example, this is a one to one relationship, therefore, there will be only one value in the list. Also note that when passing in relationship and role names into the APIs, they must be prefixed with the namespace. In the example, "http://Test/StateRelationship" and "http://Test/SAPAddressRole" are used.
- Set the instanceId value to the state property in output business object Address.
- In the outbound map, AddressToClarifyAddress, use this state value from Address to get the state value for ClarifyAddress.
- To do this, the piece of custom code above will need the following imports shown below. Click Java Imports on the Properties tab: