<html><body>
<p>Hi Niyas - <br>
<br>
I'm also trying to implement similar approach wiht Spring and Drools, so I've done similar search and found some stuff.  CHeck out this link:<br>
<br>
<a href="http://wiki.jboss.org/wiki/Wiki.jsp?page=RulesWithSpringFramework">http://wiki.jboss.org/wiki/Wiki.jsp?page=RulesWithSpringFramework</a><br>
<br>
Using the sample code there I was able to come up with a component that encapsulates both the PackageBuilder and RuleBase - this component is called EventRulBase.  Spring builds this component based on the configuration I specify in the aplicaitonContext-myapp.xml file...    So the sequence goes something like this:<br>
<br>
 1)  Spring initializes the Beans defined in applicationContext-myapp.xml file at startup.  The bean implements an init() method which I instruct Spring to invoke AFTER it finishes setting up all properties on the bean....  in the init() method I setup the components that read the DRL file, compile and initialize the RuleBase object.  <br>
<br>
2)  My EventRuleBase component is a Singleton that can return RuleBase objects from which calling clients can instantiate new Working Memory objects, assert objects and facts into it, fire rules, etc...<br>
<br>
I'm still in the process of building it but that's the general flow.<br>
<br>
Hope it helps - if you need more let me know.<br>
<br>
Regards,<br>
James<br>
<br>
<br>
<br>
<br>
<br>
<img width="16" height="16" src="cid:1__=08BBF814DFC4B9A48f9e8a93df938@us.ibm.com" border="0" alt="Inactive hide details for Niyas &lt;niyasahmed@gmail.com&gt;">Niyas &lt;niyasahmed@gmail.com&gt;<br>
<br>
<br>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td style="background-image:url(cid:2__=08BBF814DFC4B9A48f9e8a93df938@us.ibm.com); background-repeat: no-repeat; " width="40%">
<ul>
<ul>
<ul>
<ul><b><font size="2">Niyas &lt;niyasahmed@gmail.com&gt;</font></b><font size="2"> </font><br>
<font size="2">Sent by: rules-users-bounces@lists.jboss.org</font>
<p><font size="2">02/19/2007 07:48 AM</font>
<table border="1">
<tr valign="top"><td width="168" bgcolor="#FFFFFF"><div align="center"><font size="2">Please respond to<br>
Rules Users List &lt;rules-users@lists.jboss.org&gt;</font></div></td></tr>
</table>
</ul>
</ul>
</ul>
</ul>
</td><td width="60%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td width="1%"><img width="58" height="1" src="cid:3__=08BBF814DFC4B9A48f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<div align="right"><font size="2">To</font></div></td><td width="100%"><img width="1" height="1" src="cid:3__=08BBF814DFC4B9A48f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2">rules-users@lists.jboss.org</font></td></tr>

<tr valign="top"><td width="1%"><img width="58" height="1" src="cid:3__=08BBF814DFC4B9A48f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<div align="right"><font size="2">cc</font></div></td><td width="100%"><img width="1" height="1" src="cid:3__=08BBF814DFC4B9A48f9e8a93df938@us.ibm.com" border="0" alt=""><br>
</td></tr>

<tr valign="top"><td width="1%"><img width="58" height="1" src="cid:3__=08BBF814DFC4B9A48f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<div align="right"><font size="2">Subject</font></div></td><td width="100%"><img width="1" height="1" src="cid:3__=08BBF814DFC4B9A48f9e8a93df938@us.ibm.com" border="0" alt=""><br>
<font size="2">[rules-users] Drools With Spring Framework Problem</font></td></tr>
</table>

<table border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td width="58"><img width="1" height="1" src="cid:3__=08BBF814DFC4B9A48f9e8a93df938@us.ibm.com" border="0" alt=""></td><td width="336"><img width="1" height="1" src="cid:3__=08BBF814DFC4B9A48f9e8a93df938@us.ibm.com" border="0" alt=""></td></tr>
</table>
</td></tr>
</table>
<br>
<tt>Hi all,<br>
<br>
I am in need of integrating Drools JBoss Rule Engine with Spring Framework.<br>
I have tried sample rule engine examples in the Drools in the<br>
standalone with the help od drools IDE for eclipse 3.2.<br>
And I also tried some example in the Spring Framework,to know how it<br>
works. I have tried some examples in IOC, MVC and JDBC in the spring<br>
framework.<br>
<br>
Now, I want to use both Drools and Spring Framework in such a way that<br>
Spring will have the MVC application and it should validate the rules,<br>
which written in the drools (.drl)<br>
<br>
I don't know how to begin with/what are he configuration files needed<br>
to setup. PLease if anyone have the sample coding on Drools with<br>
Spring or any other links willl be very useful.<br>
<br>
And also, guide me what are the things need to be know for Spring with<br>
Drools. While I have searched in google, lots of things came up like:<br>
<br>
Use JSR94... (which is mentioning to configure RuleServiceProvider,<br>
RuleRuntime, RuleSet..and others..which seeme to be confusing and not<br>
clear)<br>
<br>
Whether there are any API for drools with spring that DROOLS is<br>
supporting..like org.drools.spring.metadata.ArgumentMetadataSource. I<br>
don't find these Drools API section<br>
</tt><tt><a href="http://labs.jboss.com/file-access/default/members/jbossrules/freezone/docs/3.0.5/apidocs/index.html">http://labs.jboss.com/file-access/default/members/jbossrules/freezone/docs/3.0.5/apidocs/index.html</a></tt><tt><br>
_______________________________________________<br>
rules-users mailing list<br>
rules-users@lists.jboss.org<br>
</tt><tt><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></tt><tt><br>
</tt><br>
</body></html>