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

Q1IM: Fullsync Flag not Recognized in Process Head Generating Condition

Hello all,

I'm currently working on debugging a synchronization script for a connected system. At one point during the script, role assignments in the connected system are reconciled with our representations of the role assignments (stored in the UNSAccountBInUNSGroupBTotal table); the goal here is to recondile any access to roles added outside the IDM system. When the sync process isn't running, any insert into this table will fire a process called "AJG_JDE_AddRoleAssignment", which will in turn trigger a web service call to the connected system to add the role assignment to the user. Obviously, during the sync, we don't want the web service call to fire since it will attempt to add access already reflected in the target system, so our solution was to set the "FULLSYNC" flag in the sync script as follows (NOTE: We are placing role assignments added through the sync into the "UNSAccountBInUNSGroupB" table rather than in the total table for auditing purposes, but the insert there ultimately triggers an insert into the total table):

'Set FULLSYNC flag to True to avoid process generation during save

Connection.Variables("Fullsync") = "true"

Connection.BeginTransaction()

Try

Dim newRoleAssignment As ISingleDbObject = Connection.CreateSingle("UNSAccountBInUNSGroupB")

newRoleAssignment("UID_UNSGroupB").NewValue = workingIDMRole.GetValue("UID_UNSGroupB").String

 newRoleAssignment("UID_UNSAccountB").NewValue = IDMUser.GetValue("UID_UNSAccountB").String

 newRoleAssignment.Save()

 Connection.CommitTransaction()

 Connection.Variables.Remove("Fullsync")

          

Catch ex As Exception

If Connection.TransactionOpen Then

Connection.RollbackTransaction()

End If

AJG_Connected_JDE_Sync_WriteLog(StartTime,MsgSeverity.Warning, String.Format("The assignment of the {0} {1} could not be committed to the database - Instance: {2}, UserID: {3}", roleType, workingJDERole.RoleName, localInstanceName, JDEUser.UserID))

Connection.Variables.Remove("Fullsync")

End Try


The process head for "AJG_JDE_AddRoleAssignment" (Table: UNSAccountBInUNSGroupBTotal; Event: INSERT_SYNC) contains the following generating condition:

Value =

Not CBool(Connection.Variables("FULLSYNC")) _

AndAlso $FK(XProxyContext).NamespaceManagedBy$ = "Generic" _

AndAlso Not $FK(XProxyContext).IsNoWrite:Bool$ _

AndAlso $XProxyContext$.StartsWith("JDE_") _

AndAlso Not String.Equals($FK(UID_UNSGroupB).AJG_CustomAttribute03$, "D", StringComparison.InvariantCultureIgnoreCase)

The problem here is that the process is generating each time, regardless of the generating condition, triggering an unwanted web service call. What are we doing wrong?

Parents Reply
  • I tried but no luck

    I read on forum that viadmin user can not set XOrigin , but actually my script does not complain when I run it from Designer.

    I also tried to run it from process but nothing changed.

    I will try to reproduce the problem in another environment, although my environment is almost vanilla

Children
No Data