<policy oid="e4464c00-18ec-4d58-90b2-b2b6c961a2ca"
        xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3">
    <name>Approval by line manager</name>
    <description>Line manager of the user for whom the request is made must approve the request.</description>
    <assignment>
        <identifier>org-approval-policies</identifier>
        <targetRef oid="e7a48bb0-5361-4862-bf44-cd970c7ad021" type="OrgType"/>
    </assignment>
    <inducement>
        <policyRule>
            <name>approval-by-line-manager</name>
            <policyConstraints>
                <assignment/>
            </policyConstraints>
            <policyActions>
                <approval>
                    <compositionStrategy>
                        <order>10</order>
                    </compositionStrategy>
                    <approvalSchema>
                        <stage>
                            <name>Line managers</name>
                            <approverExpression>
                                <trace>true</trace>
                                <script>
                                    <code>midpoint.getManagersOidsExceptUser(object)</code>
                                </script>
                            </approverExpression>
                            <evaluationStrategy>allMustApprove</evaluationStrategy>
                            <outcomeIfNoApprovers>reject</outcomeIfNoApprovers>
                        </stage>
                    </approvalSchema>
                </approval>
            </policyActions>
        </policyRule>
    </inducement>
</policy>
