Closed lichengxihuang closed 1 year ago
Can you share the version of Rules Engine you are using?
Can you share the version of Rules Engine you are using?
The version I used was 4.0.0.
Thanks for the hint, when I bumped to the latest version 5.0.1, the issue was solved.
However, I got another issue: Exception while parsing expression Utils.GetCountAsync(myObject).Result < 3
- '.' or '(' or string literal expected
It seems related to this:
List<RuleResultTree> resultList = bre.ExecuteAllRulesAsync(workflow.WorkflowName, new RuleParameter("myObject", myObject)).Result;
When I change to another name, it worked.
List<RuleResultTree> resultList = bre.ExecuteAllRulesAsync(workflow.WorkflowName, new RuleParameter("myObj", myObject)).Result;
Is myObject
a reserved keyword?
There is a bug in our dependency library, if the class name and passed parameter name is same(even if case is different), it takes the type instead of the passed parameter.
The current workaround is using different name from class name.
Meanwhile, i will raise the bug in correct repo to get it fixed.
The following two rules give different behaviors:
myObject.GetCountAsync().Result < 3
- Methods on type 'MyObject' are not accessibleFrom issue #226, it seems we do support async calls with non-static methods. However, from this code, it seems we don't? Did I miss anything?