Rule engine not able to extract key from dataCtx #387
Closed
Bugging-Bot
started this conversation in
General
Replies: 1 comment
-
Please help me in resolving error : time="2023-07-22T22:32:28+05:30" level=error msg="Error while evaluating rule R001, got left hand expression error. got left hand expression error. got non existent key Request" lib=grule-rule-engine package=ast But rule is executing |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am trying to use Grule as middleware for GIN API’s. Issue which I am facing is data context key is not identified in rule file(*.grl).
I am getting an ### error: Got error left hand expression error. got non existent key Request" lib=grule-rule-engine package=engine.
Rule in the rule.grl file is
rule R001 "Check book request" salience 10 {
when
Request.Version == "v1"
then
Request.Category = "Executed";
}
Code:
type RequestCtx struct {
Version string
Category string // To get value
}
func GruleMiddleware() gin.HandlerFunc {
return func(c *gin.Context) {
}
Please help me in troubleshooting this issue.
Beta Was this translation helpful? Give feedback.
All reactions