I am trying to use Rulio (rule engine written in Go). The documentation is not very informative and I am not sure how to implement rules having more than one conditions. Anyone suggestions? This is the rule JSON, I manage to construct but it doesn't produce the correct result.
{
"location": "here",
"rule": {
"when": {
"pattern": {
"wants": "?x",
"love":"?y"
}
},
"condition": {
"pattern": {
"have": "?x"
}
},
"action": {
"code": "var msg = 'eat ' + x; console.log(msg); msg;"
}
}
}
Fact
{
"location": "here",
"fact":{"have":"tacos"}
}
For testing, if I pass
"location": "here",
"event": {"love":"tacos"}
}
I get an empty set. The expected result should be "eat tacos"