One scenario I am looking at with the Jena Rules Engine is: (i) facts get put into the model when something happens outside the "system", and (ii) this causes head actions to run which cause things to happen
One specific case is that there is a calculation that has many steps, most of the data gets passed through an execution fabric (data plane) but the control plane is written with JRE. When the data plane finishes a step, facts get punched into the model, then the JRE tears down the last step and sets up the new steps that are possible with the data now available. I sent in a pull request (JENA-1204) which adds support for multiple BuiltinRegistries and in the unit test I discovered some details of how this work, particularly around TestGenericRuleReasonerConfig.testRuleLoadingWithOverridenBuiltins. In particular, I found that the rules don't seem to execute when you add facts, but rule execution is triggered when the listStatements(...) method of the InfModel gets called. The way this shows up is that the head actions fires when I call the size() method of the InfModel on line 166 (thus I see an item in the savedNode list on line 167.) If I don't call size() or otherwise look at the InfModel, nothing happens. So I am wondering what the "right" way is to trigger rule execution in this case. I am happy to punch a few rules in and then trigger execution, but I'd like some way to do it that doesn't do any work I don't need done. -- Paul Houle paul.ho...@ontology2.com