Rikkola commented on code in PR #6440:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6440#discussion_r2317805347


##########
drools-core/src/main/java/org/drools/core/common/AgendaGroupsManager.java:
##########
@@ -248,15 +247,17 @@ class StackedAgendaGroupsManager implements 
AgendaGroupsManager {
         private Deque<InternalAgendaGroup> focusStack = new ArrayDeque<>();
         private InternalAgendaGroup mainAgendaGroup;
         private InternalWorkingMemory workingMemory;
+               private InternalRuleBase kieBase;
 
         public StackedAgendaGroupsManager() { }
 
-        public StackedAgendaGroupsManager(InternalWorkingMemory workingMemory) 
{
+        public StackedAgendaGroupsManager(InternalRuleBase kieBase, 
InternalWorkingMemory workingMemory) {
             this.agendaGroupFactory = 
RuntimeComponentFactory.get().getAgendaGroupFactory();
+            this.kieBase = kieBase;
             // stacked agenda groups are supported only for 
InternalWorkingMemory
             this.workingMemory = workingMemory;
             if (this.mainAgendaGroup == null) {
-                initMainAgendaGroup(workingMemory.getKnowledgeBase());
+                initMainAgendaGroup(kieBase);

Review Comment:
   If initMainAgendeGroup always takes in this.kieBase would it be better to 
not pass it in as a parameter? Just a note.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to