<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hello Oskar,</p>
    <p>I am not sure how to do this. If you throw an exception in
      approverExpression, then the whole operation fails, a red box will
      be shown, and no notifications will be sent.</p>
    <p>You could play with ItemApproval BPMN process, maybe, replacing
      the original version using an overlay.</p>
    <p>Or, you could change
com.evolveum.midpoint.wf.impl.processes.itemApproval.InitializeLoopThroughApproversInLevel
      and/or
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      SummarizeDecisionsInLevel to cover the situation when there are no
      approvers. But be careful, because it's not easy to distinguish
      between a situation when the item is automatically approved (using
      an expression) and when there are really no approvers found.</p>
    <p>Overall, in 3.5 this is not easily done. This hacking could work,
      but 3.6 is much more flexible in this respect.<br>
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
    </p>
    <pre class="moz-signature" cols="72">Pavol Mederly
Software developer
evolveum.com
</pre>
    <div class="moz-cite-prefix">On 27.03.2017 9:21, Oskar Butovič - AMI
      Praha a.s. wrote:<br>
    </div>
    <blockquote
cite="mid:CAE8MtZBmnYueoDRePjeppSL0p2Ksra8AV68PSyjnMromztshYw@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hello everybody,
        <div><br>
        </div>
        <div>I am implementing workflow in midpoint 3.5. Under certain
          conditions (no approver found and for speciffic roles always)
          I need to refuse assignment outright.</div>
        <div><br>
        </div>
        <div>I saw outcomeIfNoApprovers planned for 3.6 . Is there any
          way around it in 3.5? Will refusal notifiacations be sent If i
          throw exception in an approverExpression?</div>
        <div><br>
        </div>
        <div>Best Regards</div>
        <div><br>
        </div>
        <div>Oskar Butovič<br clear="all">
          <div><br>
          </div>
          -- <br>
          <div class="gmail_signature">
            <div dir="ltr">
              <div>
                <div dir="ltr">
                  <div>
                    <div dir="ltr">
                      <div dir="ltr">
                        <table
style="font-family:verdana,arial,helvetica,sans-serif;border-collapse:collapse;padding:0px;margin:0px;border-width:0px;border-style:solid;width:482px">
                          <tbody>
                            <tr style="padding:0px;margin:0px;border:0px
                              solid gray">
                              <td
style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:11px;width:160px;vertical-align:bottom;padding:0px;border:0px
                                solid gray">
                                <p><span
                                    style="font-size:14px;font-weight:bold">Oskar
                                    Butovič</span><br>
                                  solution architect<br>
                                  <br>
                                  gsm: [+420] 774 480 101<br>
                                  e-mail: <a moz-do-not-send="true"
                                    href="mailto:oskar.butovic@ami.cz"
                                    target="_blank">oskar.butovic@ami.cz</a></p>
                              </td>
                              <td
style="color:rgb(0,0,0);font-family:verdana,arial,helvetica,sans-serif;font-size:10px;border-width:0px
                                1px 0px
                                0px;border-style:solid;border-color:gray
                                rgb(204,204,204) gray gray;padding:0px">   </td>
                              <td
style="color:rgb(0,0,0);font-family:verdana,arial,helvetica,sans-serif;font-size:10px;padding:0px;border:0px
                                solid gray">   </td>
                              <td
style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:11px;vertical-align:bottom;padding:0px;width:123px;border:0px
                                solid gray">
                                <p>AMI Praha a.s.<br>
                                  Pláničkova 11<br>
                                  162 00 Praha 6<br>
                                  tel.: [+420] 274 783 239<br>
                                  web: <a moz-do-not-send="true"
                                    href="http://www.ami.cz/"
                                    target="_blank">www.ami.cz</a></p>
                              </td>
                              <td
style="color:rgb(0,0,0);font-family:verdana,arial,helvetica,sans-serif;font-size:10px;border-width:0px
                                1px 0px
                                0px;border-style:solid;border-color:gray
                                rgb(204,204,204) gray gray;padding:0px">   </td>
                              <td
style="color:rgb(0,0,0);font-family:verdana,arial,helvetica,sans-serif;font-size:10px;padding:0px;border:0px
                                solid gray">   </td>
                              <td
style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:11px;margin:8px;width:116px;border:0px
                                solid gray">
                                <p><img moz-do-not-send="true"
                                    src="http://www.ami.cz/images/podpis/ami_logo.gif"
                                    alt="AMI Praha a.s." style="border:
                                    0px;"></p>
                              </td>
                            </tr>
                            <tr style="padding:0px;margin:0px;border:0px
                              solid gray">
                              <td colspan="7"
style="color:rgb(0,0,0);font-family:verdana,arial,helvetica,sans-serif;font-size:10px;padding:0px;width:480px;border:0px
                                solid gray"><br>
                                <a moz-do-not-send="true"
href="http://www.ami.cz/reseni-a-sluzby/bezpecnost-dat/identity-management"
                                  target="_blank"><img
                                    moz-do-not-send="true"
                                    src="http://www.ami.cz/images/podpis/AMI-podpis-IdM_1.png"
                                    alt="AMI Praha a.s." style="border:
                                    0px; width: 480px; height: 82px;"></a></td>
                            </tr>
                            <tr style="padding:0px;margin:0px;border:0px
                              solid gray">
                              <td colspan="7"
style="color:rgb(128,128,128);font-family:arial,sans-serif;font-size:11px;padding:0px;border:0px
                                solid gray"><br>
                                Textem tohoto e-mailu podepisující
                                neslibuje uzavřít ani neuzavírá za
                                společnost AMI Praha a.s.<br>
                                jakoukoliv smlouvu. Každá smlouva, pokud
                                bude uzavřena, musí mít výhradně
                                písemnou formu.<br>
                                <br>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <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>