[rules-users] how to retract all documents created in the following scenario
vadlam
sreeram.vadlamudi at wellsfargo.com
Thu Feb 2 17:47:16 EST 2012
when
$emptyDocs:java.util.List(size>0) from collect ( Document( field1== null ||
== ( "" ) , field2 == null || == ( "") ) )
then
//insert an error
Error fact0 = new Error();
fact0.setErrorCode( "code1" );
insert(fact0 );
for (int i=0; i < $emptyDocs.size(); i++){
retract( $emptyDocs.get(i));
}
end
when I do a validate on this, I get an error as below
unable to resolve method using strict-mode:
org.drools.spi.KnowledgeHelper.$emptyDocs()] [Near : {... for (int i=0; i <
$emptyDocs.size(); i++){ ....}]
am I making a mistake somewhere ?
--
View this message in context: http://drools.46999.n3.nabble.com/how-to-retract-all-documents-created-in-the-following-scenario-tp3711226p3711512.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
More information about the rules-users
mailing list