[midPoint] Dynamically set approvers of an approval step
petr.kulheim at ibacz.eu
petr.kulheim at ibacz.eu
Wed Mar 28 11:15:05 CEST 2018
Hi Ezequiel,
actually we are using metarole with policyRule in inducement with
approverExpression, e.g.:
<inducement id="1">
<policyRule>
<policyConstraints>
<assignment>
<operation>add</operation>
<relation>q:any</relation>
</assignment>
</policyConstraints>
<policyActions>
<approval>
<compositionStrategy>
<order>20</order>
</compositionStrategy>
<approvalSchema>
<level>
<name>Role Approvers</name>
<approverExpression>
<script
xsi:type="c:ScriptExpressionEvaluatorType">
<code>
import
com.evolveum.midpoint.xml.ns._public.common.common_3.*;
import java.util.*;
//object - user's object whom the
approval is related to
roleApproverRefs =
target.getApproverRef();
approvers = [];
for (user in roleApproverRefs) {
approvers.add(user.getOid());
}
return approvers;
</code>
</script>
</approverExpression>
<evaluationStrategy>firstDecides</evaluationStrategy>
<outcomeIfNoApprovers>reject</outcomeIfNoApprovers>
<duration>PT1H</duration>
<timedActions>
<actions>
<complete>
<outcome>reject</outcome>
</complete>
</actions>
</timedActions>
</level>
</approvalSchema>
</approval>
</policyActions>
</policyRule>
</inducement>
Perhaps you can use object and/or target objects and provide your list
of approvers.
Hope it helps
Best regard
Petr Kulheim
JEE Developer
IBA CZ, s.r.o.
Office: Petržílkova 2565/23, 158 00 Praha, CZ
Phone: +420 603 272826
E-mail: petr.kulheim at ibacz.eu
From: Ezequiel Alonso <ealonso at identicum.com>
To: midpoint at lists.evolveum.com
Date: 27/03/2018 23:23
Subject: [midPoint] Dynamically set approvers of an approval step
Sent by: "midPoint" <midpoint-bounces at lists.evolveum.com>
Hello,
We are trying to figure out how to set approvers of an approval step using
a certain criteria instead of using references to roles or organizations
as it is on several examples on the documentation.
For example, if a user that is requesting a role needs an approval, then
the approver should be the user that is referenced on an extension
attribute of the user, so to set it as an approver, we need to get that
attribute from the user then search the users that meets that condition in
order to set it as the approver.
Is this possible or we can only set approvers by members of a role or
members of an Org.
Thanks!
--
Ezequiel Alonso
Identicum S.A.
Jorge Newbery 3226, Argentina
Tel: +54 (11) 4552-3050
ealonso at identicum.com
www.identicum.com_______________________________________________
midPoint mailing list
midPoint at lists.evolveum.com
http://lists.evolveum.com/mailman/listinfo/midpoint
Disclaimer:
The information contained in this communication is intended solely for the
use of the individual or entity to whom it is addressed and others
authorized to receive it.
It may contain confidential or legally privileged information.
If you are not the intended recipient you are hereby notified that any
disclosure, copying, distribution or taking any action in reliance on the
contents of this information is strictly prohibited and may be unlawful.
If you have received this communication in error, please notify us
immediately by forwarding this email to ict at ibacz.eu and then delete it
from your system.
IBA Group is neither liable for the proper and complete transmission of
the information contained in this communication nor for any delay in its
receipt.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20180328/a1e417c6/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 48578 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20180328/a1e417c6/attachment.png>
More information about the midPoint
mailing list