Bug 1030251 - Rules will only fire in the first session created from a knowledgebase - Segment Memory restore from Prototype conflict
Summary: Rules will only fire in the first session created from a knowledgebase - Segm...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ER5
: 6.0.0
Assignee: Mario Fusco
QA Contact: Marek Winkler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-14 08:52 UTC by Mario Fusco
Modified: 2014-08-06 20:20 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:20:13 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker DROOLS-339 0 Blocker Resolved Rules will only fire in the first session created from a knowledgebase - Segment Memory restore from Prototype conflict 2013-12-12 15:55:18 UTC

Description Mario Fusco 2013-11-14 08:52:09 UTC
Given a KB with the two rules below:

 rule "Insert Info "
 when
 then
     insert(  "aaa " );
     insert( new Integer( 12 ) );
     insert( new Double( 4.0 ) );
 end
 
 rule "React "
 when
     Integer()
     accumulate (
                  $n : Double( ) and
                       Double(  ),
                  $x : count( $n )
                )
     String( )
 then
     System.out.println(  "Rule fires" );
 end

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.

Comment 1 Mario Fusco 2013-11-14 08:53:06 UTC
Fixed by https://github.com/droolsjbpm/drools/commit/5156993b9

Comment 2 JBoss JIRA Server 2013-11-14 08:54:26 UTC
Mario Fusco <mario.fusco> updated the status of jira DROOLS-339 to Resolved

Comment 4 Marek Winkler 2013-12-12 15:59:05 UTC
Verified on BRMS 6.0.0 ER5.


Note You need to log in before you can comment on or make changes to this bug.