Adding Custom Java Field Mapping for On-Premises

When the field mapping is not as simple as one-to-one, you can use a custom Java field mapping mechanism. Using a custom Java field mapping involves creating a class that implements the CustomFieldMap interface. When you implement the CustomFieldMap interface, you have control of the source object and the target object which permits you to write logic that involves more than one field. The SampleResourceCustomFieldMap class (under com.mycompany.primavera.integration.custom.java package) is a simple custom Java field mapping example in the sample customization project that concatenates the ResourceId and EmployeeName fields of Resource in the Host side and puts the concatenated field into the Name field of Resource in the PDI side. This class is defined in the customization.xml in the following section:

<JavaCustomizationMapping>

<App1Name>Sample</App1Name>

<App2Name>P6</App2Name>

<FieldMapping>

<Description>Resource Java Field Mapping</Description>

<App1BusinessObjectName>Resource</App1BusinessObjectName>

<App2BusinessObjectName>Resource</App2BusinessObjectName>

<Name>SampleResourceCustomFieldMap</Name>

<PDIBusinessObjectName>Resource</PDIBusinessObjectName>

<Fields>

<App1>

<Name>EmployeeName</Name>

</App1>

<App2><Name>Name</Name>

</App2>

</Fields>

</FieldMapping>

</JavaCustomizationMapping>



Legal Notices | Your Privacy Rights
Copyright © 2013, 2022

Last Published Monday, January 31, 2022