Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we support comparing number sizes using string types #417

Open
Fwenjie opened this issue Nov 17, 2023 · 1 comment
Open

Can we support comparing number sizes using string types #417

Fwenjie opened this issue Nov 17, 2023 · 1 comment

Comments

@Fwenjie
Copy link

Fwenjie commented Nov 17, 2023

Can we support comparing number sizes using string types

@Fwenjie
Copy link
Author

Fwenjie commented Nov 17, 2023

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),
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant