Hello there!
I am looking for a way to realise an event billing concept. I am thinking to start with a rule engine is the right way. Unfortunately I have no clue how I should start with Jess, so I write down my basic vision of the concept and Probably someone could tell me if Jess can handle this and perhaps give me some hints so that I can start. This would be great. Thank you in advance.
First question is about how to using jess.
My basic idea is to us Jess as follow:
1. I starting Jess and loading all the rules from a file
2. loading first set of facts
3. run jess and get the output
4. destroy the first set of facts but keep the rules
5. loading next set of facts
6. run jess and get the output
7. …and so on…
Is this first concept of using jess so possible?
Next question is regarding using rules and facts together.
Event based billing means in my context the following. I have event data from type A, type B , Type C and so on. For every type exists a specific tariff, also tariff A, tariff B, tariff C and so on Usually I have multiple event objects from type A, but only one tariff A object. For the price calculation I have simple to multiply every event of type A with the tariff A and to summarize these.
To use it now with Jess, I like to do the following. I use the events A, B ,C … and tariffs A, B , C as facts. After that I like to fire the rule(s) fort the price calculation. In the above described examples must the rule find
For every event object the correct tariff (type of event = type of tariff ) object and does the calculation.
And now here is my problem, is my basic understanding of rules and facts correct with the description above ? And here my follow up questions:
- How does Jess resp. the rule know that all event objects have to be processed ?
- How does the rule find for every event object the correct tariff object ?
Thank you all for your answers.
Best regards
Mark
