Does anyone have any ideas on how to implement what has been suggested for
my 'rules engine'? thx, -hazz
the following are rules in the sql server table, one row for each rule.
Table Column op value score
Buy Budget > 500000 10
Buy Budget < 500000 5
Sell In6mths = Yes 10
Sell In6mths = No 5
STEP 1 (SUGGESTION) Each rule consists of an XPath expression for the
operand, and operator, the value you
compare against, and the score.
If I have an object to evaluate against the above rules
Object to evaluate
CustomerID 1
Budget (Dollars) 10000
Sell (TimeFrame) 7 months
CustomerID 2
Budget (Dollars) 500001
Sell (TimeFrame) 3 months
CustomerID 3
Budget (Dollars) 600000
Sell (TimeFrame) 12 months
STEP 2 (SUGGESTION)
Bring theobjects above into my system and
serialize it (them) into an XML document. Then, apply each of the Xpath
queries to
the object, one at a time. If the query produces a result, you have a value
you can compare against. Apply the comparison and, if true, add the score
to your accumulated score.