To the existing Rule file, I added a new Implication(action is modify), 7 Facts and 8 other initial Facts to be modified by the Implication. Ordered them like the chocolatebox example, with the implication at the top. Imp has priority:100 for good measure The modifying implication has a "label: update", which is different from the base facts
The engine gets initialized, called etc from a VB.net code 1) Initialize RuleAdapter with the RuleML file and initialize ie.LoadRuleBase(RulAdap) 2) Use ie.LoadFacts(FactBaseAdapter) 3) ie.Process()
When I Query for this, it returns the "base" facts only. Modifications to the base facts don't seem to be happening. But the same rule file, and fact base works perfectly in the IE-console! Also tested with differing fact files and the base facts get chosen and modified suitably. So the new Imp-Facts-Query set seems to have no flaws.
Thinking that ie.Process() was insufficient, I tried ie.Process(RuleTypes.All) but to no avail.
EDIT Apr 15 The verbose log in IE-Console has the following lines between the FIRST occurence of "found target" and "modified target". Could this an "exception" stop execution in the App...but continue execution in the Console with the default values ?
[V] -> found target: grDo{0,Ci,0 [System.Int32],,}
[I] Can not find setting key: 'referenceLinkMode', using default value: '' (Exception message: The key 'nxbre.referenceLinkMode' does not exist in the appSettings configuration section.)
[I] Can not find setting key: 'generateInMemoryAssembly', using default value: 'True' (Exception message: The key 'nxbre.generateInMemoryAssembly' does not exist in the appSettings configuration section.)
[I] Can not find setting key: 'compilerOptions', using default value: '' (Exception message: The key 'nxbre.compilerOptions' does not exist in the appSettings configuration section.)
[I] Can not find setting key: 'extraReferences', using default value: '' (Exception message: The key 'nxbre.extraReferences' does not exist in the appSettings configuration section.)
[I] Can not find setting key: 'extraReferences', using default value: '' (Exception message: The key 'nxbre.extraReferences' does not exist in the appSettings configuration section.)
[I] Can not find setting key: 'extraReferences', using default value: '' (Exception message: The key 'nxbre.extraReferences' does not exist in the appSettings configuration section.)
[V] -> modified target: grDo{0,Ci,6 [System.Int32],impact likely,Add nurture}
EDIT Apr 14
<Assert mapClosure="universal">
<!-- Implications -->
<Implies>
<oid>
<Ind>label:update gr Do;priority:100;action:modify</Ind>
</oid>
<head>
<Atom>
<op>
<Rel>grDo</Rel>
</op>
<Var>person</Var>
<Var>gr</Var>
<Ind uri="nxbre://expression">{predicate:2}+{var:lvlquant}*{var:wtquant}</Ind>
<Ind uri="nxbre://expression">{predicate:3}+{var:lvldesc}</Ind>
<Ind uri="nxbre://expression">{predicate:4}+{var:wtdesc}</Ind>
</Atom>
</head>
<body>
<And>
<Atom>
<Rel>DoLvl</Rel>
<Var>Bh#</Var>
<Var>lvlquant</Var>
<Var>lvldesc</Var>
</Atom>
<Atom>
<Rel>DoWt</Rel>
<Var>gr</Var>
<Var>wtquant</Var>
<Var>wtdesc</Var>
</Atom>
<Atom>
<op>
<Rel>Bva</Rel>
</op>
<Var>person</Var>
<Var>gr</Var>
<Var>Bh#</Var>
</Atom>
</And>
</body>
</Implies>
</Assert>
<Assert mapClosure="universal">
<!-- Do Bh & gr weightage FACTS-->
<Atom>
<Rel>DoLvl</Rel>
<Ind>2</Ind>
<Data xsi:type="xs:int">3</Data>
<Ind>For 2</Ind>
</Atom>
<Atom>
<Rel>DoWt</Rel>
<Ind>Ci</Ind>
<Data xsi:type="xs:int">2</Data>
<Ind>For Ci</Ind>
</Atom>
<!-- Starting Implication for both Dos; to be modified by Implication-->
<Atom>
<oid>
<Ind>Ci Do</Ind>
</oid>
<op>
<Rel>grDo</Rel>
</op>
<Ind>0</Ind>
<Ind>Ci</Ind>
<Data xsi:type="xs:int">0</Data>
<Ind> </Ind>
<Ind> </Ind>
</Atom>
<Atom>
<oid>
<Ind>Sy Do</Ind>
</oid>
<op>
<Rel>grDo</Rel>
</op>
<Ind>0</Ind>
<Ind>Sy</Ind>
<Data xsi:type="xs:int">0</Data>
<Ind> </Ind>
<Ind> </Ind>
</Atom>
</Assert>
<Query>
<oid>
<Ind>Ci Do</Ind>
</oid>
<Atom>
<op>
<Rel>grDo</Rel>
</op>
<Ind>0</Ind>
<Ind>Ci</Ind>
<Var>quant</Var>
<Var>lvldesc</Var>
<Var>wtdesc</Var>
</Atom>
</Query>
<Query>
<oid>
<Ind>All Do</Ind>
</oid>
<Atom>
<op>
<Rel>grDo</Rel>
</op>
<Var>person</Var>
<Var>gr</Var>
<Var>quant</Var>
<Var>lvldesc</Var>
<Var>wtdesc</Var>
</Atom>
</Query>