[rules-users] Fire Rule in Stateless Knowledge Session

Esteban Aliverti esteban.aliverti at gmail.com
Mon Aug 8 04:33:37 EDT 2011


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.

Another way could be to use Control Objects in your rules.

Best Regards,

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com


On Mon, Aug 8, 2011 at 10:23 AM, snehils <snehils at gmail.com> wrote:

> Hi,
>
> I am new in Drools. I am using Drools version 5.1.0
>
> My requirement is kind of request response, where I have to perform some
> checks for the request and respond the result. Hence, I decided to go with
> stateless knowledge session.
>
> I have prepared .DRL file and it contains set of rules. When some request
> receives I have to identify the rule(s) belongs to that request and then
> fire the rule(s).
>
> I am not able to figure out how to categories the rules request wise in DRL
> file? Also, how to fire only those rules which belongs to the category.
>
> For example, there are three kinds of requests Rq1, Rq2 and Rq3. There are
> rules in DRL file: R1, R2, R3, R4 and R5. R1, R2 belongs to Rq1, R3 belongs
> to Rq2 and R4, R5 belongs to Rq3.
>
> When some request receives only its belonging rules should be fired. For
> example, on receiving of Rq2 only R3 should be fired.
>
> Please provide me some code snipped or link.
>
> Thanks
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Fire-Rule-in-Stateless-Knowledge-Session-tp3234893p3234893.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110808/b0c2adec/attachment.html 


More information about the rules-users mailing list