Identity Manager

D1IM 7.1.2 templates are not working when creating an object via script

Hi

Since we have migrated our System from 6.1.3 to 7.1.2 we have the problem with some custom sync scripts, because they try to create a new object in the tables UNSAccountB and UNSGroupB. But the creation process fails due to not working template for the column DistinguishedName in both tables.

I have checked the behaviour in the Debugger and in the ObjectBrowser with the same properties. In the Visual Studio Debugger the DN was not build after alle required properties were set and although I have done an ExecuteTemplate. In the ObjectBrowser the template was executed sucessfully after I have entered the first properties  UID_UNSRootB, AccountName and CN (same properties that will be set by the script).

As workaround we also set the DN within the script, but that cannot be the answer!

So, I hope that someone of you can give me the answer how we can fix the problem that templates will also work by creating an object from a script.

Thanks a lot!

-
Regards
Sven

Parents
No Data
Reply
  • Hi Markus

    Yes, we are using the container structure. It has been set as default by the M61 during the migration.

    And I think that is the problem, because in 6.1.3 the DN was not a mandatory field, but with the new "Container structure" feature the Customizer declares the DN automatically to a mandatory field. And we have nothing changed at the template, so we are still using the standard template delivered with 7.1.2 that still contains the condition for checking the Connection.Variables("FULLSYNC").

    Do you have an idea what can be the best solution for that Problem? I have changed the first condition of the Standard template, so that basically the template will not executed during a fullsync unless a new account will be created. What Do you think?

    If  Not CBool(Variables.Get("FULLSYNC")) OrElse ( CBool(Variables.Get("FULLSYNC")) AndAlso Not $[IsLoaded]:Bool$ ) Then
    
    	If  Not String.IsNullOrEmpty($UID_UNSRootB$) AndAlso _
    		Not String.IsNullOrEmpty($cn$) Then
    		' If targetsystem is configured to use containers
    		If $FK(UID_UNSRootB).UsesContainer:Bool$ Then
    			If string.IsNullOrEmpty($UID_UNSContainerB$) Then
    				Value = TSB_CreateDN( _
    					"CN", _
    					$cn$,$FK(UID_UNSRootB).DistinguishedName$)
    			Else
    				Value = TSB_CreateDN( _
    					"CN", _
    					$cn$,$FK(UID_UNSContainerB).DistinguishedName$)
    			End If
    		Else
    			' No containers are used, only calculate an initial value once
    			If Not $[IsLoaded]:Bool$ AndAlso string.IsNullOrWhiteSpace(Cstr(Value)) Then
    				Value = TSB_CreateDN("user",$cn$,$FK(UID_UNSRootB).DistinguishedName$)				
    			End If
    		End If
    	End If
    
    End If

    Is there also a possibility to reconfigure an existing UNSRootB to unset the option container structure?

    -
    Regards
    Sven

Children
No Data