[rules-users] how to retract all documents created in the following scenario

Esteban Aliverti esteban.aliverti at gmail.com
Fri Feb 3 03:00:01 EST 2012


Did you try using Java dialect instead of MVEL?

Best Regards,

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com


On Thu, Feb 2, 2012 at 11:47 PM, vadlam <sreeram.vadlamudi at wellsfargo.com>wrote:

>
> 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.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120203/6d14ba75/attachment.html 


More information about the rules-users mailing list