<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body 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>
    <p>Best regards,<br>
    </p>
    <pre class="moz-signature" cols="72">Pavol Mederly
Software developer
evolveum.com
</pre>
    <div class="moz-cite-prefix">On 26.09.2017 18:21, Marcos Arevalo
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAFdx=BANZZqifu5amSKJzLmyuE+EWsePdO7qFybvdZbAbxRnhA@mail.gmail.com">
      <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"
              moz-do-not-send="true">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_7599383281507491959moz-signature" cols="72">Pavol Mederly
Software developer
<a href="http://evolveum.com" target="_blank" moz-do-not-send="true">evolveum.com</a>
</pre>
              <div class="m_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_7599383281507491959mimeAttachmentHeader"></fieldset>
                <br>
                <pre>______________________________<wbr>_________________
midPoint mailing list
<a class="m_7599383281507491959moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com" target="_blank" moz-do-not-send="true">midPoint@lists.evolveum.com</a>
<a class="m_7599383281507491959moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank" moz-do-not-send="true">http://lists.evolveum.com/<wbr>mailman/listinfo/midpoint</a>
</pre>
              </blockquote>
              <br>
            </div>
            <br>
            ______________________________<wbr>_________________<br>
            midPoint mailing list<br>
            <a href="mailto:midPoint@lists.evolveum.com"
              moz-do-not-send="true">midPoint@lists.evolveum.com</a><br>
            <a
              href="http://lists.evolveum.com/mailman/listinfo/midpoint"
              rel="noreferrer" target="_blank" moz-do-not-send="true">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" moz-do-not-send="true"><span>info@corenetworks.es</span></a>.</span></p>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
midPoint mailing list
<a class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>