Bulk records validation #659
Unanswered
TimDataEng
asked this question in
Q&A
Replies: 0 comments
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.
-
Is it possible to bulk validate multiple records without looping?
Tested the https://github.com/microsoft/RulesEngine/blob/main/demo/DemoApp/BasicDemo.cs
with 3 records,
dynamic data1 = new ExpandoObject();
data1.count = 1;
The Rulesengine treat the inputs as single record and need to loop through the return in order to get the result. Otherwise the output json would like below
[
{
"Rule": {
"RuleName": "Test Rule",
"Properties": null,
"Operator": null,
"ErrorMessage": "Some counts are over expected.",
"Enabled": true,
"RuleExpressionType": 0,
"WorkflowsToInject": null,
"Rules": null,
"LocalParams": null,
"Expression": "inputs[0].count < 3 && inputs[1].count < 3 && inputs[2].count < 3",
"Actions": null,
"SuccessEvent": "All counts within tolerance."
},
"IsSuccess": false,
"ChildResults": null,
"Inputs": {
"input1": {
"count": 1
},
"input2": {
"count": 2
},
"input3": {
"count": 0
}
},
"ActionResult": {
"Output": null,
"Exception": null
},
"ExceptionMessage": "Some counts are over expected."
}
]
Any advice?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions