<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">Dear Steve,</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">Thank you for highlighting this!</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">We have just checked it and our file
      seems to contain the same lines like the ones you have shared
      (although this Evergreen installation dates back to 2011 when we
      started running a 2.0.7 version :-).</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">Linda</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">On 7/11/22 21:57, Steve Callender
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CADPukLHD14D2Xcj9kcfOiLQp38=nVRnULy1M1ipPDfOSz=PYUQ@mail.gmail.com">
      <div dir="ltr">
        <div>Here's a small thing you can check. I see this causing
          issues quite a lot for these particular hooks, make sure you
          have,</div>
        <div><br>
        </div>
        <div><span><span>    "au.expired" : {
            </span><br>
                   "context_org":"home_ou",
            <br>
                   "filter"                :
            <br>
                                   { "active":"t",
            <br>
                                   "deleted":"f" }
            <br>
                   },</span></div>
        <div><span><br>
          </span></div>
        <div><span><span>    "au.created" : {
            </span><br>
                   "context_org":"home_ou",
            <br>
                   "filter": {
            <br>
                       "active":"t",
            <br>
                       "deleted":"f"
            <br>
                   }
            <br>
               },<br>
            <br>
          </span></div>
        <div>In your <span>action_trigger_filters.json file. I've seen
            folks have an older version of this file and not updated to
            teach the triggers the context of the new hooks. </span></div>
        <div><span><br>
          </span></div>
        <div><span>You should be able to find a good example in the
            current tarbell under, </span></div>
        <div><span><span>./Open-ILS/examples/action_trigger_filters.json.example</span><br>
          </span></div>
        <div><br>
        </div>
        <div>Maybe that would help. </div>
        <div><br>
        </div>
        <div>Steven Callender<br>
          Support Manager<br>
          Equinox Open Library Initiative<br>
          phone:  +1 (877) Open-ILS (673-6457)<br>
          <a href="mailto:stevecallender@EquinoxInitiative.org"
            target="_blank" moz-do-not-send="true">email:
             stevecallender@equinoxOLI.org</a><br>
          web:<span>  </span><a href="https://equinoxinitiative.org/"
            target="_blank" moz-do-not-send="true">https://equinoxOLI.org/</a><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <br>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">On Mon, Jul 11, 2022 at 3:40
            PM Linda Jansová via Evergreen-general <<a
              href="mailto:evergreen-general@list.evergreen-ils.org"
              target="_blank" moz-do-not-send="true"
              class="moz-txt-link-freetext">evergreen-general@list.evergreen-ils.org</a>>
            wrote:<br>
          </div>
          <blockquote class="gmail_quote">
            <div>
              <div>Hi Michele,</div>
              <div><br>
              </div>
              <div>Thank you very much for all the suggestions including
                the SQL command which I find very helpful for the
                debugging process!</div>
              <div><br>
              </div>
              <div>Linda<br>
              </div>
              <div><br>
              </div>
              <div>On 7/11/22 17:12, Morgan, Michele wrote:<br>
              </div>
              <blockquote type="cite">
                <div dir="ltr">
                  <div>Hi Linda,</div>
                  <div><br>
                  </div>
                  <div>We have had triggers running using both the
                    au.created and au.expired hooks for some time
                    without problems. We've had success with them
                    configured at both the consortium and system levels.</div>
                  <div><br>
                  </div>
                  <div>Our configurations are similar to the stock ones
                    you referenced. Of course, we have set Enabled to
                    TRUE, whereas they are not enabled by default.</div>
                  <div><br>
                  </div>
                  <div>We also use a granularity and custom filter, but
                    adding those elements will not make triggers succeed
                    that are failing.</div>
                  <div><br>
                  </div>
                  <div>Here is our crontab entry for running the new
                    user action trigger:</div>
                  <div><br>
                    # New User Welcome Message - check every 2 minutes<br>
                    */2 * * * * . ~/.bashrc && $EG_BIN_DIR/<a
                      href="http://action_trigger_runner.pl"
                      target="_blank" moz-do-not-send="true">action_trigger_runner.pl</a>
                    --osrf-config $SRF_CORE --process-hooks
                    --run-pending --granularity welcome
                    --granularity-only --custom-filters
                    $AT_FILTERS/a_t_filters.welcome_public.json<br>
                  </div>
                  <div><br>
                  </div>
                  <div>If you have access to the database, you can run
                    this query as a basic check to see if triggers
                    specified by the event definition id for the current
                    day are processing:<br>
                  </div>
                  <div><br>
                  </div>
                  <div>SELECT state, count(*) </div>
                  <div>FROM action_trigger.event<br>
                    WHERE date(add_time) = date(now())<br>
                    AND event_def = <event definition id><br>
                    GROUP BY 1<br>
                    ORDER BY 1<br>
                  </div>
                  <div><br>
                  </div>
                  <div>Hope this is helpful,</div>
                  <div>Michele</div>
                  <div><br>
                  </div>
                  <div>
                    <div dir="ltr">
                      <div dir="ltr">
                        <div dir="ltr">
                          <div dir="ltr">
                            <div dir="ltr">
                              <div dir="ltr">
                                <div><span>--</span><br>
                                </div>
                                <div>Michele M. Morgan, <span>Technical
                                    Support Analyst<br>
                                  </span></div>
                                <div><span>North of Boston Library
                                    Exchange, Danvers Massachusetts</span></div>
                                <div><span><a
                                      href="mailto:mmorgan@noblenet.org"
                                      target="_blank"
                                      moz-do-not-send="true"
                                      class="moz-txt-link-freetext">mmorgan@noblenet.org</a></span></div>
                                <div><br>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                  <br>
                </div>
                <br>
                <div class="gmail_quote">
                  <div dir="ltr" class="gmail_attr">On Mon, Jul 11, 2022
                    at 7:40 AM Linda Jansová via Evergreen-general <<a
href="mailto:evergreen-general@list.evergreen-ils.org" target="_blank"
                      moz-do-not-send="true"
                      class="moz-txt-link-freetext">evergreen-general@list.evergreen-ils.org</a>>
                    wrote:<br>
                  </div>
                  <blockquote class="gmail_quote">
                    <div>
                      <p>Dear all,</p>
                      <p>In our current 3.6 production system, we are
                        trying to make the following triggers work:</p>
                      <ul>
                        <li>New User Created Welcome Notice using the
                          au.created hook (like this one: <a
href="https://demo.evergreencatalog.com/eg2/en-US/staff/admin/local/action_trigger/event_definition/109"
                            target="_blank" moz-do-not-send="true"
                            class="moz-txt-link-freetext">https://demo.evergreencatalog.com/eg2/en-US/staff/admin/local/action_trigger/event_definition/109</a>);</li>
                        <li>30 Day Account Expiration Courtesy Notice
                          using the au.expired hook (like this one: <a
href="https://demo.evergreencatalog.com/eg2/en-US/staff/admin/local/action_trigger/event_definition/108"
                            target="_blank" moz-do-not-send="true"
                            class="moz-txt-link-freetext">https://demo.evergreencatalog.com/eg2/en-US/staff/admin/local/action_trigger/event_definition/108</a>).</li>
                      </ul>
                      <p>In both cases we use the predefined triggers
                        but not on the consortium level as in the
                        examples above - instead, they are defined on a
                        system level for a particular library system
                        (which I suppose should be fine (?)).</p>
                      <p>So far the emails are not sent out as expected.</p>
                      <p>Does anyone else also use these triggers/hooks?
                        Could you please share your working
                        configuration (maybe including a particular cron
                        setup which is in your case relevant for this
                        hook)? Or is there a procedure to follow that
                        may help in the debugging process?<br>
                      </p>
                      <p>Or do you have any idea about what might do the
                        trick for these two hooks in particular?<br>
                      </p>
                      <p>Thank you very much!</p>
                      <p>Linda<br>
                      </p>
                    </div>
                    _______________________________________________<br>
                    Evergreen-general mailing list<br>
                    <a
                      href="mailto:Evergreen-general@list.evergreen-ils.org"
                      target="_blank" moz-do-not-send="true"
                      class="moz-txt-link-freetext">Evergreen-general@list.evergreen-ils.org</a><br>
                    <a
href="http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-general"
                      rel="noreferrer" target="_blank"
                      moz-do-not-send="true"
                      class="moz-txt-link-freetext">http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-general</a><br>
                  </blockquote>
                </div>
              </blockquote>
              <p><br>
              </p>
            </div>
            _______________________________________________<br>
            Evergreen-general mailing list<br>
            <a href="mailto:Evergreen-general@list.evergreen-ils.org"
              target="_blank" moz-do-not-send="true"
              class="moz-txt-link-freetext">Evergreen-general@list.evergreen-ils.org</a><br>
            <a
href="http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-general"
              rel="noreferrer" target="_blank" moz-do-not-send="true"
              class="moz-txt-link-freetext">http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-general</a><br>
          </blockquote>
        </div>
      </div>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>