You could use RuleFlow, sure. But you don't have to.
Consider the following:-
*1) Intermediate facts
*
when
$p : Person( age < 18 )
then
insertLogical( new Juvenile( $p ) );
end
when
$p : Person( age >= 18 )
then
insertLogical( new Adult( $p ) );
end
when
Juvenile()
then
//Whatever
end
when
Adult()
then
//Whatever
end
Both Juvenile and Adult could be declared types.
*2) Multiple patterns
*
when
$p : Person( age < 18 )
WhateverCheckYouNeedForJuveniles( )
then
//Whatever
end
when
$p : Person( age >= 18 )
WhateverCheckYouNeedForAdults( )
then
//Whatever
end
On 23 September 2013 07:24, ashish6276 <ashishkumarec010(a)gmail.com> wrote:
You can do this.
There is a property called ruleflowGroup. Associate this propert with all 3
of your rule. So now your Rule 1 has ruleflowgroup 1, Rule 2 has ruleFlow
group2 and rule3 has ruleflowgroup3.
Now create a rule flow.
create rule task 1. go to property tab. associate the ruleflowgroup1 with
this task so your rule 1 is associated here.
Then create a diverge node. diverge based on condition if age is greater
than or less than 18.
so you have 2 flow from here. create 2 more rule task. associate ruleflow
group 2 and rule flowgroup3 with these. now add sequence flow based on your
converge. then have a converge node. join flow coming from both way here.
create end node.
--
View this message in context:
http://drools.46999.n3.nabble.com/How-To-Implement-Rule-Flow-tp4025932p40...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users