Re: [rules-users] Guvnor 5.2.0-Final in Tomcat 6.0.32 fail to compile rules

2011-07-06 Thread pamerida
Thanks so much for your help guys, I will try your solutions...

--
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-tp3139077p3145092.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Guvnor 5.2.0-Final in Tomcat 6.0.32 fail to compile rules

2011-07-06 Thread Wolfgang Laun
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 

> 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  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
>>
>> 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@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>
>
> __

Re: [rules-users] Guvnor 5.2.0-Final in Tomcat 6.0.32 fail to compile rules

2011-07-06 Thread Michael Anstis
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  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
>
> 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@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Guvnor 5.2.0-Final in Tomcat 6.0.32 fail to compile rules

2011-07-05 Thread pamerida
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 

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@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Guvnor 5.2.0-Final in Tomcat 6.0.32 fail to compile rules

2011-07-05 Thread Michael Anstis
Hi,

Can you provide your object model too please?

Thanks,

Mike

On 5 July 2011 17:59, pamerida  wrote:

> Thanks Mike,
>
> My rule definition is (the image cause is defined with the guided editor
> from Guvnor)
>
> http://drools.46999.n3.nabble.com/file/n3141579/drools.jpg
>
> and the result source:
>
> rule "prueba"
> dialect "mvel"
> when
>  Cuscar( UNB.size() == 0 )
> then
> end
>
> Cuscar is defined in my model and it contains an ArrayList called UNB (with
> is getters and setters), Guvnor seems to recognize everything OK because it
> let me select the correct options for the type ArrayList from the drop down
> menu, but when i click the validate option it throws me this error:
>
> [prueba] Unable to wire compiled classes, probably related to compilation
> failures:[Error: no such identifier: UNB] [Near : {... UNB.size() }] ^
> [Line: 1, Column: 1]
>
> the identifier that doesnt seems to recognize is "size()", I have already
> tryed this rule:
>
> rule "prueba"
> dialect "mvel"
> when
>Cuscar( UNB == null )
> then
> end
>
> and it compiles just fine... I wonder if it has something to do with the
> strict mode that I posted in my first message?...
>
> Thanks so much for your help :)
>
>
>
> --
> 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-tp3139077p3141579.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Guvnor 5.2.0-Final in Tomcat 6.0.32 fail to compile rules

2011-07-05 Thread pamerida
Thanks Mike, 

My rule definition is (the image cause is defined with the guided editor
from Guvnor)

http://drools.46999.n3.nabble.com/file/n3141579/drools.jpg 

and the result source: 

rule "prueba"
dialect "mvel"
when
  Cuscar( UNB.size() == 0 )
then
end

Cuscar is defined in my model and it contains an ArrayList called UNB (with
is getters and setters), Guvnor seems to recognize everything OK because it
let me select the correct options for the type ArrayList from the drop down
menu, but when i click the validate option it throws me this error:

[prueba] Unable to wire compiled classes, probably related to compilation
failures:[Error: no such identifier: UNB] [Near : {... UNB.size() }] ^
[Line: 1, Column: 1]

the identifier that doesnt seems to recognize is "size()", I have already
tryed this rule:

rule "prueba"
dialect "mvel"
when
Cuscar( UNB == null )
then
end

and it compiles just fine... I wonder if it has something to do with the
strict mode that I posted in my first message?... 

Thanks so much for your help :)



--
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-tp3139077p3141579.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Guvnor 5.2.0-Final in Tomcat 6.0.32 fail to compile rules

2011-07-04 Thread Michael Anstis
Can you please provide more information, especially the rule you have
created?

If possible a copy of the resulting DRL would be cool too - (use the "View
Source" menu option).

Thanks,

Mike

On 4 July 2011 23:22, pamerida  wrote:

> Hi everyone,
>
> I am trying to create some rules with Guvnor guided editor but when I try
> to
> validate the rule it gives me a error message like this:
>
> "Unable to wire compiled classes, probably related to compilation
> failures:[Error: unable to resolve method using strict-mode:
> java.lang.Object.dateTimePeriod()] [Near : {...
> DTM[0].dateTimePeriod.dateOrTimeOrPer }] ^ [Line: 1, Column: 8"
>
> I have tried to turn off the strict mode by modifying the
> drools.packagebuilder.conf putting false in this property, but nothing
> seems
> to work
>
> drools.dialect.mvel.strict = false
>
> Thanks so much for your help... :)
>
>
>
> --
> 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-tp3139077p3139077.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users