<objectTemplate xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
        xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
        xmlns:org="http://midpoint.evolveum.com/xml/ns/public/common/org-3"
        oid="template-defaultOrg">
    <name>Default Org Template</name>
    <description>
        This object is used when creating/modifying an organization.
    </description>
    <item>
        <c:ref>subtype</c:ref>
        <displayName>Type</displayName>
        <valueEnumerationRef xmlns:tns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
                oid="lookup-typesOrgs"
                relation="org:default"
                type="tns:LookupTableType"/>
    </item>
    <item>
        <c:ref>riskLevel</c:ref>
        <displayName>Risk Level</displayName>
        <valueEnumerationRef xmlns:tns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
                oid="lookup-riskLevels"
                relation="org:default"
                type="tns:LookupTableType"/>
    </item>
    <item>
        <c:ref>c:costCenter</c:ref>
        <displayName>Department Code</displayName>
    </item>
    <item>
        <c:ref>c:mailDomain</c:ref>
        <displayName>Email Address</displayName>
    </item>
    <mapping>
        <name>Org Metarole Assignment</name>
        <strength>strong</strength>
        <source>
            <c:path>subtype</c:path>
        </source>
        <expression>
            <assignmentTargetSearch>
                <targetType>c:RoleType</targetType>
                <oid>metarole-OrgToOrg</oid>
            </assignmentTargetSearch>
        </expression>
        <target>
            <c:path>assignment</c:path>
        </target>
        <condition>
            <script>
                <code>subtype == 'TOP' || subtype == 'Domain' || subtype == 'Organization' || subtype == 'Organizational Unit'</code>
            </script>
        </condition>
    </mapping>
    <mapping>
        <name>Org Metarole Course Registry Assignment</name>
        <strength>strong</strength>
        <source>
            <c:path>subtype</c:path>
        </source>
        <expression>
            <assignmentTargetSearch>
                <targetType>c:RoleType</targetType>
                <oid>159cd4a7-28b1-4ae0-8194-d1606c340206</oid>
            </assignmentTargetSearch>
        </expression>
        <target>
            <c:path>assignment</c:path>
        </target>
        <condition>
            <script>
                <code>subtype == 'Course Group'</code>
            </script>
        </condition>
    </mapping>
    <mapping>
        <name>Org Metarole OrgUnit Registry Assignment</name>
        <strength>strong</strength>
        <source>
            <c:path>subtype</c:path>
        </source>
        <expression>
            <assignmentTargetSearch>
                <targetType>c:RoleType</targetType>
                <oid>8e9c0012-12c0-4318-9963-7c3ccdcdcd08</oid>
            </assignmentTargetSearch>
        </expression>
        <target>
            <c:path>assignment</c:path>
        </target>
        <condition>
            <script>
                <code>subtype == 'Course OrgUnit'</code>
            </script>
        </condition>
    </mapping>
</objectTemplate>
