<font size=2 face="sans-serif">Hi Ezequiel,</font>
<br><font size=2 face="sans-serif">actually we are using metarole with
policyRule in inducement with approverExpression, e.g.:</font>
<br><font size=2 face="sans-serif"><inducement id="1"></font>
<br><font size=2 face="sans-serif"> <policyRule></font>
<br><font size=2 face="sans-serif">
<policyConstraints></font>
<br><font size=2 face="sans-serif">
<assignment></font>
<br><font size=2 face="sans-serif">
<operation>add</operation></font>
<br><font size=2 face="sans-serif">
<relation>q:any</relation></font>
<br><font size=2 face="sans-serif">
</assignment></font>
<br><font size=2 face="sans-serif">
</policyConstraints></font>
<br><font size=2 face="sans-serif">
<policyActions></font>
<br><font size=2 face="sans-serif">
<approval></font>
<br><font size=2 face="sans-serif">
<compositionStrategy></font>
<br><font size=2 face="sans-serif">
<order>20</order></font>
<br><font size=2 face="sans-serif">
</compositionStrategy></font>
<br><font size=2 face="sans-serif">
<approvalSchema></font>
<br><font size=2 face="sans-serif">
<level></font>
<br><font size=2 face="sans-serif">
<name>Role Approvers</name></font>
<br><font size=2 face="sans-serif">
<approverExpression></font>
<br><font size=2 face="sans-serif">
<script xsi:type="c:ScriptExpressionEvaluatorType"></font>
<br><font size=2 face="sans-serif">
<code></font>
<br><font size=2 face="sans-serif">
import
com.evolveum.midpoint.xml.ns._public.common.common_3.*;</font>
<br><font size=2 face="sans-serif">
import
java.util.*;</font>
<br>
<br><font size=2 face="sans-serif">
//object
- user's object whom the approval is related to</font>
<br>
<br><font size=2 face="sans-serif">
roleApproverRefs
= target.getApproverRef();</font>
<br><font size=2 face="sans-serif">
approvers
= [];</font>
<br><font size=2 face="sans-serif">
for
(user in roleApproverRefs) {</font>
<br><font size=2 face="sans-serif">
approvers.add(user.getOid());</font>
<br><font size=2 face="sans-serif">
}</font>
<br><font size=2 face="sans-serif">
return
approvers;</font>
<br><font size=2 face="sans-serif">
</code></font>
<br><font size=2 face="sans-serif">
</script></font>
<br><font size=2 face="sans-serif">
</approverExpression></font>
<br><font size=2 face="sans-serif">
<evaluationStrategy>firstDecides</evaluationStrategy></font>
<br><font size=2 face="sans-serif">
<outcomeIfNoApprovers>reject</outcomeIfNoApprovers></font>
<br><font size=2 face="sans-serif">
<duration>PT1H</duration></font>
<br><font size=2 face="sans-serif">
<timedActions></font>
<br><font size=2 face="sans-serif">
<actions></font>
<br><font size=2 face="sans-serif">
<complete></font>
<br><font size=2 face="sans-serif">
<outcome>reject</outcome></font>
<br><font size=2 face="sans-serif">
</complete></font>
<br><font size=2 face="sans-serif">
</actions></font>
<br><font size=2 face="sans-serif">
</timedActions></font>
<br><font size=2 face="sans-serif">
</level></font>
<br><font size=2 face="sans-serif">
</approvalSchema></font>
<br><font size=2 face="sans-serif">
</approval></font>
<br><font size=2 face="sans-serif">
</policyActions></font>
<br><font size=2 face="sans-serif"> </policyRule></font>
<br><font size=2 face="sans-serif"></inducement></font>
<br>
<br><font size=2 face="sans-serif">Perhaps you can use <i>object</i> and/or
<i>target </i> objects and provide your list of approvers.</font>
<br>
<br><font size=2 face="sans-serif">Hope it helps</font>
<br>
<br><font size=2 face="sans-serif">Best regard</font>
<br>
<br><font size=2 face="sans-serif"><br>
</font>
<br><font size=2 face="Arial">Petr Kulheim<br>
JEE Developer<br>
<br>
IBA CZ, s.r.o.<br>
Office: Petržílkova 2565/23, 158 00 Praha, CZ<br>
Phone: +420 603 272826<br>
E-mail: petr.kulheim@ibacz.eu</font>
<p><a href="http://www.ibacz.eu/email-signature/index.html"><img src=cid:_4_0ECDC5D00ECDC0DC0032D11BC125825E width=600 height=74 alt="IBACZ email signature" style="border:0px solid;"></a>
<br>
<br>
<br><font size=2 face="sans-serif"> </font>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">From:
</font><font size=1 face="sans-serif">Ezequiel Alonso <ealonso@identicum.com></font>
<br><font size=1 color=#5f5f5f face="sans-serif">To:
</font><font size=1 face="sans-serif">midpoint@lists.evolveum.com</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Date:
</font><font size=1 face="sans-serif">27/03/2018 23:23</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Subject:
</font><font size=1 face="sans-serif">[midPoint] Dynamically
set approvers of an approval step</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Sent by:
</font><font size=1 face="sans-serif">"midPoint"
<midpoint-bounces@lists.evolveum.com></font>
<br>
<hr noshade>
<br>
<br>
<br><font size=3>Hello, </font>
<br>
<br><font size=3>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.</font>
<br>
<br><font size=3>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.</font>
<br>
<br><font size=3>Is this possible or we can only set approvers by members
of a role or members of an Org.</font>
<br>
<br><font size=3>Thanks! </font>
<br>
<br><font size=3>-- </font>
<br><font size=1><b>Ezequiel Alonso</b></font><font size=1 color=#a2a2a2 face="Georgia"><i><br>
I</i></font><font size=1 color=#a2a2a2 face="Verdana"><i>denticum S.A.<br>
Jorge Newbery 3226, Argentina<br>
Tel: +54 (11) 4552-3050</i></font>
<br><a href=mailto:ealonso@identicum.com target=_blank><font size=1 color=#0062e1 face="Verdana"><i><u>ealonso@identicum.com</u></i></font></a><font size=1 color=#0062e1 face="Verdana"><i><u><br>
</u></i></font><a href=http://www.identicum.com/ target=_blank><font size=1 color=#0062e1 face="Verdana"><i><u>www.identicum.com</u></i></font></a><tt><font size=2>_______________________________________________<br>
midPoint mailing list<br>
midPoint@lists.evolveum.com<br>
</font></tt><a href=http://lists.evolveum.com/mailman/listinfo/midpoint><tt><font size=2>http://lists.evolveum.com/mailman/listinfo/midpoint</font></tt></a><tt><font size=2><br>
</font></tt>
<br><font size=2 face="sans-serif"><br>
<br>
</font>
<hr><font size=2 face="sans-serif">Disclaimer:<br>
<br>
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.<br>
It may contain confidential or legally privileged information.<br>
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.<br>
If you have received this communication in error, please notify us immediately
by forwarding this email to ict@ibacz.eu and then delete it from your system.<br>
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.</font>
<br>