Red Hat Bugzilla – Bug 1030251
Rules will only fire in the first session created from a knowledgebase - Segment Memory restore from Prototype conflict
Last modified: 2014-08-06 16:20:13 EDT
Given a KB with the two rules below:
rule "Insert Info "
insert( "aaa " );
insert( new Integer( 12 ) );
insert( new Double( 4.0 ) );
rule "React "
$n : Double( ) and
$x : count( $n )
System.out.println( "Rule fires" );
The rules work normally in the first session created from the KB.
When any additional session is created and used, the SegmentMemories are restored from the SM Prototypes.
Unfortunately, the AccumulateNode -> RuleTerminalNode segment is restored twice, once when the "aaa"
triggers the appropriate Beta Node, and once when the subnetwork updates the RIA node.
The latter overwrites the already existing segment, overriding the partial link bits.
Fixed by https://github.com/droolsjbpm/drools/commit/5156993b9
Mario Fusco <firstname.lastname@example.org> updated the status of jira DROOLS-339 to Resolved
Verified on BRMS 6.0.0 ER5.