Hi,
Thanks for your replay.
I tried the way you said and my rule got executed.But there is some
problems.
1) My rule worked only one time with ' insert(); ' .My rule is
import java.util.List;
import java.util.ArrayList;
rule "Set Art"
no-loop true
when
$object : object()
$Value : Value($th: test, $Type : Type, $Id : Id,$Name : test.Name
,test.Name == "CPU Usage(%)" )
from $metric.metrics
not Art( testSettingId == $testId )
then
System.out.println(" Change-set.xml ");
Art art = new Art();
art.setMetric($Value);
art.setName($Name);
art.setCount(1);
art.setType($Type);
art.setObjectId($Id);
art.setCurrentTimeMillis(System.currentTimeMillis());
insert(art);
retract ($object);
end;
I tried after removing ' insert(art); ' ,then it worked properly.
2)When I changed the rule (System.out.println(" test ");) to test the
scanning interval ,the word 'test' printed more than two times at the same
iteration. The same happens every time the rule modifies.
Can you help me in this'
Thanks.
--
View this message in context:
http://drools.46999.n3.nabble.com/Rule-not-working-with-Change-set-xml-tp...
Sent from the Drools: User forum mailing list archive at
Nabble.com.