Bug 1030251 - Rules will only fire in the first session created from a knowledgebase - Segment Memory restore from Prototype conflict
Rules will only fire in the first session created from a knowledgebase - Segm...
Status: CLOSED CURRENTRELEASE
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: BRE (Show other bugs)
6.0.0
Unspecified Unspecified
urgent Severity urgent
: ER5
: 6.0.0
Assigned To: Mario Fusco
Marek Winkler
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-14 03:52 EST by Mario Fusco
Modified: 2014-08-06 16:20 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-08-06 16:20:13 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker DROOLS-339 Blocker Resolved Rules will only fire in the first session created from a knowledgebase - Segment Memory restore from Prototype conflict 2013-12-12 10:55:18 EST

  None (edit)
Description Mario Fusco 2013-11-14 03:52:09 EST
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 03:53:06 EST
Fixed by https://github.com/droolsjbpm/drools/commit/5156993b9
Comment 2 JBoss JIRA Server 2013-11-14 03:54:26 EST
Mario Fusco <mario.fusco@gmail.com> updated the status of jira DROOLS-339 to Resolved
Comment 4 Marek Winkler 2013-12-12 10:59:05 EST
Verified on BRMS 6.0.0 ER5.

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