I am using drools 5.4 via the web-based server (running in tomcat). My rulebase is stored (and created/maintained) in guvnor.
I have a template rule (in guvnor) that I use to define alert conditions. The template has a few columns that allow users to specify several properties of an event on which they would like to be alerted. For example, they can change integer thresholds, set regular expression strings to check against, etc. This has been working well.
Now, I want to add a calendar-based aspect to the template rule. So, a user can specify something like, "tell me if an event like this comes in AND it is a weekend."
I have considered making a java function or pojo that interprets some string in a template column, which I would then use in the template rule to return true/false. I also considered making a canned set of weekly and daily Quartz calendars so that they could provide a list of calendar names to use. For example "weekendsOnly, offHoursOnly" etc.
My question: Have you done anything like this or do you have any thoughts about a clean way to implement it? Is there something simple I am missing?