This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Sync Project - inserting objects works but not the update

Hi Experts, 

I'm having a really bad time trying to make a synchronization project to work. Almost there but can't find the missing configuration to make the update work when calling the synchronization workflow from a process (ADHocProjection). 

I have the following:

  • SQL DB Sync project
  • Using stored procedures for Insert/Update/Delete. For the updates I'm using "Script based" data operations, and "Pattern based" for Inserts and Deletes.
  • Sync project is being used for Provisioning only (1IM > Target System)
  • Adding or updating an object works fine from the "Target system>Browse" functionality within the Synchronization Editor.
  • Running a simulation or executing the sync workflow works fine. Meaning it detects when is an insert/update on an object and it runs the Stored Procedures defined.
  • (Tricky part) the mapping is between 1IM.UNSAccountBInUNSGroupB > DBTargetSystem.Accounts, since Account and Role membership represents an Account in the target system.
    • User can be a member of only one role (UNSGroupB) at the time.
    • Insert is triggered when there is a new record in UNSAccountBInUNSGroupB and there is no matching Account in the target system.
    • Update "should" be trigger when there is a new record in UNSAccounBInUNSGroupB but there is already an Account in the target system.
  •  When running the Sync workflow from a process task (on insert in UNSAccounBInUNSGroupB table) the provisioning log shows: "There are no changed objects logged for this synchronization log". This only happens when the Account exists in the Target System, so when it suppose to run an update and not an insert. 

Any suggestions? Tips?

Thanks,

JM 

Parents
  • Hi,

    A couple of points to check.  

    You are receiving an Insert event and then you want an Update action to happen.  I wonder if we have a good match between the Event passed to Get_AdHocData() in your Process chain pre-script and the definition of the Provisioning process operation?  If the values don't match (below they do match: Insert and Insert) then it will think there is nothing to do. 

     

    Another point, in general one would rather use the ASSIGN/REMOVE events for handling M:N tables.  The reason is that there are state attributes on that table that can be Updated.  So by looking just to Insert/Delete, we might miss or be late to process, some membership events.  

    If you move to ASSIGN/REMOVE events then that would also have to align correctly.  If needed, there is an example with the Azure Connector pre-script where it transforms ASSIGN/REMOVE to INSERT/DELETE before calling Get_AdHocData(), so that the Provisioning process operation would have 'Insert' in it.

    Dim evt as String = EventName
    If evt.Equals("Assign", StringComparison.OrdinalIgnoreCase) _
    OrElse evt.Equals("HandleOutStanding", StringComparison.OrdinalIgnoreCase) then
      evt = "Insert"
    ElseIf evt.Equals("Remove", StringComparison.OrdinalIgnoreCase) then
      evt = "Delete"
    End If

    Imports System.Collections.Generic
    Dim data As IDictionary(Of String,string) = DPR_GetAdHocData( _
    $FK(UID_AADUser).FK(UID_AADOrganization).XObjectKey$, _
    "AzureAD","",evt)

    hth,

    Rob.

Reply
  • Hi,

    A couple of points to check.  

    You are receiving an Insert event and then you want an Update action to happen.  I wonder if we have a good match between the Event passed to Get_AdHocData() in your Process chain pre-script and the definition of the Provisioning process operation?  If the values don't match (below they do match: Insert and Insert) then it will think there is nothing to do. 

     

    Another point, in general one would rather use the ASSIGN/REMOVE events for handling M:N tables.  The reason is that there are state attributes on that table that can be Updated.  So by looking just to Insert/Delete, we might miss or be late to process, some membership events.  

    If you move to ASSIGN/REMOVE events then that would also have to align correctly.  If needed, there is an example with the Azure Connector pre-script where it transforms ASSIGN/REMOVE to INSERT/DELETE before calling Get_AdHocData(), so that the Provisioning process operation would have 'Insert' in it.

    Dim evt as String = EventName
    If evt.Equals("Assign", StringComparison.OrdinalIgnoreCase) _
    OrElse evt.Equals("HandleOutStanding", StringComparison.OrdinalIgnoreCase) then
      evt = "Insert"
    ElseIf evt.Equals("Remove", StringComparison.OrdinalIgnoreCase) then
      evt = "Delete"
    End If

    Imports System.Collections.Generic
    Dim data As IDictionary(Of String,string) = DPR_GetAdHocData( _
    $FK(UID_AADUser).FK(UID_AADOrganization).XObjectKey$, _
    "AzureAD","",evt)

    hth,

    Rob.

Children
No Data