<resource xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
          xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
          xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3"
          xmlns:org="http://midpoint.evolveum.com/xml/ns/public/common/org-3"
          xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
          xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"
          xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          oid="75c197a9-1071-4ac8-b8c0-414b1c8eb4f1">
    <name>AD first steps</name>
    <description>AD resource advanced example</description>
    <documentation>
        This is a Active Directory resource template for training purposes:
        * It supports accounts (`inetOrgPerson`,`user`,`msDS-ManagedServiceAccount`) and groups (`group`).
        * The resource is configured as outbound (provisioning) with strong outbound mappings.
        * All mappings are by default disabled (lifecycleState=draft), resource itself, object types and synchronization configuration are prepared for simulation (lifecycleState=proposed), where available.
        * Support for group membership association and group creation.
    </documentation>
    <lifecycleState>active</lifecycleState>
    <indestructible>true</indestructible>
    <template>false</template>
    <abstract>false</abstract>
    <connectorRef relation="org:default" type="c:ConnectorType">
        <filter>
            <q:text>connectorType='com.evolveum.polygon.connector.ldap.ad.AdLdapConnector' and available = true</q:text>
        </filter>
    </connectorRef>
    <connectorConfiguration xmlns:icfc="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/connector-schema-3">
        <icfc:connectorPoolConfiguration>
            <icfc:maxObjects>40000</icfc:maxObjects>
        </icfc:connectorPoolConfiguration>
        <icfc:configurationProperties xmlns:icfcldap="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/bundle/com.evolveum.polygon.connector-ldap/com.evolveum.polygon.connector.ldap.ad.AdLdapConnector">
            <icfcldap:host>hostname</icfcldap:host>
            <icfcldap:port>636</icfcldap:port>
            <icfcldap:connectionSecurity>ssl</icfcldap:connectionSecurity>
            <icfcldap:bindDn>adminDN</icfcldap:bindDn>
            <icfcldap:bindPassword>
                    <t:clearValue>password</t:clearValue>
            </icfcldap:bindPassword>
            <icfcldap:baseContext>DC=test-ad,DC=lab,DC=evolveum,DC=com</icfcldap:baseContext>
            <icfcldap:pagingStrategy>spr</icfcldap:pagingStrategy>
            <icfcldap:uidAttribute>objectGUID</icfcldap:uidAttribute>
            <icfcldap:operationalAttributes>member</icfcldap:operationalAttributes>
            <icfcldap:operationalAttributes>memberOf</icfcldap:operationalAttributes>
            <icfcldap:operationalAttributes>msDS-parentdistname</icfcldap:operationalAttributes>
            <icfcldap:operationalAttributes>manager</icfcldap:operationalAttributes>
            <icfcldap:operationalAttributes>managedBy</icfcldap:operationalAttributes>
            <icfcldap:operationalAttributes>adminDescription</icfcldap:operationalAttributes>
            <icfcldap:operationalAttributes>groupType</icfcldap:operationalAttributes>
            <icfcldap:operationalAttributes>employeeNumber</icfcldap:operationalAttributes>
            <icfcldap:includeObjectClassFilter>true</icfcldap:includeObjectClassFilter>
            <icfcldap:defaultSearchScope>sub</icfcldap:defaultSearchScope>
            <icfcldap:nativeAdSchema>true</icfcldap:nativeAdSchema>
            <icfcldap:includeObjectCategoryFilter>true</icfcldap:includeObjectCategoryFilter>
            <icfcldap:addDefaultObjectCategory>true</icfcldap:addDefaultObjectCategory>
            <icfcldap:allowFSPProcessing>true</icfcldap:allowFSPProcessing>
        </icfc:configurationProperties>
    </connectorConfiguration>
    <schema>
        <generationConstraints>
            <generateObjectClass>ri:group</generateObjectClass>
            <generateObjectClass>ri:organizationalUnit</generateObjectClass>
            <generateObjectClass>ri:user</generateObjectClass>
            <generateObjectClass>ri:msDS-ManagedServiceAccount</generateObjectClass>
        </generationConstraints>
    </schema>
    <schemaHandling>
        <objectType>
            <kind>account</kind>
            <intent>user</intent>
            <displayName>Default user</displayName>
            <lifecycleState>active</lifecycleState>
            <default>true</default>
            <delineation>
                <objectClass>ri:user</objectClass>
                <searchHierarchyScope>sub</searchHierarchyScope>
            </delineation>
            <focus>
                <type>c:UserType</type>
                <archetypeRef oid="00000000-0000-0001-0702-000000000100" relation="org:default" type="c:ArchetypeType"/>
            </focus>
            <attribute>
                <ref>ri:msDS-parentdistname</ref>
                <limitations>
                    <access>
                        <read>true</read>
                        <add>false</add>
                        <modify>false</modify>
                    </access>
                </limitations>
                <fetchStrategy>explicit</fetchStrategy>
            </attribute>
            <attribute>
                <ref>ri:employeeNumber</ref>
                <limitations>
                    <access>
                        <read>true</read>
                        <add>true</add>
                        <modify>true</modify>
                    </access>
                </limitations>
                <fetchStrategy>explicit</fetchStrategy>
                <outbound>
                    <name>set-personalNumber</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>strong</strength>
                    <source>
                        <path>personalNumber</path>
                    </source>
                </outbound>
                <inbound>
                    <name>get-personalNumber</name>
                    <lifecycleState>active</lifecycleState>
                    <condition>
                        <script>
                            <code>
                                return input != null
                            </code>
                        </script>
                    </condition>
                    <target>
                        <path>personalNumber</path>
                    </target>
                    <!--if used in correlation rule uncomment-->
                    <!--<use>correlation</use>-->
                </inbound>
            </attribute>
            <attribute>
                <ref>ri:dn</ref>
                <displayName>Distinguished Name</displayName>
                <modificationPriority>0</modificationPriority>
                <secondaryIdentifier>true</secondaryIdentifier>
                <volatilityTrigger>true</volatilityTrigger>
                <displayNameAttribute>true</displayNameAttribute>
                <outbound>
                    <name>set-dn</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>strong</strength>
                    <source>
                        <path>$focus/fullName</path>
                    </source>
                    <source>
                        <path>$focus/name</path>
                    </source>
                    <expression>
                        <script>
                            <code>
                                import com.evolveum.midpoint.util.exception.ExpressionEvaluationException
                                import com.evolveum.midpoint.util.exception.ObjectNotFoundException
                                String baseContext
                                String errorMsg
                                try {
                                    try {
                                        baseContext = basic.getResourceIcfConfigurationPropertyValue(resource, 'baseContext')
                                    } catch ( ObjectNotFoundException onf){
                                        errorMsg = "Empty \"Base Context\" attribute in resource configuration. Non empty value is required.\n" + onf.getMessage()
                                        log.error(errorMsg)
                                        throw new ObjectNotFoundException(errorMsg)
                                    }
                                    String fullNameVar
                                    if(midpoint.isUniquePropertyValue(focus, "fullName", fullName.toString())){
                                        fullNameVar =  fullName.toString()
                                    } else {
                                        fullNameVar = fullName.toString() + "(" + name.toString() + ")"
                                    }
                                    /*change DN suffix regarding to your deployment*/
                                    return basic.composeDnWithSuffix('CN', fullNameVar, "OU","Users","OU","FirstSteps", baseContext)
                                } catch (ExpressionEvaluationException expErr) {
                                    errorMsg = "Failed return value in outbound expression of attribute in resource configuration.\n" + expErr.getMessage()
                                    log.error(errorMsg)
                                    throw new ExpressionEvaluationException(errorMsg)
                                }
                            </code>
                        </script>
                    </expression>
                </outbound>
                <inbound>
                    <name>get-lifecycleState</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <expression>
                        <variable>
                            <name>effectiveStatus</name>
                            <path>$shadow/activation/effectiveStatus</path>
                        </variable>
                        <variable>
                            <name>administrativeStatus</name>
                            <path>$shadow/activation/administrativeStatus</path>
                        </variable>
                        <script>
                            <code>import com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationStatusType;
                                import com.evolveum.midpoint.schema.constants.SchemaConstants
                                if (administrativeStatus == ActivationStatusType.ENABLED){
                                    return SchemaConstants.LIFECYCLE_ACTIVE
                                } else if (administrativeStatus == ActivationStatusType.DISABLED) {
                                    return SchemaConstants.LIFECYCLE_ACTIVE
                                }</code>
                        </script>
                    </expression>
                    <target>
                        <path>lifecycleState</path>
                    </target>
                    <condition>
                        <script>
                            <code>input != null  &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </inbound>
            </attribute>
            <attribute>
                <ref>ri:sAMAccountName</ref>
                <displayName>Login name</displayName>
                <limitations>
                    <minOccurs>1</minOccurs>
                    <maxOccurs>1</maxOccurs>
                    <access>
                        <read>true</read>
                        <add>true</add>
                        <modify>true</modify>
                    </access>
                </limitations>
                <modificationPriority>0</modificationPriority>
                <secondaryIdentifier>true</secondaryIdentifier>
                <outbound>
                    <name>set-sAMAccountName</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <source>
                        <path>$focus/name</path>
                    </source>
                </outbound>
                <inbound>
                    <name>get-name</name>
                    <lifecycleState>active</lifecycleState>
                    <target>
                        <path>name</path>
                    </target>
                    <condition>
                        <script>
                            <code>input != null  &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </inbound>
                <inbound>
                    <name>get-name-correlation</name>
                    <lifecycleState>active</lifecycleState>
                    <target>
                        <path>name</path>
                    </target>
                    <use>correlation</use>
                </inbound>
            </attribute>
            <attribute>
                <ref>ri:sn</ref>
                <limitations>
                    <minOccurs>0</minOccurs>
                    <maxOccurs>1</maxOccurs>
                    <access>
                        <read>true</read>
                        <add>true</add>
                        <modify>true</modify>
                    </access>
                </limitations>
                <outbound>
                    <name>set-sn</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>strong</strength>
                    <source>
                        <path>familyName</path>
                    </source>
                    <condition>
                        <script>
                            <code>familyName!=null &amp;&amp; !familyName.isEmpty() &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </outbound>
                <inbound>
                    <name>get-familyName</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <target>
                        <path>familyName</path>
                    </target>
                    <condition>
                        <script>
                            <code>input != null</code>
                        </script>
                    </condition>
                </inbound>
            </attribute>
            <attribute>
                <ref>ri:givenName</ref>
                <limitations>
                    <access>
                        <read>true</read>
                        <add>true</add>
                        <modify>true</modify>
                    </access>
                </limitations>
                <matchingRule xmlns:mr="http://prism.evolveum.com/xml/ns/public/matching-rule-3">mr:stringIgnoreCase</matchingRule>
                <outbound>
                    <name>set-givenName</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>strong</strength>
                    <source>
                        <path>givenName</path>
                    </source>
                    <condition>
                        <script>
                            <code>givenName!=null &amp;&amp; !givenName.isEmpty() &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </outbound>
                <inbound>
                    <name>get-givenName</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <target>
                        <path>givenName</path>
                    </target>
                    <condition>
                        <script>
                            <code>input != null</code>
                        </script>
                    </condition>
                </inbound>
            </attribute>
            <attribute>
                <ref>ri:displayName</ref>
                <limitations>
                    <access>
                        <read>true</read>
                        <add>true</add>
                        <modify>true</modify>
                    </access>
                </limitations>
                <matchingRule xmlns:mr="http://prism.evolveum.com/xml/ns/public/matching-rule-3">mr:stringIgnoreCase</matchingRule>
                <outbound>
                    <name>set-displayName</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <source>
                        <path>fullName</path>
                    </source>
                    <condition>
                        <script>
                            <code>fullName!=null &amp;&amp; !fullName.isEmpty() &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </outbound>
            </attribute>
            <attribute>
                <ref>ri:cn</ref>
                <limitations>
                    <access>
                        <read>true</read>
                        <add>true</add>
                        <modify>true</modify>
                    </access>
                </limitations>
                <matchingRule xmlns:mr="http://prism.evolveum.com/xml/ns/public/matching-rule-3">mr:stringIgnoreCase</matchingRule>
                <outbound>
                    <name>set-cn</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>strong</strength>
                    <source>
                        <path>fullName</path>
                    </source>
                    <source>
                        <path>$focus/name</path>
                    </source>
                    <expression>
                        <script>
                            <code>String fullNameVar
                                    if(midpoint.isUniquePropertyValue(focus, "fullName", fullName.toString())){
                                        fullNameVar =  fullName.toString()
                                    } else {
                                        fullNameVar = fullName.toString() + "(" + name.toString() + ")"
                                    }
                                    return fullNameVar</code>
                        </script>
                    </expression>
                    <condition>
                        <script>
                            <code>fullName!=null &amp;&amp; !fullName.isEmpty() &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </outbound>
                <inbound>
                    <name>get-cn</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <target>
                        <path>fullName</path>
                    </target>
                    <condition>
                        <script>
                            <code>input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </inbound>
            </attribute>
            <attribute>
                <ref>ri:title</ref>
                <limitations>
                    <access>
                        <read>true</read>
                        <add>true</add>
                        <modify>true</modify>
                    </access>
                </limitations>
                <matchingRule xmlns:mr="http://prism.evolveum.com/xml/ns/public/matching-rule-3">mr:stringIgnoreCase</matchingRule>
                <outbound>
                    <name>set-title</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>strong</strength>
                    <source>
                        <path>title</path>
                    </source>
                    <condition>
                        <script>
                            <code>title!=null &amp;&amp; !title.isEmpty() &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </outbound>
                <inbound>
                    <name>get-title</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <target>
                        <path>title</path>
                    </target>
                    <condition>
                        <script>
                            <code>input != null</code>
                        </script>
                    </condition>
                </inbound>
            </attribute>
            <attribute>
                <ref>ri:userPrincipalName</ref>
                <limitations>
                    <access>
                        <read>true</read>
                        <add>true</add>
                        <modify>true</modify>
                    </access>
                </limitations>
                <matchingRule xmlns:mr="http://prism.evolveum.com/xml/ns/public/matching-rule-3">mr:stringIgnoreCase</matchingRule>
                <modificationPriority>0</modificationPriority>
                <secondaryIdentifier>true</secondaryIdentifier>
                <outbound>
                    <name>set-userPrincipalName</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <source>
                        <path>emailAddress</path>
                    </source>
                    <source>
                        <path>name</path>
                    </source>
                    <expression>
                        <script>
                            <includeNullInputs>false</includeNullInputs>
                            <code>
                                import com.evolveum.midpoint.util.exception.ExpressionEvaluationException
                                import com.evolveum.midpoint.util.exception.ObjectNotFoundException

                                String baseContext
                                String errorMsg
                                String returnValue
                                try {
                                    try {
                                        baseContext = basic.getResourceIcfConfigurationPropertyValue(resource, 'baseContext')
                                    } catch ( ObjectNotFoundException onf){
                                        errorMsg = "Empty \"Base Context\" attribute in resource configuration. Non empty value is required.\n" + onf.getMessage()
                                        log.error(errorMsg)
                                        throw new ObjectNotFoundException(errorMsg)
                                    }
                                    baseContext = baseContext.replaceAll("DC=","").replaceAll(",",".")
                                    returnValue = basic.concatName(name.toString()+"@"+baseContext)
                                    return returnValue
                                } catch (ExpressionEvaluationException expErr) {
                                    errorMsg = "Unable to construct userPrincipalName.\n" + expErr.getMessage()
                                    log.error(errorMsg)
                                    throw new ExpressionEvaluationException(errorMsg)
                                }
                            </code>
                        </script>
                    </expression>
                    <condition>
                        <script>
                            <code>name!=null &amp;&amp; emailAddress!=null &amp;&amp; !emailAddress.isEmpty() &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </outbound>
            </attribute>
            <attribute>
                <ref>ri:mail</ref>
                <limitations>
                    <access>
                        <read>true</read>
                        <add>true</add>
                        <modify>true</modify>
                    </access>
                </limitations>
                <matchingRule xmlns:mr="http://prism.evolveum.com/xml/ns/public/matching-rule-3">mr:stringIgnoreCase</matchingRule>
                <modificationPriority>0</modificationPriority>
                <secondaryIdentifier>true</secondaryIdentifier>
                <inbound>
                    <name>get-mail</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <target>
                        <path>emailAddress</path>
                    </target>
                    <condition>
                        <script>
                            <code>input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </inbound>
                <outbound>
                    <name>set-mail</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>strong</strength>
                    <source>
                        <path>emailAddress</path>
                    </source>
                    <condition>
                        <script>
                            <code>emailAddress!=null &amp;&amp; !emailAddress.isEmpty() &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </outbound>
            </attribute>
            <attribute>
                <ref>ri:pwdLastSet</ref>
                <limitations>
                    <access>
                        <read>true</read>
                        <add>true</add>
                        <modify>false</modify>
                    </access>
                </limitations>
                <fetchStrategy>explicit</fetchStrategy>
                <outbound>
                    <name>set-reset-password</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <expression>
                        <script>
                            <code>
                                // -1 next logon reset password required
                                // 0 no previous loggon
                                return "-1"
                            </code>
                        </script>
                    </expression>
                    <condition>
                        <script>
                            <code>"add".equals(operation.toString()) &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </outbound>
            </attribute>
            <attribute>
                <ref>ri:createTimeStamp</ref>
                <limitations>
                    <access>
                        <read>true</read>
                        <add>false</add>
                        <modify>false</modify>
                    </access>
                </limitations>
                <fetchStrategy>explicit</fetchStrategy>
                <inbound>
                    <name>get-validFrom</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <target>
                        <name>validFrom</name>
                        <path>activation/validFrom</path>
                    </target>
                    <condition>
                        <script>
                            <code>input != null</code>
                        </script>
                    </condition>
                </inbound>
            </attribute>
            <attribute>
                <ref>ri:accountExpires</ref>
                <limitations>
                    <access>
                        <read>true</read>
                        <add>true</add>
                        <modify>true</modify>
                    </access>
                </limitations>
                <fetchStrategy>explicit</fetchStrategy>
                <outbound>
                    <name>set-accountExpires</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>strong</strength>
                    <source>
                        <name>validTo</name>
                        <path>activation/validTo</path>
                    </source>
                    <expression>
                        <script>
                            <code>
                                def longDate
                                if(validTo!=null){
                                    def gc = validTo.toGregorianCalendar()
                                    def offset = 11644560000000
                                    longDate = (gc.getTimeInMillis() + offset)*10000
                                }
                                else {
                                    longDate = "9223372036854775807"
                                }
                                return longDate.toString()
                            </code>
                        </script>
                    </expression>
                </outbound>
            </attribute>
            <attribute>
                <ref>ri:nTSecurityDescriptor</ref>
                <limitations>
                    <minOccurs>0</minOccurs>
                    <access>
                        <read>true</read>
                        <add>true</add>
                        <modify>false</modify>
                    </access>
                </limitations>
                <fetchStrategy>explicit</fetchStrategy>
            </attribute>
            <attribute>
                <ref>ri:instanceType</ref>
                <limitations>
                    <minOccurs>0</minOccurs>
                    <access>
                        <read>true</read>
                        <add>true</add>
                        <modify>false</modify>
                    </access>
                </limitations>
                <fetchStrategy>explicit</fetchStrategy>
            </attribute>
            <attribute>
                <ref>ri:company</ref>
                <limitations>
                    <access>
                        <read>true</read>
                        <add>true</add>
                        <modify>true</modify>
                    </access>
                </limitations>
                <matchingRule xmlns:mr="http://prism.evolveum.com/xml/ns/public/matching-rule-3">mr:stringIgnoreCase</matchingRule>
                <inbound>
                    <name>get-company</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <target>
                        <path>organization</path>
                    </target>
                    <condition>
                        <script>
                            <code>input != null</code>
                        </script>
                    </condition>
                </inbound>
            </attribute>
            <attribute>
                <ref>ri:ou</ref>
                <limitations>
                    <minOccurs>0</minOccurs>
                    <maxOccurs>1</maxOccurs>
                    <access>
                        <read>true</read>
                        <add>true</add>
                        <modify>true</modify>
                    </access>
                </limitations>
                <matchingRule xmlns:mr="http://prism.evolveum.com/xml/ns/public/matching-rule-3">mr:stringIgnoreCase</matchingRule>
                <inbound>
                    <name>get-ou</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <target>
                        <path>organizationalUnit</path>
                    </target>
                    <condition>
                        <script>
                            <code>input != null</code>
                        </script>
                    </condition>
                </inbound>
            </attribute>
            <attribute>
                <ref>ri:memberOf</ref>
                <fetchStrategy>explicit</fetchStrategy>
            </attribute>
            <attribute>
                <ref>ri:l</ref>
                <outbound>
                    <name>set-locality</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>strong</strength>
                    <source>
                        <path>$focus/locality</path>
                    </source>
                </outbound>
                <inbound>
                    <name>get-locality</name>
                    <strength>weak</strength>
                    <lifecycleState>active</lifecycleState>
                    <target>
                        <path>locality</path>
                    </target>
                </inbound>
            </attribute>
            <attribute>
                <ref>ri:initials</ref>
                <outbound>
                    <name>mapping-initials</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>strong</strength>
                    <source>
                        <path>$focus/givenName</path>
                    </source>
                    <source>
                        <path>$focus/familyName</path>
                    </source>
                    <expression>
                        <script>
                            <code>
                                basic.uc(basic.stringify(givenName)?.take(1) + basic.stringify(familyName)?.take(1))
                            </code>
                        </script>
                    </expression>
                </outbound>
            </attribute>
            <association>
                <ref>ri:GlobalDistribution</ref>
                <displayName>Global Distribution Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <strength>strong</strength>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                        return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </inbound>
                <kind>entitlement</kind>
                <intent>GlobalDistributionGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:DomainLocalDistribution</ref>
                <displayName>Domain local distribution group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                        return input !=null &amp;&amp; midpoint.isEvaluateNew()
                                    </code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>DomainLocalDistributionGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:UniversalDistribution</ref>
                <displayName>Universal Distribution Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                        return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>UniversalDistributionGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:GlobalSecurity</ref>
                <displayName>Global Security Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                        return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </inbound>
                <kind>entitlement</kind>
                <intent>GlobalSecurityGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:DomainLocalSecurity</ref>
                <displayName>Domain Local Security Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                        return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>DomainLocalSecurityGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:UniversalSecurity</ref>
                <displayName>Universal Security Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                        return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>UniversalSecurityGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <protected>
                <filter>
                    <q:text>attributes/dn contains[stringIgnoreCase] ",cn=builtin,"</q:text>
                </filter>
            </protected>
            <protected>
                <filter>
                    <q:text>attributes/dn contains[stringIgnoreCase] "cn=administrator,cn=users,"</q:text>
                </filter>
            </protected>
            <protected>
                <filter>
                    <q:text>attributes/dn contains[stringIgnoreCase] "cn=guest,cn=users,"</q:text>
                </filter>
            </protected>
            <protected>
                <filter>
                    <q:text>attributes/dn contains[stringIgnoreCase] "cn=midpoint,cn=users,"</q:text>
                </filter>
            </protected>
            <protected>
                <filter>
                    <q:text>attributes/dn contains[stringIgnoreCase] "cn=krbtgt,cn=users,"</q:text>
                </filter>
            </protected>
            <activation>
                <existence/>
                <administrativeStatus>
                    <outbound>
                        <name>set-account-status-based-on-midpoint-user</name>
                        <lifecycleState>active</lifecycleState>
                        <strength>strong</strength>
                    </outbound>
                </administrativeStatus>
                <disableInsteadOfDelete>
                    <lifecycleState>active</lifecycleState>
                </disableInsteadOfDelete>
                <delayedDelete>
                    <lifecycleState>active</lifecycleState>
                    <deleteAfter>PT5M</deleteAfter>
                </delayedDelete>
            </activation>
            <credentials>
                <password>
                    <outbound>
                        <name>passwd-change</name>
                        <lifecycleState>suspended</lifecycleState>
                        <description>Copy password from midPoint when changed</description>
                        <strength>normal</strength>
                    </outbound>
                    <outbound>
                        <name>passwd-initial</name>
                        <strength>weak</strength>
                        <lifecycleState>suspended</lifecycleState>
                        <expression>
                            <generate>
                                <valuePolicyRef oid="00000000-0000-0000-0000-000000000003" xsi:type="c:ObjectReferenceType"/>
                            </generate>
                        </expression>
                    </outbound>
                </password>
            </credentials>
            <correlation>
                <correlators>
                    <items>
                        <name>personalNumber-correlation</name>
                        <description>Correlation using personalNumber. Please note: inbound mapping for personalNumber is used only during correlation.</description>
                        <enabled>false</enabled>
                        <item>
                            <ref>personalNumber</ref>
                        </item>
                        <composition>
                            <tier>21</tier>
                        </composition>
                    </items>
                    <items>
                        <name>samAccountName-correlation</name>
                        <enabled>true</enabled>
                        <item>
                            <ref>c:name</ref>
                            <search>
                                <matchingRule>polyStringOrig</matchingRule>
                            </search>
                        </item>
                        <composition>
                            <tier>2</tier>
                        </composition>
                    </items>
                </correlators>
            </correlation>
            <synchronization>
                <reaction>
                    <name>set-linked</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>linked</situation>
                    <actions>
                        <synchronize/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-unlinked</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>unlinked</situation>
                    <actions>
                        <link/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-unmatched</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>unmatched</situation>
                    <actions>
                        <addFocus/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-deleted</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>deleted</situation>
                    <actions>
                        <synchronize/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-disputed</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>disputed</situation>
                    <actions>
                        <createCorrelationCase/>
                    </actions>
                </reaction>
            </synchronization>
        </objectType>
        <objectType>
            <kind>account</kind>
            <intent>msa</intent>
            <displayName>Managed service account</displayName>
            <lifecycleState>active</lifecycleState>
            <default>false</default>
            <auxiliaryObjectClassMappings>
                <fetchStrategy>explicit</fetchStrategy>
                <tolerant>true</tolerant>
            </auxiliaryObjectClassMappings>
            <delineation>
                <objectClass>ri:msDS-ManagedServiceAccount</objectClass>
                <searchHierarchyScope>sub</searchHierarchyScope>
            </delineation>
            <focus>
                <type>c:UserType</type>
                <archetypeRef oid="00000000-0000-0001-0702-000000000200" relation="org:default" type="c:ArchetypeType"/>
            </focus>
            <attribute>
                <ref>ri:msDS-parentdistname</ref>
                <limitations>
                    <access>
                        <read>true</read>
                        <add>false</add>
                        <modify>false</modify>
                    </access>
                </limitations>
                <fetchStrategy>explicit</fetchStrategy>
            </attribute>
            <attribute>
                <ref>ri:dn</ref>
                <displayName>Distinguished Name</displayName>
                <modificationPriority>0</modificationPriority>
                <secondaryIdentifier>true</secondaryIdentifier>
                <volatilityTrigger>true</volatilityTrigger>
                <displayNameAttribute>true</displayNameAttribute>
                <outbound>
                    <name>set-dn</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>strong</strength>
                    <source>
                        <path>name</path>
                    </source>
                    <expression>
                        <script>
                            <code>import com.evolveum.midpoint.util.exception.ExpressionEvaluationException
                                import com.evolveum.midpoint.util.exception.ObjectNotFoundException
                                String baseContext
                                String errorMsg
                                try {
                                    try {
                                        baseContext = basic.getResourceIcfConfigurationPropertyValue(resource, 'baseContext')
                                    } catch ( ObjectNotFoundException onf){
                                        errorMsg = "Empty \"Base Context\" attribute in resource configuration. Non empty value is required.\n" + onf.getMessage()
                                        log.error(errorMsg)
                                        throw new ObjectNotFoundException(errorMsg)
                                    }
                                    return basic.composeDnWithSuffix('CN', name.toString(),"CN","Managed Service Accounts", baseContext)
                                } catch (ExpressionEvaluationException expErr) {
                                    errorMsg = "Failed return value in outbound expression of attribute in resource configuration.\n" + expErr.getMessage()
                                    log.error(errorMsg)
                                    throw new ExpressionEvaluationException(errorMsg)
                                }</code>
                        </script>
                    </expression>
                    <condition>
                        <script>
                            <code>name!=null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </outbound>
                <inbound>
                    <name>get-lifecycleState</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <expression>
                        <variable>
                            <name>effectiveStatus</name>
                            <path>$shadow/activation/effectiveStatus</path>
                        </variable>
                        <variable>
                            <name>administrativeStatus</name>
                            <path>$shadow/activation/administrativeStatus</path>
                        </variable>
                        <script>
                            <code>import com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationStatusType;

                                import com.evolveum.midpoint.schema.constants.SchemaConstants
                                if (administrativeStatus == ActivationStatusType.ENABLED){
                                    return SchemaConstants.LIFECYCLE_ACTIVE
                                } else if (administrativeStatus == ActivationStatusType.DISABLED) {
                                    return SchemaConstants.LIFECYCLE_ACTIVE
                                }</code>
                        </script>
                    </expression>
                    <target>
                        <path>lifecycleState</path>
                    </target>
                    <condition>
                        <script>
                            <code>input != null  &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </inbound>
            </attribute>
            <attribute>
                <ref>ri:sn</ref>
                <limitations>
                    <minOccurs>0</minOccurs>
                    <maxOccurs>1</maxOccurs>
                    <access>
                        <read>true</read>
                        <add>true</add>
                        <modify>true</modify>
                    </access>
                </limitations>
                <outbound>
                    <name>set-sn</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>strong</strength>
                    <source>
                        <path>familyName</path>
                    </source>
                    <condition>
                        <script>
                            <code>familyName!=null &amp;&amp; !familyName.isEmpty() &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </outbound>
                <inbound>
                    <name>get-familyName</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <target>
                        <path>familyName</path>
                    </target>
                    <condition>
                        <script>
                            <code>input != null</code>
                        </script>
                    </condition>
                </inbound>
            </attribute>
            <attribute>
                <ref>ri:givenName</ref>
                <limitations>
                    <access>
                        <read>true</read>
                        <add>true</add>
                        <modify>true</modify>
                    </access>
                </limitations>
                <matchingRule xmlns:mr="http://prism.evolveum.com/xml/ns/public/matching-rule-3">mr:stringIgnoreCase</matchingRule>
                <outbound>
                    <name>set-givenName</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>strong</strength>
                    <source>
                        <path>givenName</path>
                    </source>
                    <condition>
                        <script>
                            <code>givenName!=null &amp;&amp; !givenName.isEmpty() &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </outbound>
                <inbound>
                    <name>get-givenName</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <target>
                        <path>givenName</path>
                    </target>
                    <condition>
                        <script>
                            <code>input != null</code>
                        </script>
                    </condition>
                </inbound>
            </attribute>
            <attribute>
                <ref>ri:cn</ref>
                <limitations>
                    <access>
                        <read>true</read>
                        <add>true</add>
                        <modify>true</modify>
                    </access>
                </limitations>
                <matchingRule xmlns:mr="http://prism.evolveum.com/xml/ns/public/matching-rule-3">mr:stringIgnoreCase</matchingRule>
                <outbound>
                    <name>set-cn</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>strong</strength>
                    <source>
                        <path>name</path>
                    </source>
                    <condition>
                        <script>
                            <code>name!=null &amp;&amp; !name.isEmpty() &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </outbound>
                <inbound>
                    <name>get-cn</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <target>
                        <path>name</path>
                    </target>
                    <condition>
                        <script>
                            <code>input != null</code>
                        </script>
                    </condition>
                </inbound>
                <inbound>
                    <name>get-displayName</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <target>
                        <path>fullName</path>
                    </target>
                    <condition>
                        <script>
                            <code>input != null</code>
                        </script>
                    </condition>
                </inbound>
            </attribute>
            <attribute>
                <ref>ri:mail</ref>
                <limitations>
                    <access>
                        <read>true</read>
                        <add>true</add>
                        <modify>true</modify>
                    </access>
                </limitations>
                <matchingRule xmlns:mr="http://prism.evolveum.com/xml/ns/public/matching-rule-3">mr:stringIgnoreCase</matchingRule>
                <modificationPriority>0</modificationPriority>
                <secondaryIdentifier>true</secondaryIdentifier>
                <outbound>
                    <name>set-mail</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>strong</strength>
                    <source>
                        <path>emailAddress</path>
                    </source>
                    <condition>
                        <script>
                            <code>emailAddress!=null &amp;&amp; !emailAddress.isEmpty() &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </outbound>
                <inbound>
                    <name>get-mail</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <target>
                        <path>emailAddress</path>
                    </target>
                    <condition>
                        <script>
                            <code>input != null</code>
                        </script>
                    </condition>
                </inbound>
            </attribute>
            <attribute>
                <ref>ri:primaryGroupID</ref>
                <limitations>
                    <access>
                        <read>true</read>
                        <add>true</add>
                        <modify>false</modify>
                    </access>
                </limitations>
                <fetchStrategy>explicit</fetchStrategy>
            </attribute>
            <attribute>
                <ref>ri:pwdLastSet</ref>
                <limitations>
                    <access>
                        <read>true</read>
                        <add>true</add>
                        <modify>false</modify>
                    </access>
                </limitations>
                <fetchStrategy>explicit</fetchStrategy>
                <outbound>
                    <name>set-next-logon-reset-password</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <expression>
                        <script>
                            <code>
                                return "-1"
                            </code>
                        </script>
                    </expression>
                    <condition>
                        <script>
                            <code>"add".equals(operation.toString()) &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </outbound>
            </attribute>
            <attribute>
                <ref>ri:createTimeStamp</ref>
                <limitations>
                    <access>
                        <read>true</read>
                        <add>true</add>
                        <modify>false</modify>
                    </access>
                </limitations>
                <fetchStrategy>explicit</fetchStrategy>
                <inbound>
                    <name>get-createTimeStamp</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <target>
                        <path>activation/validFrom</path>
                    </target>
                    <condition>
                        <script>
                            <code>/*"add".equals(operation.toString()) &amp;&amp;*/ input != null</code>
                        </script>
                    </condition>
                </inbound>
            </attribute>
            <attribute>
                <ref>ri:nTSecurityDescriptor</ref>
                <limitations>
                    <minOccurs>0</minOccurs>
                    <access>
                        <read>true</read>
                        <add>true</add>
                        <modify>false</modify>
                    </access>
                </limitations>
                <fetchStrategy>explicit</fetchStrategy>
            </attribute>
            <attribute>
                <ref>ri:instanceType</ref>
                <limitations>
                    <minOccurs>0</minOccurs>
                    <access>
                        <read>true</read>
                        <add>true</add>
                        <modify>false</modify>
                    </access>
                </limitations>
                <fetchStrategy>explicit</fetchStrategy>
            </attribute>
            <attribute>
                <ref>ri:company</ref>
                <limitations>
                    <access>
                        <read>true</read>
                        <add>true</add>
                        <modify>true</modify>
                    </access>
                </limitations>
                <matchingRule xmlns:mr="http://prism.evolveum.com/xml/ns/public/matching-rule-3">mr:stringIgnoreCase</matchingRule>
                <outbound>
                    <name>set-company</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <source>
                        <path>organization</path>
                    </source>
                    <condition>
                        <script>
                            <code>organization!=null &amp;&amp; !organization.isEmpty() &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </outbound>
                <inbound>
                    <name>get-company</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <target>
                        <path>organization</path>
                    </target>
                    <condition>
                        <script>
                            <code>input != null</code>
                        </script>
                    </condition>
                </inbound>
            </attribute>
            <attribute>
                <ref>ri:ou</ref>
                <limitations>
                    <minOccurs>0</minOccurs>
                    <maxOccurs>1</maxOccurs>
                    <access>
                        <read>true</read>
                        <add>true</add>
                        <modify>true</modify>
                    </access>
                </limitations>
                <matchingRule xmlns:mr="http://prism.evolveum.com/xml/ns/public/matching-rule-3">mr:stringIgnoreCase</matchingRule>
                <outbound>
                    <name>set-ou</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <source>
                        <path>organizationalUnit</path>
                    </source>
                    <condition>
                        <script>
                            <code>organizationalUnit!=null &amp;&amp; !organizationalUnit.isEmpty() &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </outbound>
                <inbound>
                    <name>get-ou</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <target>
                        <path>organizationalUnit</path>
                    </target>
                    <condition>
                        <script>
                            <code>input != null</code>
                        </script>
                    </condition>
                </inbound>
            </attribute>
            <attribute>
                <ref>ri:memberOf</ref>
                <fetchStrategy>explicit</fetchStrategy>
            </attribute>
            <attribute>
                <ref>ri:accountExpires</ref>
                <limitations>
                    <access>
                        <read>true</read>
                        <add>true</add>
                        <modify>true</modify>
                    </access>
                </limitations>
                <fetchStrategy>explicit</fetchStrategy>
                <outbound>
                    <name>set-accountExpires</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>strong</strength>
                    <source>
                        <name>validTo</name>
                        <path>activation/validTo</path>
                    </source>
                    <expression>
                        <script>
                            <code>
                                def longDate
                                if(validTo!=null){
                                    def gc = validTo.toGregorianCalendar()
                                    def offset = 11644560000000
                                    longDate = (gc.getTimeInMillis() + offset)*10000
                                }
                                else {
                                    longDate = "9223372036854775807"
                                }
                                return longDate.toString()
                            </code>
                        </script>
                    </expression>
                </outbound>
            </attribute>
            <association>
                <ref>ri:GlobalDistribution</ref>
                <displayName>Global Distribution Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <strength>normal</strength>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                        return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>GlobalDistributionGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:DomainLocalDistribution</ref>
                <displayName>Domain local distribution group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                        return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>DomainLocalDistributionGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:UniversalDistribution</ref>
                <displayName>Universal Distribution Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <assignmentTargetSearch>
                            <condition>
                                <script>
                                    <code>
                                        return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>UniversalDistributionGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:GlobalSecurity</ref>
                <displayName>Global Security Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <assignmentTargetSearch>
                            <condition>
                                <script>
                                    <code>
                                        return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>GlobalSecurityGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:DomainLocalSecurity</ref>
                <displayName>Domain Local Security Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                        return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>DomainLocalSecurityGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:UniversalSecurity</ref>
                <displayName>Universal Security Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                        return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>UniversalSecurityGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <activation>
                <administrativeStatus>
                    <outbound>
                        <name>set-account-status-based-on-midpoint-user</name>
                        <lifecycleState>draft</lifecycleState>
                        <strength>strong</strength>
                    </outbound>
                </administrativeStatus>
                <disableInsteadOfDelete>
                    <lifecycleState>draft</lifecycleState>
                </disableInsteadOfDelete>
                <delayedDelete>
                    <lifecycleState>draft</lifecycleState>
                    <deleteAfter>PT5M</deleteAfter>
                </delayedDelete>
            </activation>
            <credentials>
                <password>
                    <outbound>
                        <name>passwd-change</name>
                        <description>Copy password from midPoint when changed</description>
                        <strength>normal</strength>
                    </outbound>
                    <outbound>
                        <strength>weak</strength>
                        <expression>
                            <generate>
                                <valuePolicyRef oid="00000000-0000-0000-0000-000000000003" xsi:type="c:ObjectReferenceType"/>
                            </generate>
                        </expression>
                    </outbound>
                </password>
            </credentials>
            <correlation>
                <correlators>
                    <items>
                        <name>baseCorrelation</name>
                        <enabled>true</enabled>
                        <item>
                            <ref>name</ref>
                            <search>
                                <matchingRule>polyStringOrig</matchingRule>
                            </search>
                        </item>
                        <composition>
                            <tier>1</tier>
                        </composition>
                    </items>
                    <items>
                        <name>additionalCorrelation</name>
                        <item>
                            <ref>emailAddress</ref>
                        </item>
                        <item>
                            <ref>givenName</ref>
                        </item>
                        <item>
                            <ref>familyName</ref>
                        </item>
                        <composition>
                            <tier>2</tier>
                        </composition>
                    </items>
                </correlators>
            </correlation>
            <synchronization>
                <reaction>
                    <name>set-linked</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>linked</situation>
                    <actions>
                        <synchronize/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-unlinked</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>unlinked</situation>
                    <actions>
                        <link/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-unmatched</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>unmatched</situation>
                    <actions>
                        <addFocus/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-deleted</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>deleted</situation>
                    <actions>
                        <unlink/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-disputed</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>disputed</situation>
                    <actions>
                        <createCorrelationCase/>
                    </actions>
                </reaction>
            </synchronization>
        </objectType>
        <objectType>
            <kind>entitlement</kind>
            <intent>group</intent>
            <displayName>Group</displayName>
            <lifecycleState>active</lifecycleState>
            <abstract>true</abstract>
            <default>false</default>
            <delineation>
                <objectClass>ri:group</objectClass>
                <baseContext>
                    <objectClass>ri:organizationalUnit</objectClass>
                    <filter>
                        <q:text>attributes/dn = ``` return basic.getResourceIcfConfigurationPropertyValue(resource, 'baseContext')```//'dc=test-ad,dc=lab,dc=evolveum,dc=com'</q:text>
                    </filter>
                </baseContext>
                <searchHierarchyScope>sub</searchHierarchyScope>
            </delineation>
            <focus>
                <type>c:RoleType</type>
                <archetypeRef oid="00000000-0000-0001-0328-000000000100" relation="org:default" type="c:ArchetypeType"/>
            </focus>
            <attribute>
                <ref>ri:dn</ref>
                <displayName>Distinguished Name</displayName>
                <modificationPriority>0</modificationPriority>
                <secondaryIdentifier>true</secondaryIdentifier>
                <volatilityTrigger>true</volatilityTrigger>
                <displayNameAttribute>true</displayNameAttribute>
                <outbound>
                    <name>set-dn</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>strong</strength>
                    <source>
                        <path>name</path>
                    </source>
                    <expression>
                        <script>
                            <code>import com.evolveum.midpoint.util.exception.ExpressionEvaluationException
                                import com.evolveum.midpoint.util.exception.ObjectNotFoundException
                                String baseContext
                                String errorMsg
                                /* default configuration for fresh AD installation, must be customized regarding to your deployment */
                                /* OU=Groups,OU=Org,DC=test-ad,DC=lab,DC=evolveum,DC=com*/

                                try {
                                    try {
                                        baseContext = basic.getResourceIcfConfigurationPropertyValue(resource, 'baseContext')
                                        defaultContext = basic.getAttributeValue(shadow, 'msDS-parentdistname')

                                    } catch ( ObjectNotFoundException onf){
                                        errorMsg = "Empty \"Base Context\" attribute in resource configuration. Non empty value is required.\n" + onf.getMessage()
                                        log.error(errorMsg)
                                        throw new ObjectNotFoundException(errorMsg)
                                    }
                                    if (defaultContext!=null){
                                        return basic.composeDnWithSuffix('CN', name.toString(),defaultContext)
                                    }
                                    return basic.composeDnWithSuffix('CN', name.toString(),"OU","Groups","OU","FirstSteps",baseContext)
                                } catch (ExpressionEvaluationException expErr) {
                                    errorMsg = "Failed return value in outbound expression of attribute in resource configuration.\n" + expErr.getMessage()
                                    log.error(errorMsg)
                                    throw new ExpressionEvaluationException(errorMsg)
                                }</code>
                        </script>
                    </expression>
                    <condition>
                        <script>
                            <code>name!=null</code>
                        </script>
                    </condition>
                </outbound>
                <inbound>
                    <name>get-lifecycleState</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <expression>
                        <variable>
                            <name>effectiveStatus</name>
                            <path>$shadow/activation/effectiveStatus</path>
                        </variable>
                        <variable>
                            <name>administrativeStatus</name>
                            <path>$shadow/activation/administrativeStatus</path>
                        </variable>
                        <script>
                            <code>
                                import com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationStatusType;
                                import com.evolveum.midpoint.schema.constants.SchemaConstants
                                if (administrativeStatus == ActivationStatusType.ENABLED){
                                    return SchemaConstants.LIFECYCLE_ACTIVE
                                } else if (administrativeStatus == ActivationStatusType.DISABLED) {
                                    return SchemaConstants.LIFECYCLE_ACTIVE
                                }</code>
                        </script>
                    </expression>
                    <target>
                        <path>lifecycleState</path>
                    </target>
                    <condition>
                        <script>
                            <code>input != null  &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </inbound>
                <inbound>
                    <name>get-dn</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <target>
                        <path>identifier</path>
                    </target>
                    <condition>
                        <script>
                            <code>input != null  &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </inbound>
            </attribute>
            <attribute>
                <ref>ri:description</ref>
                <inbound>
                    <name>get-description</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <target>
                        <path>description</path>
                    </target>
                </inbound>
            </attribute>
            <!--<attribute>
                <ref>ri:groupType</ref>
                <limitations>
                    <minOccurs>1</minOccurs>
                    <maxOccurs>1</maxOccurs>
                    <access>
                        <read>true</read>
                        <add>true</add>
                        <modify>false</modify>
                    </access>
                </limitations>
                <valueEnumerationRef oid="00000000-0000-0000-0000-000000000260" relation="org:default" type="c:LookupTableType"/>
                <emphasized>true</emphasized>
                <outbound>
                    <name>set-groupType</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <expression>
                        <script>
                            <code>import com.evolveum.midpoint.util.exception.ExpressionEvaluationException
                                import com.evolveum.midpoint.util.exception.ObjectNotFoundException
                                String errorMsg
                                if (midpoint.hasArchetype(focus,"00000000-0000-0001-0328-000000000110")) {
                                    return "2"
                                }
                                else if (midpoint.hasArchetype(focus,"00000000-0000-0001-0328-000000000120")) {
                                    return "4"
                                }
                                else if (midpoint.hasArchetype(focus,"00000000-0000-0001-0328-000000000130")) {
                                    return "8"
                                }
                                else if (midpoint.hasArchetype(focus,"00000000-0000-0001-0328-000000000140")) {
                                    return "-2147483646"
                                }
                                else if (midpoint.hasArchetype(focus,"00000000-0000-0001-0328-000000000150")) {
                                    return "-2147483644"
                                }
                                else if (midpoint.hasArchetype(focus,"00000000-0000-0001-0328-000000000160")) {
                                    return "-2147483640"
                                }
                                else {
                                    errorMsg = "Failed return value in outbound expression of attribute in resource configuration.\n" + expErr.getMessage()
                                    log.error(errorMsg)
                                    throw new ExpressionEvaluationException(errorMsg)
                                }
                            </code>
                        </script>
                    </expression>
                    <condition>
                        <script>
                            <code>operation.equalsIgnoreCase("add") &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </outbound>
            </attribute>-->
            <attribute>
                <ref>ri:adminDescription</ref>
            </attribute>
            <attribute>
                <ref>ri:displayName</ref>
                <outbound>
                    <name>set-displayName</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>normal</strength>
                    <source>
                        <path>displayName</path>
                    </source>
                </outbound>
                <inbound>
                    <name>get-displayName</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <target>
                        <path>displayName</path>
                    </target>
                </inbound>
            </attribute>
            <attribute>
                <ref>ri:mail</ref>
                <outbound>
                    <name>get-mail</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>normal</strength>
                    <source>
                        <path>emailAddress</path>
                    </source>
                </outbound>
                <inbound>
                    <name>get-mail</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <target>
                        <path>emailAddress</path>
                    </target>
                </inbound>
            </attribute>
            <attribute>
                <ref>ri:cn</ref>
                <outbound>
                    <name>set-name</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>normal</strength>
                    <source>
                        <path>name</path>
                    </source>
                </outbound>
                <inbound>
                    <name>get-name</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <target>
                        <path>name</path>
                    </target>
                </inbound>
            </attribute>
            <attribute>
                <ref>ri:member</ref>
                <fetchStrategy>explicit</fetchStrategy>
            </attribute>
            <attribute>
                <ref>ri:memberOf</ref>
                <fetchStrategy>explicit</fetchStrategy>
            </attribute>
            <attribute>
                <ref>ri:msDS-parentdistname</ref>
            </attribute>
            <!--<attribute>
                <ref>ri:manager</ref>
            </attribute>-->
            <attribute>
                <ref>ri:managedBy</ref>
                <fetchStrategy>explicit</fetchStrategy>
                <!--<outbound>
                    <lifecycleState>active</lifecycleState>
                    <strength>strong</strength>
                    <expression>
                        <script>
                            <code>
                                log.info("managedBy user bindDN - {}",basic.getResourceIcfConfigurationPropertyValue(resource, 'bindDN'))
                                return basic.getResourceIcfConfigurationPropertyValue(resource, 'bindDN')
                            </code>
                        </script>
                    </expression>
                    <condition>
                        <script>
                            <code>midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </outbound>-->
            </attribute>
            <attribute>
                <ref>ri:whenCreated</ref>
            </attribute>
            <attribute>
                <ref>ri:isCriticalSystemObject</ref>
            </attribute>
            <attribute>
                <ref>ri:isRecycled</ref>
            </attribute>
            <attribute>
                <ref>ri:sAMAccountName</ref>
            </attribute>
            <protected>
                <filter>
                    <q:text>attributes/dn contains[stringIgnoreCase] ",cn=builtin,"</q:text>
                </filter>
            </protected>
            <correlation>
                <correlators>
                    <items>
                        <name>baseCorrelation</name>
                        <enabled>true</enabled>
                        <item>
                            <ref>name</ref>
                            <search>
                                <matchingRule>polyStringOrig</matchingRule>
                            </search>
                        </item>
                    </items>
                    <items>
                        <name>additionalCorrelation</name>
                        <item>
                            <ref>identifier</ref>
                        </item>
                        <composition>
                            <tier>2</tier>
                        </composition>
                    </items>
                </correlators>
            </correlation>
            <synchronization>
                <reaction>
                    <name>set-linked</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>linked</situation>
                    <actions>
                        <synchronize/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-unlinked</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>unlinked</situation>
                    <actions>
                        <link/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-unmatched</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>unmatched</situation>
                    <actions>
                        <addFocus/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-deleted</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>deleted</situation>
                    <actions>
                        <unlink/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-disputed</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>disputed</situation>
                    <actions>
                        <createCorrelationCase/>
                    </actions>
                </reaction>
            </synchronization>
        </objectType>
        <objectType>
            <kind>entitlement</kind>
            <intent>GlobalDistributionGroup</intent>
            <displayName>Global Distribution Group</displayName>
            <lifecycleState>active</lifecycleState>
            <super>
                <kind>entitlement</kind>
                <intent>group</intent>
            </super>
            <default>true</default>
            <delineation>
                <objectClass>ri:group</objectClass>
                <searchHierarchyScope>sub</searchHierarchyScope>
                <filter>
                    <q:text>attributes/groupType = "2"</q:text>
                </filter>
            </delineation>
            <focus>
                <type>c:RoleType</type>
                <archetypeRef oid="00000000-0000-0001-0328-000000000110" relation="org:default" type="c:ArchetypeType"/>
            </focus>
            <attribute>
                <ref>ri:groupType</ref>
                <limitations>
                    <minOccurs>1</minOccurs>
                    <maxOccurs>1</maxOccurs>
                    <access>
                        <read>true</read>
                        <add>true</add>
                        <modify>false</modify>
                    </access>
                </limitations>
                <valueEnumerationRef oid="00000000-0000-0000-0000-000000000260" relation="org:default" type="c:LookupTableType"/>
                <emphasized>true</emphasized>
                <outbound>
                    <name>set-groupType</name>
                    <lifecycleState>active</lifecycleState>
                    <strength>weak</strength>
                    <expression>
                        <script>
                            <code>return "2"</code>
                        </script>
                    </expression>
                    <condition>
                        <script>
                            <code>operation.equalsIgnoreCase("add") &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </outbound>
            </attribute>
            <association>
                <ref>ri:GlobalDistribution</ref>
                <displayName>Global Distribution Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <strength>strong</strength>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </inbound>
                <kind>entitlement</kind>
                <intent>GlobalDistributionGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:DomainLocalDistribution</ref>
                <displayName>Domain local distribution group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </inbound>
                <kind>entitlement</kind>
                <intent>DomainLocalDistributionGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:UniversalDistribution</ref>
                <displayName>Universal Distribution Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </inbound>
                <kind>entitlement</kind>
                <intent>UniversalDistributionGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:GlobalSecurity</ref>
                <displayName>Global Security Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>GlobalSecurityGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:DomainLocalSecurity</ref>
                <displayName>Domain Local Security Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>DomainLocalSecurityGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:UniversalSecurity</ref>
                <displayName>Universal Security Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </inbound>
                <kind>entitlement</kind>
                <intent>UniversalSecurityGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <correlation>
                <correlators>
                    <items>
                        <name>baseCorrelation</name>
                        <enabled>true</enabled>
                        <item>
                            <ref>name</ref>
                            <search>
                                <matchingRule>polyStringOrig</matchingRule>
                            </search>
                        </item>
                    </items>
                    <items>
                        <name>additionalCorrelation</name>
                        <item>
                            <ref>identifier</ref>
                        </item>
                        <composition>
                            <tier>2</tier>
                        </composition>
                    </items>
                </correlators>
            </correlation>
            <synchronization>
                <reaction>
                    <name>set-linked</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>linked</situation>
                    <actions>
                        <synchronize/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-unlinked</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>unlinked</situation>
                    <actions>
                        <link/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-unmatched</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>unmatched</situation>
                    <actions>
                        <addFocus/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-deleted</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>deleted</situation>
                    <actions>
                        <unlink/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-disputed</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>disputed</situation>
                    <actions>
                        <createCorrelationCase/>
                    </actions>
                </reaction>
            </synchronization>
        </objectType>
        <objectType>
            <kind>entitlement</kind>
            <intent>DomainLocalDistributionGroup</intent>
            <displayName>Domain local distribution group</displayName>
            <lifecycleState>active</lifecycleState>
            <super>
                <kind>entitlement</kind>
                <intent>group</intent>
            </super>
            <default>false</default>
            <delineation>
                <objectClass>ri:group</objectClass>
                <searchHierarchyScope>sub</searchHierarchyScope>
                <filter>
                    <q:text>attributes/groupType = "4"</q:text>
                </filter>
            </delineation>
            <focus>
                <type>c:RoleType</type>
                <archetypeRef oid="00000000-0000-0001-0328-000000000120" relation="org:default" type="c:ArchetypeType"/>
            </focus>
            <association>
                <ref>ri:GlobalDistribution</ref>
                <displayName>Global Distribution Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <strength>strong</strength>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </inbound>
                <kind>entitlement</kind>
                <intent>GlobalDistributionGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:DomainLocalDistribution</ref>
                <displayName>Domain local distribution group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>DomainLocalDistributionGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:UniversalDistribution</ref>
                <displayName>Universal Distribution Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>UniversalDistributionGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:GlobalSecurity</ref>
                <displayName>Global Security Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>GlobalSecurityGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:DomainLocalSecurity</ref>
                <displayName>Domain Local Security Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>DomainLocalSecurityGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:UniversalSecurity</ref>
                <displayName>Universal Security Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>UniversalSecurityGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <correlation>
                <correlators>
                    <items>
                        <name>baseCorrelation</name>
                        <enabled>true</enabled>
                        <item>
                            <ref>name</ref>
                            <search>
                                <matchingRule>polyStringOrig</matchingRule>
                            </search>
                        </item>
                    </items>
                    <items>
                        <name>additionalCorrelation</name>
                        <item>
                            <ref>identifier</ref>
                        </item>
                        <composition>
                            <tier>2</tier>
                        </composition>
                    </items>
                </correlators>
            </correlation>
            <synchronization>
                <reaction>
                    <name>set-linked</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>linked</situation>
                    <actions>
                        <synchronize/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-unlinked</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>unlinked</situation>
                    <actions>
                        <link/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-unmatched</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>unmatched</situation>
                    <actions>
                        <addFocus/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-deleted</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>deleted</situation>
                    <actions>
                        <unlink/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-disputed</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>disputed</situation>
                    <actions>
                        <createCorrelationCase/>
                    </actions>
                </reaction>
            </synchronization>
        </objectType>
        <objectType>
            <kind>entitlement</kind>
            <intent>UniversalDistributionGroup</intent>
            <displayName>Universal distribution group</displayName>
            <lifecycleState>active</lifecycleState>
            <super>
                <kind>entitlement</kind>
                <intent>group</intent>
            </super>
            <default>false</default>
            <delineation>
                <objectClass>ri:group</objectClass>
                <searchHierarchyScope>sub</searchHierarchyScope>
                <filter>
                    <q:text>attributes/groupType = "8"</q:text>
                </filter>
            </delineation>
            <focus>
                <type>c:RoleType</type>
                <archetypeRef oid="00000000-0000-0001-0328-000000000130" relation="org:default" type="c:ArchetypeType"/>
            </focus>
            <association>
                <ref>ri:GlobalDistribution</ref>
                <displayName>Global Distribution Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <strength>strong</strength>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>GlobalDistributionGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:DomainLocalDistribution</ref>
                <displayName>Domain local distribution group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>DomainLocalDistributionGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:UniversalDistribution</ref>
                <displayName>Universal Distribution Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>UniversalDistributionGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:GlobalSecurity</ref>
                <displayName>Global Security Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>GlobalSecurityGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:DomainLocalSecurity</ref>
                <displayName>Domain Local Security Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>DomainLocalSecurityGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:UniversalSecurity</ref>
                <displayName>Universal Security Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>UniversalSecurityGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <correlation>
                <correlators>
                    <items>
                        <name>baseCorrelation</name>
                        <enabled>true</enabled>
                        <item>
                            <ref>name</ref>
                            <search>
                                <matchingRule>polyStringOrig</matchingRule>
                            </search>
                        </item>
                    </items>
                    <items>
                        <name>additionalCorrelation</name>
                        <item>
                            <ref>identifier</ref>
                        </item>
                        <composition>
                            <tier>2</tier>
                        </composition>
                    </items>
                </correlators>
            </correlation>
            <synchronization>
                <reaction>
                    <name>set-linked</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>linked</situation>
                    <actions>
                        <synchronize/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-unlinked</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>unlinked</situation>
                    <actions>
                        <link/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-unmatched</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>unmatched</situation>
                    <actions>
                        <addFocus/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-deleted</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>deleted</situation>
                    <actions>
                        <unlink/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-disputed</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>disputed</situation>
                    <actions>
                        <createCorrelationCase/>
                    </actions>
                </reaction>
            </synchronization>
        </objectType>
        <objectType>
            <kind>entitlement</kind>
            <intent>GlobalSecurityGroup</intent>
            <displayName>Global security group</displayName>
            <lifecycleState>active</lifecycleState>
            <super>
                <kind>entitlement</kind>
                <intent>group</intent>
            </super>
            <default>false</default>
            <delineation>
                <objectClass>ri:group</objectClass>
                <searchHierarchyScope>sub</searchHierarchyScope>
                <filter>
                    <q:text>attributes/groupType = "-2147483646"</q:text>
                </filter>
            </delineation>
            <focus>
                <type>c:RoleType</type>
                <archetypeRef oid="00000000-0000-0001-0328-000000000140" relation="org:default" type="c:ArchetypeType"/>
            </focus>
            <association>
                <ref>ri:GlobalDistribution</ref>
                <displayName>Global Distribution Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <strength>normal</strength>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>GlobalDistributionGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:DomainLocalDistribution</ref>
                <displayName>Domain local distribution group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </inbound>
                <kind>entitlement</kind>
                <intent>DomainLocalDistributionGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:UniversalDistribution</ref>
                <displayName>Universal Distribution Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>UniversalDistributionGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:GlobalSecurity</ref>
                <displayName>Global Security Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>GlobalSecurityGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:DomainLocalSecurity</ref>
                <displayName>Domain Local Security Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>DomainLocalSecurityGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:UniversalSecurity</ref>
                <displayName>Universal Security Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>UniversalSecurityGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <correlation>
                <correlators>
                    <items>
                        <name>baseCorrelation</name>
                        <enabled>true</enabled>
                        <item>
                            <ref>name</ref>
                            <search>
                                <matchingRule>polyStringOrig</matchingRule>
                            </search>
                        </item>
                    </items>
                    <items>
                        <name>additionalCorrelation</name>
                        <item>
                            <ref>identifier</ref>
                        </item>
                        <composition>
                            <tier>2</tier>
                        </composition>
                    </items>
                </correlators>
            </correlation>
            <synchronization>
                <reaction>
                    <name>set-linked</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>linked</situation>
                    <actions>
                        <synchronize/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-unlinked</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>unlinked</situation>
                    <actions>
                        <link/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-unmatched</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>unmatched</situation>
                    <actions>
                        <addFocus/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-deleted</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>deleted</situation>
                    <actions>
                        <unlink/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-disputed</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>disputed</situation>
                    <actions>
                        <createCorrelationCase/>
                    </actions>
                </reaction>
            </synchronization>
        </objectType>
        <objectType>
            <kind>entitlement</kind>
            <intent>DomainLocalSecurityGroup</intent>
            <displayName>Domain local security group</displayName>
            <lifecycleState>active</lifecycleState>
            <super>
                <kind>entitlement</kind>
                <intent>group</intent>
            </super>
            <default>false</default>
            <delineation>
                <objectClass>ri:group</objectClass>
                <searchHierarchyScope>sub</searchHierarchyScope>
                <filter>
                    <q:text>attributes/groupType = "-2147483644"</q:text>
                </filter>
            </delineation>
            <focus>
                <type>c:RoleType</type>
                <archetypeRef oid="00000000-0000-0001-0328-000000000150" relation="org:default" type="c:ArchetypeType"/>
            </focus>
            <association>
                <ref>ri:GlobalDistribution</ref>
                <displayName>Global Distribution Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <strength>strong</strength>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>GlobalDistributionGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:DomainLocalDistribution</ref>
                <displayName>Domain local distribution group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>
                </inbound>
                <kind>entitlement</kind>
                <intent>DomainLocalDistributionGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:UniversalDistribution</ref>
                <displayName>Universal Distribution Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>UniversalDistributionGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:GlobalSecurity</ref>
                <displayName>Global Security Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>GlobalSecurityGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:DomainLocalSecurity</ref>
                <displayName>Domain Local Security Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>DomainLocalSecurityGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:UniversalSecurity</ref>
                <displayName>Universal Security Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>UniversalSecurityGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <correlation>
                <correlators>
                    <items>
                        <name>baseCorrelation</name>
                        <enabled>true</enabled>
                        <item>
                            <ref>name</ref>
                            <search>
                                <matchingRule>polyStringOrig</matchingRule>
                            </search>
                        </item>
                    </items>
                    <items>
                        <name>additionalCorrelation</name>
                        <item>
                            <ref>identifier</ref>
                        </item>
                        <composition>
                            <tier>2</tier>
                        </composition>
                    </items>
                </correlators>
            </correlation>
            <synchronization>
                <reaction>
                    <name>set-linked</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>linked</situation>
                    <actions>
                        <synchronize/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-unlinked</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>unlinked</situation>
                    <actions>
                        <link/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-unmatched</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>unmatched</situation>
                    <actions>
                        <addFocus/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-deleted</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>deleted</situation>
                    <actions>
                        <unlink/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-disputed</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>disputed</situation>
                    <actions>
                        <createCorrelationCase/>
                    </actions>
                </reaction>
            </synchronization>
        </objectType>
        <objectType>
            <kind>entitlement</kind>
            <intent>UniversalSecurityGroup</intent>
            <displayName>Universal security group</displayName>
            <lifecycleState>active</lifecycleState>
            <super>
                <kind>entitlement</kind>
                <intent>group</intent>
            </super>
            <default>false</default>
            <delineation>
                <objectClass>ri:group</objectClass>
                <searchHierarchyScope>sub</searchHierarchyScope>
                <filter>
                    <q:text>attributes/groupType = "-2147483640"</q:text>
                </filter>
            </delineation>
            <focus>
                <type>c:RoleType</type>
                <archetypeRef oid="00000000-0000-0001-0328-000000000160" relation="org:default" type="c:ArchetypeType"/>
            </focus>
            <association>
                <ref>ri:GlobalDistribution</ref>
                <displayName>Global Distribution Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <strength>strong</strength>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>GlobalDistributionGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:DomainLocalDistribution</ref>
                <displayName>Domain local distribution group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>DomainLocalDistributionGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:UniversalDistribution</ref>
                <displayName>Universal Distribution Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>UniversalDistributionGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:GlobalSecurity</ref>
                <displayName>Global Security Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>GlobalSecurityGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:DomainLocalSecurity</ref>
                <displayName>Domain Local Security Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>DomainLocalSecurityGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <association>
                <ref>ri:UniversalSecurity</ref>
                <displayName>Universal Security Group association</displayName>
                <lifecycleState>active</lifecycleState>
                <inbound>
                    <expression>
                        <trace>false</trace>
                        <assignmentTargetSearch>
                            <trace>false</trace>
                            <condition>
                                <script>
                                    <code>
                                    return input !=null &amp;&amp; midpoint.isEvaluateNew()</code>
                                </script>
                            </condition>
                            <targetType>RoleType</targetType>
                            <filter>
                                <q:text>name = ```
                                    adRoleName = basic.getAttributeValue(entitlement, 'cn').toString()
                                    map = new HashMap()
                                    map.put("adRoleNameVar", adRoleName)
                                    return adLibrary.execute("importGroup", map)
                                    ```</q:text>
                            </filter>
                        </assignmentTargetSearch>
                    </expression>
                    <target>
                        <path>assignment</path>
                    </target>
                    <condition>
                        <script>
                            <code>return input != null &amp;&amp; midpoint.isEvaluateNew()</code>
                        </script>
                    </condition>

                </inbound>
                <kind>entitlement</kind>
                <intent>UniversalSecurityGroup</intent>
                <direction>objectToSubject</direction>
                <associationAttribute>ri:member</associationAttribute>
                <valueAttribute>ri:dn</valueAttribute>
                <shortcutAssociationAttribute>ri:memberOf</shortcutAssociationAttribute>
                <shortcutValueAttribute>ri:dn</shortcutValueAttribute>
                <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
            </association>
            <correlation>
                <correlators>
                    <items>
                        <name>baseCorrelation</name>
                        <enabled>true</enabled>
                        <item>
                            <ref>name</ref>
                            <search>
                                <matchingRule>polyStringOrig</matchingRule>
                            </search>
                        </item>
                    </items>
                    <items>
                        <name>additionalCorrelation</name>
                        <item>
                            <ref>identifier</ref>
                        </item>
                        <composition>
                            <tier>2</tier>
                        </composition>
                    </items>
                </correlators>
            </correlation>
            <synchronization>
                <reaction>
                    <name>set-linked</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>linked</situation>
                    <actions>
                        <synchronize/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-unlinked</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>unlinked</situation>
                    <actions>
                        <link/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-unmatched</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>unmatched</situation>
                    <actions>
                        <addFocus/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-deleted</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>deleted</situation>
                    <actions>
                        <unlink/>
                    </actions>
                </reaction>
                <reaction>
                    <name>set-disputed</name>
                    <lifecycleState>active</lifecycleState>
                    <situation>disputed</situation>
                    <actions>
                        <createCorrelationCase/>
                    </actions>
                </reaction>
            </synchronization>
        </objectType>
    </schemaHandling>
    <capabilities>
        <cachingMetadata>
            <retrievalTimestamp>2023-11-03T07:45:06.865Z</retrievalTimestamp>
            <serialNumber>7a32c97d91aa64-b40d0b1066a47732</serialNumber>
        </cachingMetadata>
        <native xmlns:cap="http://midpoint.evolveum.com/xml/ns/public/resource/capabilities-3">
            <cap:schema/>
            <cap:discoverConfiguration/>
            <cap:activation>
                <cap:status/>
            </cap:activation>
            <cap:credentials>
                <cap:password>
                    <cap:returnedByDefault>false</cap:returnedByDefault>
                </cap:password>
            </cap:credentials>
            <cap:liveSync/>
            <cap:create/>
            <cap:read>
                <cap:returnDefaultAttributesOption>true</cap:returnDefaultAttributesOption>
            </cap:read>
            <cap:update>
                <cap:delta>true</cap:delta>
                <cap:addRemoveAttributeValues>true</cap:addRemoveAttributeValues>
            </cap:update>
            <cap:delete/>
            <cap:testConnection/>
            <cap:script>
                <cap:host>
                    <cap:type>connector</cap:type>
                </cap:host>
            </cap:script>
            <cap:pagedSearch/>
            <cap:auxiliaryObjectClasses/>
        </native>
    </capabilities>
    <consistency>
        <avoidDuplicateValues>true</avoidDuplicateValues>
        <shadowConstraintsCheck>light</shadowConstraintsCheck>
        <avoidDuplicateOperations>true</avoidDuplicateOperations>
        <validateSchema>true</validateSchema>
        <caseIgnoreAttributeNames>true</caseIgnoreAttributeNames>
        <discovery>true</discovery>
        <deadShadowRetentionPeriod>PT0H</deadShadowRetentionPeriod>
    </consistency>
    <business>
        <administrativeState>enabled</administrativeState>
        <approverRef oid="00000000-0000-0000-0000-00000000000a" relation="org:default" type="c:RoleType"/>
        <ownerRef oid="00000000-0000-0000-0000-000000000002" relation="org:default" type="c:UserType"/>
        <operatorRef oid="00000000-0000-0000-0000-00000000000b" relation="org:default" type="c:RoleType"/>
        <correlatorRef oid="00000000-0000-0000-0000-000000000004" relation="org:default" type="c:RoleType"/>
    </business>
</resource>
