I have the following very basic rule which matches against all tables in a parent topic which have exactly 2 columns and a specific status:
rule Hello {
when {
$topic : Topic $topic.Id == "1";
$t : Table $t.Status === "unknown" && $t.Columns.length === 2 from $topic.Tables;
}
then {
console.log($t.Id + " is found with column count: " + $t.Columns.length + " and Status: " + $t.Status);
modify($t, function(){ this.Status = "invalid"; } ) ;
}
}
When I attempt to modify the matched fact's string property in working memory, i get the following error:
"msg":"Error: the fact to modify does not exist\n at declare.instance.modifyFact
Why is the matched fact not "modify-albe"? What am I doing wrong here? The console statement is able to correctly output the matched fact's properties.
I have the following very basic rule which matches against all tables in a parent topic which have exactly 2 columns and a specific status:
When I attempt to modify the matched fact's string property in working memory, i get the following error: "msg":"Error: the fact to modify does not exist\n at declare.instance.modifyFact
Why is the matched fact not "modify-albe"? What am I doing wrong here? The console statement is able to correctly output the matched fact's properties.