How to resolve different types of conflicts

Resolving RECORD_aLREADY_eXISTS type conflict

This type of conflict happens when CDV tries to perform an Insert operation on a record which already exists in the database. You can resolve this type of conflict in any of the following ways:

  • Remove the entire <Audit> element to suppress the change.
  • Modify the <Audit> element and make it an Update operation instead of an Insert operation. This can be done by searching for the FoundOldValue attribute within the <ConflictAttribute> element and setting it to match the value mentioned in the <OldValue> attribute within the <Audit> element. After this, change the value of the Operation attribute within the <Audit> element from Insert to Update.

Resolving RECORD_dOES_nOT_eXIST type conflict

This type of conflict happens when CDV tries to perform an Delete or Update operation on a record which does not exist in the database. You can resolve this type of conflict in any of the following ways:

  • Remove the entire <Audit> element to suppress the change.
  • Create the expected record in the target database. This can be done with the help of Sterling Order Management System Software UI or API, or running the CDT.

Resolving RECORD_cHANGED type conflict

This type of conflict happens when CDV tries to perform an Update operation on a record whose value has already changed in the database. You can resolve this type of conflict in any of the following ways:

  • Remove the entire <Audit> element to suppress the change.
  • Create or modify the value of OldValue attribute to match the value of FoundOldValue attribute within the <ConflictAttribute> element and change the value of NewValue attribute if you want to change the value.

    Below is a sample <Audit> element entry from the ydkversionexport.xml file:

    
       <Audit AuditKey="20081219134644594514" Operation="Insert" 
       TableKey="20081219134644594512" TableName="YFS_QUEUE_SUBSCRIPTION"> 
       <AuditDetail AuditType="QueueSubscription"> 
       <IDs> 
       <ID DataType="class java.lang.String" Name="QueueKey"
    Value="20081110160649488514"/> 
       </IDs> 
       <Attributes> 
       <Attribute DataType="class com.yantra.yfc.date.YTimestamp" 
       Name="Createts" NewValue="20081219134644"/> 
       <Attribute DataType="class com.yantra.yfc.date.YTimestamp" 
       Name="Modifyts" NewValue="20081219134644"/> 
       <Attribute DataType="class java.lang.String" Name="UserKey"
    NewValue="20051121111734438480"/> 
       </Attributes> 
       </AuditDetail> 
       <Conflict ConflictDescription="Record already exists"
    ConflictType="RECORD_ALREADY_EXISTS"> 
       <ConflictAttribute ExpectedOldValue="" 
       FoundOldValue="20081219134644594512" 
       Name="QueueSubscriptionKey" NewValue="20081219134644594512"/> 
       <ConflictAttribute ExpectedOldValue="" FoundOldValue="" 
       Name="Createts" NewValue="2008-12-19T13:46:44+00:00"/> 
       <ConflictAttribute ExpectedOldValue="" FoundOldValue="" 
       Name="Modifyts" NewValue="2008-12-19T13:46:44+00:00"/> 
       </Conflict> 
       </Audit>