score object property values against a decision rule created from from database table record values

  • Thread starter Thread starter hazz
  • Start date Start date
H

hazz

if i have a table record called Rule 1 with

1. table name
2. table column name
3. operator (>,< =)
4. value (0 to n)
5. score

how could I create code to create a rule automatically so that i could
create an object to compare to these rules in the database.
If I have an object with certain characteristics that I want to
evaluate(score), like
o.pizza

if o.pizza.olives > 50 then score = 10
else if pizza.olives < 50 then score = 5

so I will be creating an object against which I will be running it through a
filter of many, many if then else statements.
I have tried a couple of xml base rule engines and they are too complicated.

Can anyone help with any part of this process to at least simplify parts of
this task?

Thank you very much.
-hazz
 
it is interesting when someone gives me an excellent answer to a question I
asked....and then I don't understand the answer....at least initially. ;-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top