<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16481" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff background="">
<DIV><FONT face=Arial size=2>A ruleflow actually just presents a set of rules
that you want to evaluate (and you use a ruleflow to specify the order).
You can define yourself when to execute those rules by invoking startProcess
whenever necessary. It is possible to have multiple (possibly unrelated)
ruleflows in one rulebase, you might start the same ruleflow multiple times or
even concurrent (although we still have to look for good examples for those
advanced use cases ;)).<BR><BR>If you would like to "hide" the use of
ruleflow-groups for your rule editors / programmers, there are a few things you
can do:</FONT></DIV>
<DIV><FONT face=Arial size=2><BR> - If you don't like calling startProcess
using code, you can just use rules that define when a ruleflow should be
started. For example, if you want your ruleflow to start after calling
fireAllRules(), add the following rule:<BR> rule
"MyRule"<BR> when<BR>
then<BR>
drools.getWorkingMemory().startProcess("com.sample.ruleflow");<BR>
end</FONT></DIV>
<DIV><FONT face=Arial size=2>You can easily add more conditions in the when part
if you like to only start the ruleflow under certain circumstances</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> - It appears you would like to specify some
kind of default ruleflow-group for a package of rules, so that all rules in that
package are automatically added to that ruleflow-group (and rule editors don't
have to specify it with every rule they write). I guess we could support
something like this</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> package com.sample;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> ruleflow-group
"my_group"</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> rule "my_rule" # this rule
automatically uses ruleflow-group "my_group"</FONT></DIV>
<DIV><FONT face=Arial size=2> when
...</FONT></DIV>
<DIV><FONT><FONT face=Arial size=2> end</FONT></DIV>
<DIV><BR>
<DIV><FONT face=Arial size=2> rule
"my_second_rule" ruleflow-group "my_second_group" # this
rule overrides the default ruleflow-group</FONT></DIV>
<DIV><FONT face=Arial size=2> when
...</FONT></DIV>
<DIV><FONT face=Arial size=2> end</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>If this is something you would like to see in a
future release, please open a JIRA </FONT></FONT><FONT face=Arial size=2>(<A
href="http://jira.jboss.com/jira/browse/JBRULES">http://jira.jboss.com/jira/browse/JBRULES</A>)</FONT><FONT><FONT
face=Arial size=2> and we'll see what we can do.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> - You can still combine normal rules (without
ruleflow-group) with ruleflows. Rules that have no ruleflow-group still
behave like they used to do, so they will be executed when fireAllRules() is
called.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Kris</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>----- Original Message ----- <BR>From: Felipe
Piccolini <BR>To: Rules Users List <BR>Sent: Wednesday, August 08, 2007 6:56
PM<BR>Subject: Re: [rules-users] RuleFlow group as default or
MAIN?<BR><BR><BR>Well.... I guess I got it wrong... startProcess is not about
what ruleflow-group start the process, is about what ruleflow
definition<BR>start firing all rules... but this leads me to the point that this
is useful if you have several ruleflows (definitions and files) in the
same<BR>ruleBase... why somebody would like to have that?... to control flow? or
to try to fire a specific rule and then fire subsequent rules<BR>in a
flow?...<BR><BR><BR>My problem is that I dont wanna have many ruleflows
definitions for 1 ruleBase, if I would, then I'll use sub-flows...<BR>If I have
just 1 ruleflow file, then I dont wanna do startProcess() and I still wanna put
rules without ruleflow-group defined so they all<BR>belong to the MAIN/DEFAULT
group.<BR><BR><BR>Thanks.<BR><BR><BR>On 08-08-2007, at 12:33, Felipe Piccolini
wrote:<BR><BR><BR>Is there anyway to set a default ruleflow-group or a MAIN one
so I can put rules without<BR>ruleflow-group in the same drl as those with
ruleflow-group defined and use a .rf where I define<BR>a flow in the way that
all rules without ruleflow-group (MAIN/DEFAULT) are fired and then a<BR>specific
ruleflow-group?<BR><BR><BR>In this way could be not necessary to use
session.startProcess("my_ruleflowgroup") in java, just<BR>call fireAllRules()
and design the process creating a RuleFlowGroup called/id as
"MAIN".<BR><BR><BR>Actually I can do this programatic, but I'm forced to put
ruleflow-group in every rule... if I dont wanna to<BR>group some rules in a
specific ruleflow-group I have to call them as ruleflow-group "MAIN"... and I
dont<BR>wanna the business people to worry about flows when they write rules if
they dont need
to...<BR><BR><BR>Thanks.<BR>
<BR>Felipe Piccolini
M.<BR>felipe.piccolini@bluesoft.cl<BR><BR><BR><BR><BR><BR><BR><BR><BR>_______________________________________________<BR>rules-users
mailing
list<BR>rules-users@lists.jboss.org<BR>https://lists.jboss.org/mailman/listinfo/rules-users<BR><BR><BR>
<BR>Felipe Piccolini
M.<BR>felipe.piccolini@bluesoft.cl<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>_______________________________________________<BR>rules-users
mailing
list<BR>rules-users@lists.jboss.org<BR>https://lists.jboss.org/mailman/listinfo/rules-users</FONT></FONT></DIV></DIV></BODY></HTML>