I am looking for a Ruby / Rails tool to help me do the following:
I would like to save the following line in my database and similar ones. When an object is created, updated, deleted, etc., I want to run all the lines, check if the CRUD event matches the conditions of the line, and if so, run the indicated actions.
When a new ticket is created and it category=6 then notify user 1234 via email
I plan to create an interface that builds these lines, so it should not be human-readable. If the JSONish framework is better or the tool has an existing language, that would be fantastic. I am thinking a bit about something like:
{ object_types: ['ticket'], events: ['created', 'updated'], conditions:'ticket.category=6', actions: 'notify user', parameters: { user:1234, type:'email' } }
Basically, I need the following:
CRUD event monitoring . It would be nice if the tool had a way to do this, but I can use Rails ModelObservers here if the tool does not provide it naturally
Finding all the relevant βrulesβ is my main unknown ...
Execute the requested method / parameters . Ideally, this will be defined in my Ruby code as classes / methods.
Are there any existing tools that I should research?
Edit:
Thanks for the answers so far guys! I really appreciate you pointing me on the right path.
An example of use here is that we have many different customers with many different business rules. For the rules that apply to all clients, I can easily create them in code (using something like Ruleby), but for all client ones, I would like to store them in a database. Ideally, a rule can be written once, saved either in code or in a database, and then executed (using Resque to improve performance).
At the moment, it seems to me that I will have to turn off on my own, so we will be very grateful for any thoughts on how to do this or what tools I should explore.
Thanks again!