You can have a map of kbases containing the specific rules. When a request arrives, you get the proper kbase from the map and create a ksession from it. <div><br></div><div>Another way could be to use Control Objects in your rules.</div>

<div><br></div><div>Best Regards, <div><br>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br><br>Esteban Aliverti<br>- Developer @ <a href="http://www.plugtree.com" target="_blank">http://www.plugtree.com </a><br>- Blog @ <a href="http://ilesteban.wordpress.com" target="_blank">http://ilesteban.wordpress.com</a><br>


<br><br><div class="gmail_quote">On Mon, Aug 8, 2011 at 10:23 AM, snehils <span dir="ltr">&lt;<a href="mailto:snehils@gmail.com">snehils@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi,<br>
<br>
I am new in Drools. I am using Drools version 5.1.0<br>
<br>
My requirement is kind of request response, where I have to perform some<br>
checks for the request and respond the result. Hence, I decided to go with<br>
stateless knowledge session.<br>
<br>
I have prepared .DRL file and it contains set of rules. When some request<br>
receives I have to identify the rule(s) belongs to that request and then<br>
fire the rule(s).<br>
<br>
I am not able to figure out how to categories the rules request wise in DRL<br>
file? Also, how to fire only those rules which belongs to the category.<br>
<br>
For example, there are three kinds of requests Rq1, Rq2 and Rq3. There are<br>
rules in DRL file: R1, R2, R3, R4 and R5. R1, R2 belongs to Rq1, R3 belongs<br>
to Rq2 and R4, R5 belongs to Rq3.<br>
<br>
When some request receives only its belonging rules should be fired. For<br>
example, on receiving of Rq2 only R3 should be fired.<br>
<br>
Please provide me some code snipped or link.<br>
<br>
Thanks<br>
<font color="#888888"><br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Fire-Rule-in-Stateless-Knowledge-Session-tp3234893p3234893.html" target="_blank">http://drools.46999.n3.nabble.com/Fire-Rule-in-Stateless-Knowledge-Session-tp3234893p3234893.html</a><br>


Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br></div></div>