[OPEN-ILS-DEV] Trouble with New Action Trigger Event
Steven Callender
stevecallender at esilibrary.com
Fri Jan 14 15:52:21 EST 2011
Mike,
I noticed that your delay (-30 days) is the same as your max_delay (-30
days). This may be the cause of your issue. Try changing the max_delay
to -29 days.
Or if you want the true 30 day mark, change your delay to -31 days and
leave your max_delay at -30.
Right now even if everything else was correct, your delays are just
canceling each other out.
Try that and run them again and see what happens.
Steve
On 1/14/2011 3:13 PM, Peters, Michael wrote:
>
> Apparently my txt attachment was filtered. Pasted here:
>
> evergreen=# SELECT * FROM action_trigger.event_definition WHERE id=274;
>
> -[ RECORD 1
> ]---+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> id | 274
>
> active | t
>
> owner | 1
>
> name | 30 Day Card Expiration Courtesy Notice
>
> hook | expire
>
> validator | NOOP_True
>
> reactor | ProcessTemplate
>
> cleanup_success |
>
> cleanup_failure |
>
> delay | -30 days
>
> delay_field | expire_date
>
> group_field | usr
>
> template |
>
> : [%- USE date -%]
>
> : [%- user = target.0.usr -%]
>
> : [%- lib = target.0.circ_lib -%]
>
> : To: [%- params.recipient_email || user.email %]
>
> : From: [%-
> helpers.get_org_setting(target.0.circ_lib.id, 'org.bounced_emails') ||
> lib.email || params.sender_email || default_sender %]
>
> : Reply-To: [%-
> helpers.get_org_setting(target.0.circ_lib.id, 'org.bounced_emails') ||
> lib.email || params.sender_email || default_sender %]
>
> : Errors-To: [%-
> helpers.get_org_setting(target.0.circ_lib.id, 'org.bounced_emails') ||
> lib.email || params.sender_email || default_sender %]
>
> : Subject: Courtesy Notice - Library Card Expiration
> in 30 days
>
> :
>
> : Dear [% user.first_given_name %] [% user.family_name %],
>
> :
>
> : Our records indicate your library card is due to
> expire in 30 days. Please visit your local library at your
> convenience to renew your card in order to avoid a disruption in
> access to library service.
>
> :
>
> : Sincerely,
>
> : [% lib.name %]
>
> :
>
> : Contact your library for more information:
>
> :
>
> : [% lib.name %]
>
> : [%- SET addr = lib.mailing_address -%]
>
> : [%- IF !addr -%] [%- SET addr = lib.billing_address
> -%] [%- END %]
>
> : [% lib.mailing_address.street1 %] [%
> lib.mailing_address.street2 %]
>
> : [% lib.mailing_address.city %], [%
> lib.mailing_address.state %]
>
> : [% lib.mailing_address.post_code %]
>
> : [% lib.phone %]
>
> :
>
> :
>
> max_delay | -30 days
>
> evergreen=# SELECT * FROM action_trigger.hook WHERE key='expire';
>
> -[ RECORD 1 ]----------------
>
> key | expire
>
> core_type | au
>
> description | Card is expired
>
> passive | t
>
> evergreen=# SELECT * FROM action_trigger.environment WHERE event_def=274;
>
> id | event_def | path | collector | label
>
> -----+-----------+-------------+-----------+-------
>
> 103 | 274 | active | |
>
> 104 | 274 | expire_date | |
>
> 105 | 274 | deleted | |
>
> 106 | 274 | usr | |
>
> (4 rows)
>
> evergreen=# SELECT * FROM action_trigger.event_params WHERE event_def=274;
>
> id | event_def | param | value
>
> ----+-----------+--------------+-------------------------------
>
> 23 | 274 | sender_email | evergreen at evergreen.lib.in.us
>
> (1 row)
>
> Sincerely,
> Michael Peters
> Indiana State Library MIS | Inspire.IN.gov Helpdesk | Evergreen
> Indiana Helpdesk
> office - 317.234.2128
> email - mrpeters at library.in.gov <mailto:mrpeters at library.in.gov>
>
> *From:*open-ils-dev-bounces at list.georgialibraries.org
> [mailto:open-ils-dev-bounces at list.georgialibraries.org] *On Behalf Of
> *Peters, Michael
> *Sent:* Friday, January 14, 2011 3:06 PM
> *To:* open-ils-dev at list.georgialibraries.org
> *Subject:* [OPEN-ILS-DEV] Trouble with New Action Trigger Event
>
> PureMessage has discarded the attachment due to the file extension. If you need to receive this file, please have the sender resend using a password protected zip file.
>
> Hi all,
>
> Really thought I was rocking along on this but I've hit a speed bump.
> I can't get this new event to run.
>
> Attached are all of the parameters for the new event from the database
> (eventdef.txt), along with my action_trigger_filter.json file
> including my new hook.
>
> I've set the validator to "ProcessTemplate" since this is still in
> testing, and my understanding is that this would just create the
> action_trigger.event_output rows for my new triggered event until
> switched to "SendEmail". Sadly, after running
> action_trigger_runner.pl --process-hooks --run-pending I didn't find
> any output for this new event.
>
> Just on the off chance that noone's card expired 30 days from today, I
> set a test user to expire_date=now() + interval '30 days' an ran
> action_trigger_runner.pl again.
>
> I also tried running action_trigger_runner.pl with "--hook=expire" and
> "--debug-stdout" to see if any clues came up, but sadly I just got a
> response of " ".
>
> Any thoughts?
>
> Sincerely,
> Michael Peters
> Indiana State Library MIS | Inspire.IN.gov Helpdesk | Evergreen
> Indiana Helpdesk
> office - 317.234.2128
> email - mrpeters at library.in.gov <mailto:mrpeters at library.in.gov>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20110114/5cd9f7a1/attachment-0001.htm
More information about the Open-ils-dev
mailing list