Compare Step

The import step results in the creation of one or more migration objects. Typically, one migration record is created for each record selected in the export based on the export's migration request and its configuration. Related objects are grouped together in migration transactions.

When importing a high volume data set of business entities, the user may request to import entities in bulk mode for performance reasons. In this mode, a single Migration Object record may contain multiple entities from the file. Refer to bulk import mode for more information.

The next step in the import process is the Comparison step. In this step, the data captured by the import file for each object is compared to the view of that object in the target environment.

To cater for a possible large volume of objects, the comparison is done via a batch monitor. To aide in performance of the process, the monitor is performed on the migration objects so that it can be run multi-threaded. Once the objects are finished with the comparison, the migration transactions and the migration data set should be updated with an appropriate overall status before continuing to the next step. As a result, the comparison actually requires three steps: Migration Object Comparison, Migration Transaction Status Update and Migration Data Set Export Status Update. The steps are explained in detail in the following sections.

Note: Refer to Running Batch Jobs for more information about streamlining the various steps in the process.

Migration Object Compare

This is the main step of the comparison. The Migration Object Monitor (F1–MGOPR) selects pending migration object records and transitions them to Comparing. This is a transitory state that includes the algorithm that does the work of comparing. There are various possible outcomes that could occur based on the logic in the algorithm. The following diagram illustrates a portion of the migration object lifecycle that pertains to comparison.

Note:

When using separate batch processes for business data the Migration Object Monitor (Business) process (F1-MGOPB) works in the same way to compare business migration objects.

Migration Object Comparison Lifecycle

The following points describe the lifecycle.

  • When Pending records are selected by the monitor batch job, it transitions to Comparing. If the migration object refers to one or more pre-compare algorithms, they are executed to adjust the data prior to comparison. Then algorithm will determine the appropriate next state by comparing the source data to the target data.

  • Entity related notes:
    • If the record in the migration object is found in the target environment and the data is exactly the same, the record transitions to Unchanged (with the object action value also set to Unchanged).

    • If the record in the migration object is found in the target environment and the data is different, the algorithm sets the object action value to Change and generates the appropriate SQL to be used later in the Apply step to update the record. It then transitions to Approved, Needs Review or Rejected based on the Default Status For Change setting captured on the Data Set.

    • If the record in the migration object is not found in the target environment, the algorithm sets the object action value to Add and generates the appropriate SQL to be used later in the Apply step to insert the record. It then transitions to Approved, Needs Review or Rejected based on the Default Status For Add setting captured on the Data Set.

    • When the import is performed in bulk mode each included entity is compared separately but the overall status of the record is set as follows:
      • If all included entities are unchanged then the migration object record transitions to Unchanged (with the object action value also set to Unchanged).

      • If all included entities are either unchanged or changed then the object action value is set to Change), corresponding SQLs are generated for the changed entities only and the migration object transitions based on the Default Status For Change setting captured on the Data Set.

      • If all included entities are either unchanged or new then the object action value is set to Add), corresponding SQLs are generated for the new entities only and the migration object transitions based on the Default Status For Add setting captured on the Data Set.

      • If some of the included entities are new and some changed then the object action value is set to Mixed Actions), corresponding SQLs are generated for the each entity and the migration object transitions based on the Default Status For Change setting captured on the Data Set.

  • If there is any issue with attempting to parse the object data from the import, the record transitions to Error Comparing.

  • If there is any reason that the imported object is not valid for import, the record transitions to Cannot Apply. The log will be updated with the error that caused the record to transition to this state. An example is that perhaps the record was exported in a different version of the product and has additional elements that are not recognized in this version.

Note: Refer to Cancelling a Data Set for information about cancelling a data set and its impact on its related objects.

Migration Transaction Status Update

After the import step, the migration transaction remains in the Pending state until all its objects have completed the comparison step. At that point, the status of the transactions should be updated based on the results of their objects. The Migration Transaction Monitor (F1–MGTPR) selects pending migration transaction records and runs its monitor algorithms. There are various possible outcomes that could occur based on the logic in the algorithms. The following diagram illustrates a portion of the migration transaction lifecycle that pertains to comparison.

Migration Transaction Comparison Lifecycle

The following points describe the lifecycle possible next states after Pending.

  • If any related migration object is in the Error Comparing state, the transaction transitions to Error Comparing.

  • If all related migration objects are in the Unchanged state, the transaction transitions to Unchanged.

  • Otherwise, the transaction transitions to Ready to Apply. This means that at least one object is in an “apply-able” state.

The transaction remains in the Ready to Apply state until a user has approved the data set to move to the Apply step and the transaction’s related objects have attempted to apply themselves. This is described in more detail below.

Note: Refer to Cancelling a Data Set for information about cancelling a data set and its impact on its related objects.

Migration Data Set Import Status Update

Once all the objects and all transactions have been updated via the previous two steps, the migration data set export must be updated based on the results of their transactions. The Migration Data Set Import Monitor (F1-MGDIM) selects Ready to Compare data sets and runs its monitor algorithms. Note that this is the same monitor process that is used to select Pending data sets. There are various possible outcomes that could occur based on the logic in the algorithms. The following diagram illustrates the portion of the migration transaction lifecycle that pertains to comparison.

Migration Data Set Comparison Lifecycle

The following points describe the lifecycle possible next states after Ready to Compare.

  • If any related migration transactions is in the Error Comparing state, the data set transitions to Error.

  • If all related migration transactions are in the Unchanged state, the data set transitions to Unchanged.

  • Otherwise, the transaction transitions to Awaiting Approval. This means that there are no errors and at least one object is in an “apply-able” state.

The data set remains in the Awaiting Approval state until a user decides that the data set and all its records are ready to progress to the Apply step.

Note: A user can choose to cancel a data set at any time while it is in progress. Refer to Cancelling a Data Set for more information.