<?xml version="1.0" encoding="UTF-8"?>
<objectTemplate oid="10000000-0000-0000-0000-000000000241"
                xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
                xmlns='http://midpoint.evolveum.com/xml/ns/public/common/common-3'
                xmlns:c='http://midpoint.evolveum.com/xml/ns/public/common/common-3'
                xmlns:t='http://prism.evolveum.com/xml/ns/public/types-3'
                xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
                xmlns:ext="http://midpoint.evolveum.com/xml/ns/story/orgsync/ext">

    <name>Org Template</name>

    <!-- SAP Roles -->

    <mapping>
        <name>SAP Role (ActivityGroup) metarole assignment</name>
        <authoritative>true</authoritative>
        <strength>strong</strength>
        <source>
            <path>subtype</path>
        </source>
        <expression>
            <assignmentTargetSearch>
                <targetType>c:RoleType</targetType>
                <oid>056f714a-efac-476f-b38e-9588b4907e5b</oid>
            </assignmentTargetSearch>
        </expression>
        <target>
            <path>assignment</path>
        </target>
        <condition>
            <script>
                <code>subtype == 'sap-role'</code>
            </script>
        </condition>
    </mapping>

    <mapping>
        <name>Parent for SAP Roles</name>
        <authoritative>true</authoritative>
        <strength>strong</strength>
        <source>
            <path>subtype</path>
        </source>
        <expression>
            <assignmentTargetSearch>
                <targetType>c:OrgType</targetType>
                <oid>d13f5205-3348-4742-aedb-874d272806eb</oid>
            </assignmentTargetSearch>
        </expression>
        <target>
            <path>assignment</path>
        </target>
        <condition>
            <script>
                <code>subtype == 'sap-role'</code>
            </script>
        </condition>
    </mapping>

    <!-- SAP Groups -->

    <mapping>
        <name>SAP Group metarole assignment</name>
        <authoritative>true</authoritative>
        <strength>strong</strength>
        <source>
            <path>subtype</path>
        </source>
        <expression>
            <assignmentTargetSearch>
                <targetType>c:RoleType</targetType>
                <oid>239990f4-ffb9-417e-8784-7dc72e645db5</oid>
            </assignmentTargetSearch>
        </expression>
        <target>
            <path>assignment</path>
        </target>
        <condition>
            <script>
                <code>subtype == 'sap-group'</code>
            </script>
        </condition>
    </mapping>

    <mapping>
        <name>Parent for SAP Groups</name>
        <authoritative>true</authoritative>
        <strength>strong</strength>
        <source>
            <path>subtype</path>
        </source>
        <expression>
            <assignmentTargetSearch>
                <targetType>c:OrgType</targetType>
                <oid>293e12ed-553a-468a-a7d1-99460b264fa1</oid>
            </assignmentTargetSearch>
        </expression>
        <target>
            <path>assignment</path>
        </target>
        <condition>
            <script>
                <code>subtype == 'sap-group'</code>
            </script>
        </condition>
    </mapping>

    <!-- SAP Profiles -->

    <mapping>
        <name>SAP Profile metarole assignment</name>
        <authoritative>true</authoritative>
        <strength>strong</strength>
        <source>
            <path>subtype</path>
        </source>
        <expression>
            <assignmentTargetSearch>
                <targetType>c:RoleType</targetType>
                <oid>1fc57929-9f8c-4cc2-9bec-0873812704cd</oid>
            </assignmentTargetSearch>
        </expression>
        <target>
            <path>assignment</path>
        </target>
        <condition>
            <script>
                <code>subtype == 'sap-profile'</code>
            </script>
        </condition>
    </mapping>

    <mapping>
        <name>Parent for SAP Profiles</name>
        <authoritative>true</authoritative>
        <strength>strong</strength>
        <source>
            <path>subtype</path>
        </source>
        <expression>
            <assignmentTargetSearch>
                <targetType>c:OrgType</targetType>
                <oid>b579d7b9-26f9-4cbd-87c7-74f549ce97e0</oid>
            </assignmentTargetSearch>
        </expression>
        <target>
            <path>assignment</path>
        </target>
        <condition>
            <script>
                <code>subtype == 'sap-profile'</code>
            </script>
        </condition>
    </mapping>

</objectTemplate>
