[rules-users] Guvnor 5.2.0-Final in Tomcat 6.0.32 fail to compile rules
Wolfgang Laun
wolfgang.laun at gmail.com
Wed Jul 6 05:54:33 EDT 2011
The correct form for this kind of constraint in 5.1.1 is
UNB.size > 0
(5.2.0 is more lenient.)
-W
2011/7/6 Michael Anstis <michael.anstis at gmail.com>
> HI,
>
> I'd just like to clarify, for others who come across this thread, that it's
> not a Guvnor issue, but a Drools Expert (that does the compilation).
>
> Anyway, here's two solutions for you:-
>
> (1) Add the typesafe annotation to your DRL
>
> declare Test
> @typesafe( false )
> end
>
> rule "prueba2"
> dialect "mvel"
> when
> Test( UNB.size() > 0 )
> then
> end
>
> (2) Re-phrase rule
>
> rule "prueba1"
> dialect "mvel"
> when
> Test( $a : UNB, $a.size() > 0 )
> then
> end
>
>
> On 5 July 2011 21:11, pamerida <elpamm at hotmail.com> wrote:
>
>> Heres my model:
>>
>>
>> http://drools.46999.n3.nabble.com/file/n3142257/rules-drools-model-1.0.0-SNAPSHOT-jar-with-dependencies.jar
>> rules-drools-model-1.0.0-SNAPSHOT-jar-with-dependencies.jar<http://drools.46999.n3.nabble.com/file/n3142257/rules-drools-model-1.0.0-SNAPSHOT-jar-with-dependencies.jar%0Arules-drools-model-1.0.0-SNAPSHOT-jar-with-dependencies.jar>
>>
>> the class used in the rules is this:
>>
>> package gt.gob.sat.aduana.carga.rules.edifact.cuscar;
>>
>> import java.io.*;
>> import java.util.Iterator;
>> import java.util.List;
>> import gt.gob.sat.aduana.carga.rules.edifact.common.*;
>>
>> public class Cuscar
>> implements Serializable
>> {
>>
>> private static final long serialVersionUID = 1L;
>> private List UNB;
>> private List UNH;
>> private List BGM;
>> private List segmentGroup1;
>> private List segmentGroup2;
>> private List FTX;
>> private List segmentGroup4;
>> private List GIS;
>> private List segmentGroup5;
>> private List CNT;
>> private List segmentGroup7;
>> private List segmentGroup17;
>> private List UNT;
>> private List UNZ;
>>
>> public Cuscar()
>> {
>> }
>>
>> public List getBGM() {
>> return BGM;
>> }
>>
>> public void setBGM(List bGM) {
>> BGM = bGM;
>> }
>>
>> public List getSegmentGroup1() {
>> return segmentGroup1;
>> }
>>
>> public void setSegmentGroup1(List segmentGroup1) {
>> this.segmentGroup1 = segmentGroup1;
>> }
>>
>> public List getSegmentGroup2() {
>> return segmentGroup2;
>> }
>>
>> public void setSegmentGroup2(List segmentGroup2) {
>> this.segmentGroup2 = segmentGroup2;
>> }
>>
>> public List getFTX() {
>> return FTX;
>> }
>>
>> public void setFTX(List fTX) {
>> FTX = fTX;
>> }
>>
>> public List getSegmentGroup4() {
>> return segmentGroup4;
>> }
>>
>> public void setSegmentGroup4(List segmentGroup4) {
>> this.segmentGroup4 = segmentGroup4;
>> }
>>
>> public List getGIS() {
>> return GIS;
>> }
>>
>> public void setGIS(List gIS) {
>> GIS = gIS;
>> }
>>
>> public List getSegmentGroup5() {
>> return segmentGroup5;
>> }
>>
>> public void setSegmentGroup5(List segmentGroup5) {
>> this.segmentGroup5 = segmentGroup5;
>> }
>>
>> public List getCNT() {
>> return CNT;
>> }
>>
>> public void setCNT(List cNT) {
>> CNT = cNT;
>> }
>>
>> public List getSegmentGroup7() {
>> return segmentGroup7;
>> }
>>
>> public void setSegmentGroup7(List segmentGroup7) {
>> this.segmentGroup7 = segmentGroup7;
>> }
>>
>> public List getSegmentGroup17() {
>> return segmentGroup17;
>> }
>>
>> public void setSegmentGroup17(List segmentGroup17) {
>> this.segmentGroup17 = segmentGroup17;
>> }
>>
>>
>> public List getUNH() {
>> return UNH;
>> }
>>
>> public void setUNH(List uNH) {
>> UNH = uNH;
>> }
>>
>> public List getUNT() {
>> return UNT;
>> }
>>
>> public void setUNT(List uNT) {
>> UNT = uNT;
>> }
>>
>> public List getUNZ() {
>> return UNZ;
>> }
>>
>> public void setUNZ(List uNZ) {
>> UNZ = uNZ;
>> }
>>
>> public List getUNB() {
>> return UNB;
>> }
>>
>> public void setUNB(List uNB) {
>> UNB = uNB;
>> }
>>
>>
>>
>> Thank you...
>>
>>
>> --
>> View this message in context:
>> http://drools.46999.n3.nabble.com/Guvnor-5-2-0-Final-in-Tomcat-6-0-32-fail-to-compile-rules-tp3139077p3142257.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
>>
>
>
> _______________________________________________
> 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/20110706/519bdd02/attachment.html
More information about the rules-users
mailing list