<div dir="ltr">Thanks for the answer. Yes, <span style="font-size:12.8px">it might work. </span><span style="font-size:12.8px">In fact, I have implemented it in a similar way. From a user attribute I have two mappings: one to the assignment of type approver, and another mapping to the Role of approver. </span><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">But the problem is that I'm not clear how to navigate between different objects. Can I </span><span style="font-size:12.8px">put an attribute into a role or organization, </span><span style="font-size:12.8px">from the user template ? Is there any documentation about it ( not groovy ) ? </span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">That is the matter of substance. </span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Thanks again and regads. </span></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-09-26 18:37 GMT+02:00 Pavol Mederly <span dir="ltr"><<a href="mailto:mederly@evolveum.com" target="_blank">mederly@evolveum.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>Oh yes. Now I understand better.</p>
<p>First of all, it is strongly advisable to define approvers for a
role/org <b>not</b> via approverRef item on a role/org, but via
an assignment from the user (the approver) to the role/org, with a
relation of org:approver. Although basic approval functionality
would probably work with the old way of specifying approvals, not
all features would be available.</p>
<p>Back to your question, it could be possible to write a mapping
that would take all assignments of a user, determine if there's
any assignment with org:approver as a relation, and if so, add an
assignment to Approver role. (Maybe the examination of all
assignments could be in the condition for such a mapping.)<br>
</p>
<p>I haven't tried that myself. But it might work.</p><span class="">
<p>Best regards,<br>
</p>
<pre class="m_-1225120982882490763moz-signature" cols="72">Pavol Mederly
Software developer
<a href="http://evolveum.com" target="_blank">evolveum.com</a>
</pre>
</span><div><div class="h5"><div class="m_-1225120982882490763moz-cite-prefix">On 26.09.2017 18:21, Marcos Arevalo
wrote:<br>
</div>
</div></div><blockquote type="cite"><div><div class="h5">
<div dir="ltr">
<div>Thanks for the answer . Yes, I will explain it better.
The default behavior in midpoint if I define that User1 is
the approver of Org1, is that User1 doen't have the Approver
Role automaticly</div>
<div><br>
</div>
<div> I want every time I define a approver into a Org or Role
( $org/approver or $role/approver ), midpoint gives Approver
Role to this person at the same time automatically </div>
<div><br>
</div>
<div>Regards</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2017-09-26 17:56 GMT+02:00 Pavol
Mederly <span dir="ltr"><<a href="mailto:mederly@evolveum.com" target="_blank">mederly@evolveum.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>Hello Marcos,</p>
<p>you can always use arbitrary groovy code in your
mappings, even to do repository searches and the like.
It is to be used only as the last resort, because it can
get complicated and performance-degrading. <br>
</p>
<p>But from your question I couldn't comprehend what
exactly you are trying to achieve. Could you provide an
example?</p>
<p>Best regards,<br>
</p>
<pre class="m_-1225120982882490763m_7599383281507491959moz-signature" cols="72">Pavol Mederly
Software developer
<a href="http://evolveum.com" target="_blank">evolveum.com</a>
</pre>
<div class="m_-1225120982882490763m_7599383281507491959moz-cite-prefix">On
10.09.2017 5:27, Marcos Arrobas wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hi. I have been looking for several days
to respond this problem without success.<br>
<br>
I am trying to give the role of approver to a user, in
a organization template (object template). When I
add a approver to an organization, I want give this
role to the user automaticly in the same operation<br>
<br>
Is there a way to assign the approver to an
organization and the Approver role to a user in the
same operation? Can i do this in a mapping tag into
the a Organization Template ? Im playing now with the
mapping / target attribute in the Org. Template
without success. Am I on the right path?<br>
<br>
I have found many examples of mappings between the
same object ( attributes to attributes, attributes to
assigments ), but I have not found any about how to
navigate between objects. Any help or guidance will be
greatly appreciated.<br>
<br>
Thanks in advance</div>
<br>
<fieldset class="m_-1225120982882490763m_7599383281507491959mimeAttachmentHeader"></fieldset>
<br>
<pre>______________________________<wbr>_________________
midPoint mailing list
<a class="m_-1225120982882490763m_7599383281507491959moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a class="m_-1225120982882490763m_7599383281507491959moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">http://lists.evolveum.com/mail<wbr>man/listinfo/midpoint</a>
</pre>
</blockquote>
<br>
</div>
<br>
______________________________<wbr>_________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a><br>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/mail<wbr>man/listinfo/midpoint</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
</div></div><p><span>Segun el Articulo 5 de la L.O.P.D, le informamos que sus
datos constan en un fichero titularidad de CORE NETWORKS,
S.L., cuya finalidad es la gestion administrativa. Podra
ejercer su derecho de acceso, rectificacion, cancelacion y
oposicion mediante correo postal a C/ Serrano Galvache, 56,
Edificio Olmo, 1 Planta - C.P. 28033 (MADRID), o enviando un
correo electrónico a <a href="mailto:info@corenetworks.es" target="_blank"><span>info@corenetworks.es</span></a>.</span></p><span class="">
<br>
<fieldset class="m_-1225120982882490763mimeAttachmentHeader"></fieldset>
<br>
<pre>______________________________<wbr>_________________
midPoint mailing list
<a class="m_-1225120982882490763moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a class="m_-1225120982882490763moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">http://lists.evolveum.com/<wbr>mailman/listinfo/midpoint</a>
</pre>
</span></blockquote>
<br>
</div>
<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></div>
<br>
<p><span>Segun el Articulo 5 de la L.O.P.D, le informamos que sus datos constan en un fichero titularidad de CORE NETWORKS, S.L., cuya finalidad es la gestion administrativa. Podra ejercer su derecho de acceso, rectificacion, cancelacion y oposicion mediante correo postal a C/ Serrano Galvache, 56, Edificio Olmo, 1 Planta - C.P. 28033 (MADRID), o enviando un correo electrónico a <a href="mailto:info@corenetworks.es" target="_blank"><span>info@corenetworks.es</span></a>.</span></p>