Re: [rules-users] 5.4.0.Beta2 parse error in consequence /* in string

2012-02-27 Thread Mark Proctor
On 27/02/2012 15:44, Benjamin Bennett wrote: I had created issue JBRULES-3399 for the issue. I tracked it a bit , it is any comment. // or /* , think the lexar expression for comment isn't correct . I am working towards a fix but not a antlr expert. I have used yacc. just a reminder to read

Re: [rules-users] 5.4.0.Beta2 parse error in consequence /* in string

2012-02-27 Thread Wolfgang Laun
This is an MVEL issue, which doesn't have a lexer and doesn't use antlr. MVEL just picks up characters from a stream, trying to compact them into tokens, apparently according to some state, in highly brittle code. (I'm not slandering - the author's comment says so, too.) I cannot reproduce the bug

Re: [rules-users] Constants

2012-02-27 Thread Wolfgang Laun
@Davide, there is *nothing* in Drools that is a full-fledged replacement for eitherr #define LIMIT 100 as in C, or const magic = 4711; as in Pascal, or..., or... Any modern programming language has this facility, and templates are no replacement, and globals still need Java code for their ini

Re: [rules-users] [Drools Planner] Hard constraint appears to be ignored

2012-02-27 Thread Reinis
Hello, I did all the suggestions from Geoffrey (thanks sir) and now the TRACE is failing with an additional rule: java.lang.IllegalStateException: The presumedScore (0hard/0soft) is corrupted because it is not the realScore (0hard/-1soft). Presumed workingMemory: Score rule (penalize late a

Re: [rules-users] Constants

2012-02-27 Thread Davide Sottara
If you think of how RETE works, Globals serve as constants at runtime. If you need compile-time "constants", you might consider rule templates instead Best Davide -- View this message in context: http://drools.46999.n3.nabble.com/Constants-tp3780878p3782094.html Sent from the Drools: User forum

Re: [rules-users] jboss tohu

2012-02-27 Thread Olfa h
hi sir, thank you very much.for your help and your tip. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Drools facts using POJO accessor methods error

2012-02-27 Thread Brad Davis
Maybe you would be better off leveraging Guvnor for the Rules Editing. Then you would just need to develop a hook that calls JAXB to take an XML Schema to a Pojo Object Model within the Guvnor system. Brad Davis Red Hat Consulting Email: bda...@redhat.com | c: 980.226.7865 | http://www.redhat.c

Re: [rules-users] Drools facts using POJO accessor methods error

2012-02-27 Thread aliosha79
my use case is: XmlDocument ---> via JaxbUnmarshaller ---> POJO java Document I m implementing a rule editor... This ruleeditor analyzes the xmldocument and graphically allows me to build rules by selecting the document xml tree node... of course i can just build several rules in this way... but f

Re: [rules-users] jboss tohu

2012-02-27 Thread Davide Sottara
Hi Olfa, Eclipse indigo is an authoring environment, there's no "deployment" there, you just need to install the drools plugin from the jboss tools (see docs), create a rule project and include the tohu jars/rule files in the classpath. Once you're ready with your application, you can generate e.

Re: [rules-users] Drools facts using POJO accessor methods error

2012-02-27 Thread Davide Sottara
Now this is an interesting use case could you please provide more details on why you're trying to do such a thing? Are you working on some kind of translator/analyzer? Thanks Davide btw, taking constraints out of patterns does not seem the best way to use a RETE engine could you consider s

Re: [rules-users] Drools facts using POJO accessor methods error

2012-02-27 Thread aliosha79
Precisely i want to turn this form... when $Class : MyClass (className() == "Class1") then System.out.println("ok!!!"); end in this: when $Class : MyClass() ...($Class.className() == "Class1") then System.out.println("ok!!!"); end I need to de

Re: [rules-users] Drools facts using POJO accessor methods error

2012-02-27 Thread Wolfgang Laun
I'm not sure what you're asking, but I'm you'll find the answer easily enough by reading the Expert documentation. -W On 27 February 2012 17:59, aliosha79 wrote: > what would be the right syntax using the second form, if i wanted to use > two > rows? like the first one? > Something like this? >

[rules-users] A problem in sliding windows.

2012-02-27 Thread Hassan
when I was testing the sliding windows, I was blocked becouse this concept doesn't work for me, It's becouse of my misunderstanding of the concept, I looking for the error which I do: for exemple: ==> the rule: */ rule "sliding windows" when $a : Event1() over window:t

Re: [rules-users] Drools facts using POJO accessor methods error

2012-02-27 Thread aliosha79
what would be the right syntax using the second form, if i wanted to use two rows? like the first one? Something like this? when $Class : MyClass() $Class(className() == "Class1") ... ? thanks -- View this message in context: http://drools.46999.n3.nabble.com/Droo

Re: [rules-users] Drools facts using POJO accessor methods error

2012-02-27 Thread aliosha79
ok thanks a lot! -- View this message in context: http://drools.46999.n3.nabble.com/Drools-facts-using-POJO-accessor-methods-error-tp3780387p3781136.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list r

Re: [rules-users] 5.4.0.Beta2 parse error in consequence /* in string

2012-02-27 Thread Benjamin Bennett
I had created issue JBRULES-3399 for the issue. I tracked it a bit , it is any comment. // or /* , think the lexar expression for comment isn't correct . I am working towards a fix but not a antlr expert. I have used yacc. On Mon, Feb 27, 2012 at 1:38 AM, Wolfgang Laun wrote: > Submitted: J

[rules-users] jboss tohu

2012-02-27 Thread Olfa h
hi, can someone help me to deploy jboss tohi 1.2.0 into jboss 4.3.2 and eclipse indigo ? thx ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] CLOUD mode Vs Stream Mode.

2012-02-27 Thread Hassan
I wanna just rectify Event1 ev1=new Event1((long)1000,(long)2000); // occur in 1s and finishes in 2s Event1 ev2=new Event1((long)3000,(long)4000); // occur in 3s and finishes in 4s thanks :) -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-CLOUD-mode-Vs-Stream-

Re: [rules-users] CLOUD mode Vs Stream Mode.

2012-02-27 Thread Hassan
Hi, Exactly ! But when I want to test if the sliding windows work in both cases (with end without Stream Mode), It doesn't work !! for exemple: "this is my rule" rule "sliding windows" when $a : Event1() over window:time(2s) then System.out.println(

Re: [rules-users] AgendaFilter - filter rule based on package name

2012-02-27 Thread Kevin Kelleher
Thanks Laune, works Kevin -- View this message in context: http://drools.46999.n3.nabble.com/AgendaFilter-filter-rule-based-on-package-name-tp3772193p3780521.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-user

Re: [rules-users] CLOUD mode Vs Stream Mode.

2012-02-27 Thread Mauricio Salatino
If you are not using sliding windows and you are not expecting a retraction of your not relevant events, it will work. Cheers On Mon, Feb 27, 2012 at 12:06 PM, Wolfgang Laun wrote: > All events have a timestamp. > > -W > > > > On 27/02/2012, Hassan wrote: > > Hi salaboy , > > > > Thank for your

Re: [rules-users] Drools facts using POJO accessor methods error

2012-02-27 Thread Wolfgang Laun
As soon as you use eval(), you are in Java-land where String comparisons should not be made using "==". There's nothing wrong with the second form, i.e., you can write (using Drools 5.3.0) MyClass (getClassName() == "Class1") although the simpler form is usually preferred: MyClass( classNa

Re: [rules-users] CLOUD mode Vs Stream Mode.

2012-02-27 Thread Wolfgang Laun
All events have a timestamp. -W On 27/02/2012, Hassan wrote: > Hi salaboy , > > Thank for your reply, > > from the docs: > > */This mode does not impose any kind of additional requirements on facts. So > for instance: > > There is no notion of time. No requirements clock synchronization. > The

Re: [rules-users] POJO accessors method in Drools facts

2012-02-27 Thread youssef azbakh
Hi I think that yo have to instanciate the object and insert it into the working memory then you fire all rules like this : MyClass x= new MyClass(); ksession.insert(x); ksession.fireAllRules(); it will work without problem

[rules-users] Drools facts using POJO accessor methods error

2012-02-27 Thread aliosha79
Hi, i have some troubles to undestand how drools processes FACTS. I have a POJO class resulted from an UnMarshal jaxb processing like this: public MyClass { protected String className = "Class1"; public getClassName(){ return className; } public setClassName(String className){

Re: [rules-users] Drools Planner: Vehicle routing problems

2012-02-27 Thread Geoffrey De Smet
Op 27-02-12 12:07, davidglassborow schreef: > Geoffrey, > >> Check your Solution's cloning method. >> If you clone the Visit, you need to make sure that planning variables of >> each cloned Visit are pointing to the new clones and not the original >> Visits. >> See my implementation in TSP. > Sur

[rules-users] POJO accessors method in Drools facts

2012-02-27 Thread aliosha79
Hi, i have some troubles to undestand how drools processes FACTS. I have a POJO class resulted from an UnMarshal jaxb processing like this: public MyClass { protected String className = "Class1"; public getClassName(){ return className; } public setClassName(String className){ t

Re: [rules-users] CLOUD mode Vs Stream Mode.

2012-02-27 Thread Hassan
Hi salaboy , Thank for your reply, from the docs: */This mode does not impose any kind of additional requirements on facts. So for instance: There is no notion of time. No requirements clock synchronization. There is no requirement on event ordering. The engine looks at the events as an unnorde

Re: [rules-users] Drools Planner: Vehicle routing problems

2012-02-27 Thread davidglassborow
Geoffrey, > Check your Solution's cloning method. >If you clone the Visit, you need to make sure that planning variables of >each cloned Visit are pointing to the new clones and not the original >Visits. >See my implementation in TSP. Sure, my clone method is virtually the same as your TSP one

Re: [rules-users] CLOUD mode Vs Stream Mode.

2012-02-27 Thread Mauricio Salatino
Hi, What exactly are you doing with events? I think that the temporal operators will work as expected. If you are working in cloud mode you will not have sliding windows, the concept of now and events lifecycle managements as stated in the docs. Cheers On Mon, Feb 27, 2012 at 10:51 AM, Hassan wro

[rules-users] CLOUD mode Vs Stream Mode.

2012-02-27 Thread Hassan
Hello, It's clair that to work with thae events we have to put our base configuration into STREAM mode like this: */KnowledgeBaseConfiguration config = KnowledgeBaseFactory.newKnowledgeBaseConfiguration(); config.setOption( EventProcessingOption.STREAM );/* But in an exemple, I didn't use this

[rules-users] CLOUD mode Vs Stream Mode.

2012-02-27 Thread Hassan
Hello, It's clair that to work with thae events we have to put our base configuration into STREAM mode like this: */KnowledgeBaseConfiguration config = KnowledgeBaseFactory.newKnowledgeBaseConfiguration(); config.setOption( EventProcessingOption.STREAM );/* But in my code bellow I didn't use t

Re: [rules-users] Drools Planner: Vehicle routing problems

2012-02-27 Thread Geoffrey De Smet
Op 27-02-12 10:46, davidglassborow schreef: > Hi Ge0ffrey, > >> What do you mean by initial solution? The setPlanningProblem() aka "the >> uninitialed solution" >> or the solution after the construction heuristic (aka "the initialized >> solution") > I mean the initialised solution > >> What's "1

Re: [rules-users] Drools Planner: Vehicle routing problems

2012-02-27 Thread davidglassborow
Hi Ge0ffrey, > What do you mean by initial solution? The setPlanningProblem() aka "the > uninitialed solution" > or the solution after the construction heuristic (aka "the initialized > solution") I mean the initialised solution > What's "109"? Sorry, the number is just the number of millisec

Re: [rules-users] [Drools Planner] Hard constraint appears to be ignored

2012-02-27 Thread Geoffrey De Smet
Op 26-02-12 19:47, Reinis schreef: > Hello, > >> 1) TRACE > It did actually crash! Good :) > java.lang.IllegalStateException: The presumedScore (0hard/-860soft) is > corrupted because it is not the realScore (0hard/-858soft). It's not crashing on the hard constraint difference, but that probabl