hyperjumptech/grule-rule-engine

Can we support comparing number sizes using string types

Fwenjie opened this issue · 1 comments

Can we support comparing number sizes using string types

rule rule_2359427640113137664 "2359427640113137664" salience 4 {
when
( Fact.Map["amount"] >= "10" )
then
Fact.RuleResult.Append("success");
Fact.Log("hit rule:rule_2359427640113137664");
// remove current rule,else maybe execute repeatedly
Retract("rule_2359427640113137664");
}

fact := vo.RuleFact{
Map: map[string]any{
"amount": "9",
},
RuleResult: make([]string, 0, 16),
}