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