I am new to the rules engine and I am trying to create a rules engine in javascript.
I have the following rule and Passing one parameter as the wrong input, how to find which argument (fact) is mismatched (not the rule).
engine.addRule({
conditions: {
all: [{
fact: 'score',
operator: 'greaterThanInclusive',
value: 200
}, {
fact: 'players',
operator: 'equal',
value: 10
}]
},
event: {
type: 'success',
}
})
let fact = {
score: 150,
players: 10
}
It will fail the rule. How do I know which fact cause the failure of rule?