<div dir="ltr">

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial;font-size:small;background-color:rgb(255,255,255);float:none;display:inline">Hello Petr, thanks for your answer!</span><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;font-size:small"><div><br></div><div>The role that we are trying to set approver actually doesn't have any approver, that's why we are trying to set it dynamically from the information of the user object that is being assign.</div><div>The user object of the request have an attribute (extension attribute managerName) that references to an attribute value of another user (name), so what we need to do is get that attribute from the user, search for the user that meet that criteria and return the approver oid for the ApproverExpression.</div></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;font-size:small"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;font-size:small">What we have up to now is the following script:</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;font-size:small"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;font-size:small"><span class="gmail-im" style="color:rgb(80,0,80)"><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><approverExpression></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">    <script></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">   <span> </span></span>



<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">   <span> </span></span>

<code></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">   <span> </span></span>



<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">   <span> </span></span>



<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">   <span> </span></span>

import com.evolveum.midpoint.xml.ns._<wbr>public.common.common_3.*; </div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">   <span> </span></span>



<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">   <span> </span></span>



<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">   <span> </span></span>

import java.util.*; </div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div></span><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">   <span> </span></span>



<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">   <span> </span></span>



<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">   <span> </span></span>

managerName = basic.getExtensionPropertyValu<wbr>e(object, '<a href="http://midpoint.identicum.com/xml/ns/metaPerson" target="_blank" style="color:rgb(17,85,204)">http://midpoint.identicum.com<wbr>/xml/ns/metaPerson</a>', 'managerName');</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">   <span> </span></span>



<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">   <span> </span></span>



<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">   <span> </span></span>

log.debug("Manager Name : " + managerName);</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">   <span> </span></span>



<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">   <span> </span></span>



<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">   <span> </span></span>

userInMPQuery = QueryBuilder.queryFor(UserType<wbr>.class, getPrismContext()).item(UserTy<wbr>pe.F_NAME).eq(managerName).<wbr>build();</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">   <span> </span></span>



<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">   <span> </span></span>



<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">   <span> </span></span>

userInMP = midpoint.searchObjects(UserTyp<wbr>e.class, userInMPQuery);</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">   <span> </span></span>



<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">   <span> </span></span>



<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">   <span> </span></span>

log.debug(" Query Result" + userInMP.get(0).toString());</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">   <span> </span></span>



<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">   <span> </span></span>



<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">   <span> </span></span>

return userInMP.get(0).getOid();</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">   <span> </span></span>



<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">   <span> </span></span>

</code></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="font-size:12.8px">

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">   <span> </span></span>

<script></span></div></div><div style="text-align:start;text-indent:0px;text-decoration-style:initial;text-decoration-color:initial"><div style="text-decoration-style:initial;text-decoration-color:initial"><div style="color:rgb(34,34,34);font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);font-family:arial,sans-serif;text-align:start;text-indent:0px;text-decoration-style:initial;text-decoration-color:initial"></approverExpression></div><br class="gmail-m_3011729553765785428gmail-Apple-interchange-newline">But for some reason we are not getting any value from that query, we get the "managerName" value successfully but then we can't search for the users that meet that criteria.<br><br>Can anyone give us a clue on how can we execute a query with that criteria ?<br><br>Thanks!<br></div></div>

<br></div><div class="gmail_extra"><br><div class="gmail_quote">2018-03-28 6:15 GMT-03:00  <span dir="ltr"><<a href="mailto:petr.kulheim@ibacz.eu" target="_blank">petr.kulheim@ibacz.eu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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:<wbr>ScriptExpressionEvaluatorType"<wbr>></font>
<br><font size="2" face="sans-serif">           
                  <code></font>
<br><font size="2" face="sans-serif">           
                    import
com.evolveum.midpoint.xml.ns._<wbr>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><wbr>firstDecides</<wbr>evaluationStrategy></font>
<br><font size="2" face="sans-serif">           
            <outcomeIfNoApprovers>reject</<wbr>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: <a href="mailto:petr.kulheim@ibacz.eu" target="_blank">petr.kulheim@ibacz.eu</a></font>
<p><a href="http://www.ibacz.eu/email-signature/index.html" target="_blank"><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 <<a href="mailto:ealonso@identicum.com" target="_blank">ealonso@identicum.com</a>></font>
<br><font size="1" color="#5f5f5f" face="sans-serif">To:      
 </font><font size="1" face="sans-serif"><a href="mailto:midpoint@lists.evolveum.com" target="_blank">midpoint@lists.evolveum.com</a></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"
<<a href="mailto:midpoint-bounces@lists.evolveum.com" target="_blank">midpoint-bounces@lists.<wbr>evolveum.com</a>></font>
<br>
</p><hr noshade><div><div class="h5">
<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></div></div><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">_____________<wbr>______________________________<wbr>____<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a><br>
</font></tt><a href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank"><tt><font size="2">http://lists.evolveum.com/<wbr>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 <a href="mailto:ict@ibacz.eu" target="_blank">ict@ibacz.eu</a> 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>
<p></p><br>______________________________<wbr>_________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a><br>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/<wbr>mailman/listinfo/midpoint</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><font size="1"><b>Ezequiel Alonso</b><br><i><font color="#999999"><font face="georgia, serif">I</font><font face="verdana, sans-serif">denticum S.A.<br>Jorge Newbery 3226, Argentina<br>Tel: +54 (11) 4552-3050<br></font></font></i></font><div><font color="#999999" face="verdana, sans-serif" size="1"><i><a href="mailto:ealonso@identicum.com" style="color:rgb(17,85,204)" target="_blank">ealonso@identicum.com</a><br><a href="http://www.identicum.com/" style="color:rgb(17,85,204)" target="_blank">www.identicum.com</a></i></font></div></div></div></div></div>
</div>