Primavera Gateway providers can be customized to add custom field-mappings, parameters, and steps in business flows. Flexible object mapping is another powerful provider customization feature that allows you define and create new business object mappings between the source and destination provider applications based on your organization's data requirements.
By using this feature, you are no longer limited to only working with the business object mappings supported and delivered within Gateway. Define flexible object mapping to create custom business object mappings to deliver customized solutions to support extensive use-case scenarios to manipulate and share data between applications at the business object level.
For example, you can use this feature to convert specific roles in the Sample to Resources in P6 by defining a custom object mapping between a Role object in Sample provider and the Resource object in P6.
To add flexible object mappings:
- Adding new objects or fields in the Gateway data dictionary and the relevant provider dictionary from the Gateway user interface.
In an on-premises environment, you can also modify the provider code to support the new object mappings to ensure Gateway pushes the data to the destination provider.
- Create a customization XML file containing the new object mappings for the business objects on the source side as follows:
- Add custom XRef elements and create the business object mappings between the source provider and the destination provider.
For example, the Role object in the Sample provider is mapped to the Role object in Gateway and P6 providers. To create a new flexible object mapping to map the Role object in the Sample provider to the Resource object in Gateway and P6 providers, define a new XRef mapping between the Role object on the Sample (source) side and the Resource object on the Gateway (source) side using the CustomXRef element as shown below:
<CustomXRef>
<XRefDefinition>
<AppName>Sample</AppName>
<XRefObjectDefinition>
<AppObjectName>Role</AppObjectName>
<PDIObjectName>Resource</PDIObjectName>
<AppKeyFieldName>ElementId</AppKeyFieldName>
</XRefObjectDefinition>
</XRefDefinition></CustomXRef>
- Import the customization file into Gateway.
- Create field-mapping templates to support the custom XRefs defined above in the Gateway user interface as shown in the code snippet below:
<FieldMapTemplates>
<App1Name>Sample</App1Name>
<App2Name>P6</App2Name>
<FieldMapTemplate>
<Description>Role To Resource Field Mappings</Description>
<App1BusinessObjectName>Role</App1BusinessObjectName>
<App2BusinessObjectName>Resource</App2BusinessObjectName>
<Name>Role To Resource Mappings</Name>
<PDIBusinessObjectName>Resource</PDIBusinessObjectName>
<FieldMap>
<App1>RoleId</App1>
<App2>Id</App2>
<PDI>Id</PDI>
</FieldMap>
<FieldMap>
<App1>RoleName</App1>
<App2>Name</App2>
<PDI>Name</PDI>
</FieldMap>
</FieldMapTemplate>
</FieldMapTemplates>
- Add or edit business flows that use the field-mapping templates containing the flexible object mappings.
- Create synchronizations that use the business flows.
For a detailed example, see the Primavera Gateway Online Help.
- Add custom XRef elements and create the business object mappings between the source provider and the destination provider.