[midPoint] Question regarding Approval Escalations
Patrik Sidler
patrik.sidler at itconcepts.ch
Mon Sep 4 17:21:36 CEST 2023
Hi All,
I am looking for a way to implement 2 level Escalation whenever an Approval process is not proceeding.
What I want to do:
Approval:
1. User requests a Role
2. Role is configured to request Manager for Approval
3. Notification Reminders are sent out before Escalation
4. If the Manager does not Approve/Reject in a predefined Time ==> Escalation
Escalation Level 1:
1. Now the Manager's Manager is added to the Approvers List
2. Notification Reminders are sent out before Escalation
3. If the Manager's Manager does not Approve/Reject in a predefined Time ==> Escalation
Escalation Level 2:
1. Now administrator is added to Approvers list.
And here is the Code I already have, but it does not work as I expect it:
<globalPolicyRule id="438">
<name>Approval Escalation Policy</name>
<policyConstraints>
<situation id="440">
<situation>http://midpoint.evolveum.com/xml/ns/public/model/policy/situation#modified</situation>
</situation>
</policyConstraints>
<policyActions>
<approval id="441">
<compositionStrategy>
<mergeIntoOrder>10</mergeIntoOrder>
<mergeIntoOrder>40</mergeIntoOrder>
</compositionStrategy>
<approvalSchema>
<stage id="442">
<duration>PT10M</duration>
<timedActions id="443">
<actions>
<escalate>
<approverExpression>
<script>
<code>
midpoint.getManagersOidsExceptUser(workItem.assigneeRef)
</code>
</script>
</approverExpression>
<duration>PT4M</duration>
<delegationMethod>addAssignees</delegationMethod>
<notifyBeforeAction>PT3M</notifyBeforeAction>
<notifyBeforeAction>PT1M</notifyBeforeAction>
<escalationLevelName>Line manager escalation</escalationLevelName>
</escalate>
</actions>
<escalationLevelFrom>1</escalationLevelFrom>
<escalationLevelTo>1</escalationLevelTo>
</timedActions>
<timedActions id="444">
<actions>
<escalate>
<approverExpression>
<script>
<code>
import java.util.*
Collection approvers
approvers.add("administrator")
return approvers
</code>
</script>
</approverExpression>
<duration>PT4M</duration>
<delegationMethod>addAssignees</delegationMethod>
<notifyBeforeAction>PT3M</notifyBeforeAction>
<notifyBeforeAction>PT1M</notifyBeforeAction>
<escalationLevelName>Superuser escalation</escalationLevelName>
</escalate>
</actions>
<escalationLevelFrom>2</escalationLevelFrom>
<escalationLevelTo>2</escalationLevelTo>
</timedActions>
</stage>
</approvalSchema>
</approval>
</policyActions>
<evaluationTarget>assignment</evaluationTarget>
<focusSelector>
<type>UserType</type>
</focusSelector>
<targetSelector>
<type>RoleType</type>
</targetSelector>
</globalPolicyRule>
Thank you in advance for your help/tipps to solve this issue.
Regards,
Patrik Sidler
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20230904/ab3d5e0b/attachment-0001.htm>
More information about the midPoint
mailing list