Q:

Rules fired upon fact insert - Drools

I am very new to Drools, and started with the basics.  Here is a setup;

Have a few rule files
Rules in different files belong to different Agenda groups
All the rules operate on the same fact
In my Unit Test, I obtain a particular "Agenda Group", set Focus (session.setFocus)
I insert the fact (Here is where I notice the rules within the other agenda group are getting evaluated even though the focus is not on them)
I fireAllRules()

Shouldn't the rules pertaining to the particular agenda group that is in focus be fired and not all rules from all the groups? 

A:

It is a fundamental law in many Rule Based Systems - especially those that follow Rete or similar algorithms - that the evaluation of conditions ("t
when", "left hand side") happens whenever there are changes in Working Memory: inserts, updates or deletes.  In contrast, rule firing or the execution of consequences ("then", "right hand side") happens after fireAllRules or fireUntilHalt has been called.  
The firing of rules - more precisely: of activations of rules - can be controlled in several ways.  Here, it is indeed the focussed agenda group that limits what can be executed by the engine. 
Keep this in mind: evaluation is not equal to execution.