Invalid A/T group field value can cause batch of events to remain in "collected" state

Bug #1827524 reported by Galen Charlton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
New
Undecided
Unassigned

Bug Description

An Action Trigger event definition that has an invalid group field can cause an entire set of events to fail to be processed, leaving the events in the "collected" state.

This can be triggered by, for example, setting up a notification on the au.expired hook specifying "usr" rather than "id" as the grouping field (as might happen with copy-and-pasting from a circulation notice event definition). If such an event definition has a granularity of Daily, then the following error can happen after the events are collected:

srfsh# request open-ils.trigger open-ils.trigger.event.run_all_pending "Daily", 1

Received Exception:
Name: osrfMethodException
Status: *** Call to [open-ils.trigger.event.run_all_pending] failed for session [1556843965.971489.155684396553718], thread trace [1]:
No field by the name usr in Fieldmapper::actor::user! at /usr/local/share/perl/5.22.1/OpenILS/Utils/Fieldmapper.pm line 273.

This exception ends the method call and leaves any events not yet processed (which potentially could be thousands from dozens of event definitions) in the "collected" state.

As a side note, this sort of uncaught exception ends up not being readily logged when it occurs during an action_trigger_runner.pl run.

This bug is similar to bug 1741337. Better exception handling would at least contain the damage to the broken event definition, but it should also be possible to test for certain kinds of problems with the event definition and warn the user if they're trying to save a broken definition.

Evergreen 3.1+

Galen Charlton (gmc)
tags: added: actiontrigger
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.