-
Notifications
You must be signed in to change notification settings - Fork 503
Description
Hi there... I tried and loved your json rules engine in node.js, so I tried installing it into the node-red environment using:
functionGlobalContext: {
rulesEngine:require("json-rules-engine")
}
Using a function node, I got the engine processing rules immediately... but strange things happen after the event has finished processing. Although it evaluates all the conditions accurately and fires a success or failure event, ruleResult.conditions received by the callback function is a strangely coded string (as though it's been double-stringified) and incomplete (it carries no evaluation status info, just the original conditions). Additionally, the almanac object is empty.
This is what it looks like:
conditions: "{"priority":1,"all":["{\"operator\":\"greaterThanInclusive\",\"value\":43,\"fact\":\"brian\"}","{\"operator\":\"greaterThanInclusive\",\"value\":23,\"fact\":\"sally\"}"]}"
Obviously this lack of information makes it hard to debug rules. Any ideas?