Within a synchronization process, a step may exist that handles the mapping of data from one object to another.
In Data Exchange Framework, a synchronization process is modeled in a pipeline. A pipeline is made up of pipeline steps. A specific type of pipeline step, Apply Mappings Pipeline Step, is used to control the mapping of data.
In this topic:
The pipeline step Apply Mappings involves the following components:
- Source object - the object data is read from
- Target object - the object data is written to
- Value mapping set - instructions that specify what to read from the source object and what to write to the target object
The following information is configured on the pipeline step:
- Location of the source object
- Location of the target object
- The value mapping set to use
The pipeline step implements the following logic:
- Read the source object from the location specified on the pipeline step.
- Read the target object from the location specified on the pipeline step.
- Read the value mapping set specified on the pipeline step.
- Apply the value mapping set.
What “apply the value mapping set” does depends on the type of value mapping set used. Data Exchange Framework includes a standard value mapping set, but developers can implement custom ones.
The standard value mapping set iterates the value mappings assigned to the value mapping set. For each value mapping, the following logic runs:
- Gets the source value accessor assigned to the value mapping.
- Gets the value reader from the source value accessor.
- Uses the value reader to read a value from the source object.
- If the source value transformer is assigned to the value mapping, it is used to transform the value that was read from the source object.
- Gets the target value accessor assigned to the value mapping.
- Gets the value writer from the target value accessor.
- Uses the value writer to write the value to the target object.