PotentialTheft ruleflow-group updates a simple String
attribute(potentialTheftRating) as shown below. The next step
(checkTheftRating used as an example here) uses the potentialTheftRating in
the condition. Note that some of the attributes are list of objects where
the update is on the attribute of the contained object in the list.
*//TheftRating ruleflow-group
*
rule "Row 1 PotentialTheft.gdst"
ruleflow-group "TheftRating"
lock-on-active true
dialect "mvel"
when
$car : Vehicle( convertible == "true" )
then
System.out.println(" row 1 ");
//$car.setPotentialTheftRating( "high" );
modify($car){
setPotentialTheftRating( "high" );
}
//update($car);
end
#from row number: 2
rule "Row 2 PotentialTheft.gdst"
ruleflow-group "TheftRatinggrp"
dialect "mvel"
when
$car : Vehicle( price >= "45001" , price <= "200000"
)
then
$car.setPotentialTheftRating( "high" );
System.out.println("row number: 2");
end
*//CheckTheftRating ruleflow-group*
rule "1 CheckTheftRating"
ruleflow-group "CheckTheftRating"
salience 100
dialect "mvel"
when
$car : Vehicle( potentialTheftRating == "high" )
then
System.out.println(" CheckTheftRating is true");
end
Regards,
Ravi
On Wed, Jul 13, 2011 at 8:28 AM, Tihomir Surdilovic <tsurdilo(a)redhat.com>wrote:
How about show your code and rules and maybe relevant parts of your
process? Would help understand your situation better. I would think
creating a simple test case that covers your scenario would not take
long to put together.
Thanks.
On 7/13/11 11:20 AM, Wishing Carebear wrote:
> Any pointers please!!
>
> On Tuesday, July 12, 2011, Wishing Carebear<wishing.carebear(a)gmail.com>
wrote:
>> Any pointers?
>>
>> On Tuesday, July 12, 2011, Wishing Carebear<wishing.carebear(a)gmail.com>
wrote:
>>> Hi,
>>> If I have a ruleflow with a sequence of rule tasks, should an update be
called to reflect the state of the fact in the working memory? In another
words If all the rules are mutually exclusive within a rule task, will the
changes made in first rule task, if used as a condition in the next rule
task will be reflected without calling explicit update.
>>>
>>> Thanks for your time and help.
>>>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/rules-users
>
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users