[rules-users] Calling specific Rule Group

Wolfgang Laun wolfgang.laun at gmail.com
Thu Sep 23 08:31:42 EDT 2010


You can call setFocus from Java
  session.getAgenda().getAgendaGroup( "focus" ).setFocus();
and then
  fireAllrules().

Also, check out rule attribute auto-focus.

-W

2010/9/23 Swapnil Sawant <Swapnil.Sawant at lntinfotech.com>

>  Hi,
>
>
>
>
>
> I have created two rule groups “Group 1” and “Group 2”.
>
>
>
> Now, I have read that to execute these groups I need to write something
> like following code :
>
>
>
>
>
> Rule "pick group X"
>
> when
>
>     Fact( attribute = "condition1" )
>
> then
>
> *    **drools.setFocus("Group 1")***
>
> end
>
>
>
> Rule "pick group Y"
>
> when
>
>     Fact( attribute = "condition2" )
>
> then
>
>     *drools.setFocus("Group 2")***
>
> end
>
>
>
> I wanted to know is it always necessary to write separate rules for
> calling/execution of these rule groups (rules *“*pick group X” and “pick
> group Y”)?
>
>
>
> Or is there any other api function similar to ksession.fireAllRules() for
> calling specific rule group ?
>
>
>
>
>
> Thanks & Regards,
>
> Swapnil Sawant
>
> ------------------------------
> This Email may contain confidential or privileged information for the
> intended recipient (s) If you are not the intended recipient, please do not
> use or disseminate the information, notify the sender and delete it from
> your system.
>
> ______________________________________________________________________
>
> _______________________________________________
> 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/20100923/1eb37ef6/attachment.html 


More information about the rules-users mailing list