Bidirectional Data Synchronization
Last updated
Last updated
The "Bidirectional Data Synchronization" option is used for synchronizing data from the Source to Target and from the Target to the Source. All changes made on the Source are applied to the Target and all changes made on the Target are applied to the Source. This is also known as two-way data synchronization.
To perform "Bidirectional Data Synchronization" using the appRules Data Migration Engine, drag-and-drop the MigrateData workflow activity from the toolbox on to the designer and configure as follows:
Enter a display name and description for the workflow activity or accept the defaults.
Select "Bidirectional Data Synchronization" as the Data Migration Type.
Select the Default Source. If the Source data source does not exist, you can use the New Data Source button to add it.
Select the Default Target from the list. If the Target data source does not exist, you can use the New Data Source button to add it.
Click the OK button on the "Initialize Data Migration Activity" modal to accept the entries and continue.
The Target Entities selection modal will be displayed:
Select the Target entities into which Source data records will be synchronized.
Click OK and the "Target Entities Detail" modal will be displayed:
Complete the synchronization properties to be used for initializing the "Target Entities Collection" as follows:
Target Entity Name
Enter the name of the Target entity/table into which data records from the Source will be synchronized. This property is auto-generated.
Synch Source Entity
Enter the name of the Source entity/table whose data records are to be synchronized into the Target. This property is auto-generated.
Source CreatedOn Date
The column name of datetime the record was created if supported by the source.
Source ModifiedOn Date
The column name of datetime the record was modified if supported by the source.
Auto-Map
Whether to auto-map the source data fields to the target data fields.
Synchronize Deletions
Whether to include a target entity entry to synchronize deleted records. Check to make sure that the data source supports a flag in a table for deleted records.
Inserts & Updates
Configure the query to be used for reading records that have been recently inserted or updated on the source. Note: Follow instructions to define the query to be used for loading data records to be synchronized.
Deletions
If "Synchronize Deletions" has been checked, configure the query to be used for reading records that have been recently deleted on the source. Note: Follow instructions to define query to be used for loading data records to be synchronized.
The queries to be used to load records to be synchronized with the Target must be defined using "System Sourced Values" maintained by appRules:
WorkflowCurrentStartDateTime
The start date/time of the currently executing instance
WorkflowLastStartDateTime
The start time of the last run of the project
To create the query for synchronizing inserts and updates for a specific entity, click the "Inserts & Updates" column on the specific row.
Note that the WorkflowLastStartDateTime and WorkflowCurrentStartDateTime have been inserted into the query.
You can modify the query to suit your needs using the toolbar buttons of the Query Editor. Use the Insert button to insert values to be generated at runtime.
To create the query for synchronizing deletions for a specific entity, click the "Deletions" column on the specific row.
Note that the WorkflowLastStartDateTime and WorkflowCurrentStartDateTime have been inserted into the query.
You can modify the query to suit your needs using the toolbar buttons of the Query Editor. Use the Insert button to insert values to be generated at runtime
Clck the OK button and the following message will be displayed:
Follow the same steps above that was used to configure Source-to-Target synchronization properties to configure Target-To-Source synchronization properties.
Once you complete the entries for bidirectional data synchronization, click the OK button to display the Target Entities Collection:
The Target Entities Collection for bidirectional data synchronization contains entries for Source-to-Target and Target-to-Source settings.
Refer to the Target Entities Collection section for notes on configuring the target entities including the table creation properties.
Configure all required properties of the Target Entities Collection.
Run your data synchronization project after configuring, reviewing, and saving the Target Entities Collection.