Adding Rule into existing KiePackage and KieBase
<p>I'm trying to add a Rule to a KiePackage that has already been defined and built using KieBuilder.</p>

<p>I know you can remove a rule using:</p>

<pre><code>base.removeRule("com.somepackage", "ruleName");
</code></pre>

<p>But is there an equivalent for adding a rule? I've tried adding a new .drl file into the KieFileSystem and using KieScanner to pick up the changes, but it doesn't seem to work:</p>

<pre><code>KieBaseConfiguration config = service.newKieBaseConfiguration();
KieBase base = kContainer.newKieBase(config);

KieFileSystem fileSystem = service.newKieFileSystem(); 
KieBuilder builder = service.newKieBuilder(fileSystem); 

fileSystem.write(originalDrlFile, someFile)    
builder.buildAll()                               // first drl is loaded

fileSystem.write(newlDrlFile, someFile)    

KieScanner scanner = service.newKieScanner(kContainer);
scanner.scanNow();
KieSession ksession1 = kContainer.newKieSession();    

builder.buildAll()                               // reloading with new drl.
</code></pre>

<p>When I evaluate a fact against ksession1, the new rules dont exist in the KieBase. Am I missing something?</p>