[rules-users] New in Drools: Updating facts retrieved in queries
Manuel Ortiz
manuel.ortizramos at gmail.com
Fri Apr 29 05:57:57 EDT 2011
Hi Wolfgang:
Thank you very much for the explanation. Now everyting works fine.
Best regards,
Manuel Ortiz.
2011/4/29 Wolfgang Laun <wolfgang.laun at gmail.com>
>
> 2011/4/29 Manuel Ortiz <manuel.ortizramos at gmail.com>
>
>>
>> import es.simcasva.alarmas.src.MDSVHechoAlarma;
>>
>>
>> query "existe Alarma" (MDSVHechoAlarma referencia)
>> $alarma : MDSVHechoAlarma( iIdAlarma == referencia.iIdAlarma,
>>
>>
>
>> The reported errors are:
>>
>> Description Resource Path Location Type
>> BuildError: Not possible to directly access the property 'iIdAlarma' of
>> declaration 'referencia' since it is not a pattern
>> AlarmaReglasGenerales.drl /aitor/es/simcasva/alarmas/rules Unknown Drools
>> Error
>>
>>
> "referencia" is a query parameter (and not a variable bound to a fact); to
> access any of its fields or methods you must use Java notation, requiring
> you to use a "return value restriction", hence the parentheses:
>
> $alarma : MDSVHechoAlarma( iIdAlarma == ( referencia.getIIdAlarma() ),
>
>
>
>
> _______________________________________________
> 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/20110429/8e33d6cd/attachment.html
More information about the rules-users
mailing list