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

Available scripts and objects in synchronization engine mapping scripts

 I am not finding any documentation that discusses the available scripts, objects, and functions that are able to be referenced from within a synchronization engine mapping script.  I would like to be able to reference the custom schema type (filter), the mapping object name, or other properties of the mapping or workflow that should be available at run time.  The goal in this scenario is to be able to connect to an LDAP system that doesn't natively have groups exposed.  I have created a custom filtered schema class and a mapping that references the new class, but the value for vrtStructuralObjectClass (in browse) shows the parent schema class instead of the one selected during the mapping creation.  I need some way of determining which mapping is currently running so that I can use that information in a property mapping script (OU selection).

Parents
  • Hi Markus,

    Sorry to jump in on this and poach the question - I have a real world example!

    Suppose a DN for a custom target system container needs to be generated using the CN and Ident_UNSRoot for top level containers, e.g. ou=MyContainer, system=MySystem. That's easy enough but if there are nested containers then you need some way to generate  
    ou=MyContainer, ou=MyParentContainer, ou=MyGrandparent, system=MyTargetSystem

    As a demonstration of what I mean, here's some generic code from the READ side of a custom property in a sync project. It works fine for me as my code doesn't need to support nested containers, but if the code did need to do that...

    currentCN = $CN$
    currentDN = $DistinguishedName$
    CurrentIdent = "MyTargetSystem"
    parentContainer = $ParentCN$
    container placement

    If LEN(currentDN) > 1 THEN
        ' Application set the DN internally so target system is master, OR
        ' a container was created in Manager tools, so Identity Manager is master

        returnDN = currentDN    
    Else
        ' We need to create a distinguishedname otherwise the sync will fail.
        If LEN(CurrentIdent) > 1 AND LEN(currentCN) > 1 THEN
            If LEN(parentContainer) > 1 then
                ' no parent container, so DN is container CN + Ident_UNSRoot
                returnDN = "ou="& currentCN & ", system=" & CurrentIdent
            else
            'we need to create a DN which includes CNs for parent containers, by iteration

                 ??????????????????
                 ??????????????????
                 ??????????????????
                 ??????????????????
     

            end if
        Else
            returnDN = ""
        End If
    End if
    return returnDN

    How would I reference the CN of the parent, grandparent etc? I do know that various functions and scripts I'd expect to work without any problem in this code block, don't. I'm only using LEN because if I use IsNullOrEmpty the compiler throws this error:

    [1777156] The following errors occured while compiling:
    BC30451: 'IsNullOrEmpty' is not declared. It may be inaccessible due to its protection level.

Reply
  • Hi Markus,

    Sorry to jump in on this and poach the question - I have a real world example!

    Suppose a DN for a custom target system container needs to be generated using the CN and Ident_UNSRoot for top level containers, e.g. ou=MyContainer, system=MySystem. That's easy enough but if there are nested containers then you need some way to generate  
    ou=MyContainer, ou=MyParentContainer, ou=MyGrandparent, system=MyTargetSystem

    As a demonstration of what I mean, here's some generic code from the READ side of a custom property in a sync project. It works fine for me as my code doesn't need to support nested containers, but if the code did need to do that...

    currentCN = $CN$
    currentDN = $DistinguishedName$
    CurrentIdent = "MyTargetSystem"
    parentContainer = $ParentCN$
    container placement

    If LEN(currentDN) > 1 THEN
        ' Application set the DN internally so target system is master, OR
        ' a container was created in Manager tools, so Identity Manager is master

        returnDN = currentDN    
    Else
        ' We need to create a distinguishedname otherwise the sync will fail.
        If LEN(CurrentIdent) > 1 AND LEN(currentCN) > 1 THEN
            If LEN(parentContainer) > 1 then
                ' no parent container, so DN is container CN + Ident_UNSRoot
                returnDN = "ou="& currentCN & ", system=" & CurrentIdent
            else
            'we need to create a DN which includes CNs for parent containers, by iteration

                 ??????????????????
                 ??????????????????
                 ??????????????????
                 ??????????????????
     

            end if
        Else
            returnDN = ""
        End If
    End if
    return returnDN

    How would I reference the CN of the parent, grandparent etc? I do know that various functions and scripts I'd expect to work without any problem in this code block, don't. I'm only using LEN because if I use IsNullOrEmpty the compiler throws this error:

    [1777156] The following errors occured while compiling:
    BC30451: 'IsNullOrEmpty' is not declared. It may be inaccessible due to its protection level.

Children
No Data