The rule agent is a Peer to Peer component for runtime deployment of
rules/packages/rulebases (well,thats the vision).
In practical terms, its a component you use in any system that requires
rules (and the BRMS/IDE can also use it to deploy).
There will be a deployment descriptor where you declare what rulebases are
(by name) which you then access in code (one line of code), and how the
rulebase is obtained/updated.
Looking at some ideas for deployment config (using file, URI and JGroups
respectively):
<ruleBaseConfig>
<cache dir="..dir for cold start />
<ruleBase name="myRulebaseFromDir">
<package name="pkg1"/>
<package name="foo.bar.pkg"/>
<directorySource dir="">
<poll minutes="10"/>
</directorySource>
</ruleBase>
<ruleBase name="myRulebaseFromURL">
<package name="pkg1"/>
<package name="foo.bar.pkg"/>
<urlSource url="url to BRMS">
<poll minutes="10"/>
</urlSource>
</ruleBase>
<!-- in this case the rulebase comes from a jgroup, the updates are near
instant, no polling -->
<ruleBase name="myRulebaseFromJGroup">
<package name="pkg1"/>
<package name="foo.bar.pkg"/>
<group name="production.group"/>
</ruleBase>
</ruleBaseConfig>
And in the code you access it like:
RuleBase rb = RuleAgent.instance().getRuleBase("myRulebaseFromJGroup");
... etc...
The rulebase will be updated when the rules are etc.
Comments?