3.1-M1 - Can't get rules to build
                                
                                
                                
                                    
                                        by Tom Gonzalez
                                    
                                
                                
                                        I am attempting to convert our application to use drools 3.1.M from
current use of 3.0.4.
I downloaded the binaries posted and am getting this very basic
exception when building our rules.
     [java] Feb 19, 2007 5:21:25 PM
com.nortel.connect.rbuilder.RulePackage addR
ulesFromDrlFile
     [java] INFO:       adding Rules from: CBMRules.drl (with associated
DSL)
     [java] Exception in thread "main" java.lang.NoSuchFieldError:
recognizer
     [java]     at
org.drools.lang.DRLLexer$DFA18.<init>(DRLLexer.java:3914)
     [java]     at org.drools.lang.DRLLexer.<init>(DRLLexer.java:3565)
     [java]     at
org.drools.compiler.DrlParser.getParser(DrlParser.java:78)
     [java]     at
org.drools.compiler.DrlParser.parse(DrlParser.java:110)
     [java]     at
org.drools.compiler.DrlParser.parse(DrlParser.java:96)
     [java]     at
com.nortel.connect.rbuilder.RulePackage.addRulesFromDrlFile(R
ulePackage.java:219)
Any suggestions for getting past this?
Thanks,
Tom G
                                
                         
                        
                                
                                18 years, 4 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                 
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        Bugs/Problems with 3.1.0M1
                                
                                
                                
                                    
                                        by Wolfgang Betz
                                    
                                
                                
                                        Hello to all,
i would like to address some problems with 3.1.0M1:
I've noticed that:
- using eclipse 3.2.2, and JPDL Plugin 3.1.0 alpha3 a program using rules does
not stop at breakpoints in rules (RHS) - ok, its alpha, maybe i'm missing 
something
- throws an internal NPE at parsing rules havin NO_LOOP set (even if parse
result caching is on)
- comparisons like "bpairl : BagsPerAirline(nrOfBusinessBags >= (500 + 333))"
throw NPE if field is null  - maybe adressed by
http://jira.jboss.com/jira/browse/JBRULES-627
- when 
    BagsPerAirline(nrOfBusinessBags >= (500 + 333)) //gives all >= 833 BUT
    BagsPerAirline(nrOfBusinessBags >= 500 + 333) //all >= 500!!!!!
- when   
      c : Flight(flightId == 1 | == (1+1)) 
// throws java.lang.UnsupportedOperationException: 
// does not support method call
// isAllowed(Object object, InternalWorkingMemory workingMemoiry)
//	at
// org.drools.rule.ReturnValueRestriction.
//          isAllowed(ReturnValueRestriction.java:137)
      
Thanx a lot for the "from" extension :-)
                                
                         
                        
                                
                                18 years, 5 months
                        
                        
                 
         
 
        
            
        
        
        
            
        
        
        
                
                        
                                
                                 
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        mismatched token error.
                                
                                
                                
                                    
                                        by Kolla, Sandeep
                                    
                                
                                
                                        Hi All,
This is the DRL
package com.gs.fw.intauto.entitle.rule.facts
import com.gs.fw.intauto.entitle.rule.facts.PersonFacts;
expander entitlement.dsl
rule "Black Berry Rule 1"
salience 1
when 
Employee with attribs
	- Type is 'Worker'
	- Department is 'Internal Automation'
	
	
	
then 
Log : "Entitled"
This is The DSL
[when]Employee with attribs=PersonFacts()
[when]- Type is '{type}'=type=='{type}'
[when]- Department is '{department}'=department=='{department}'
[when]- Division is '{division}'=division=='{division}'
[when]- City is '{city}'=city=='{city}'
[when]- User is '{kebrosId}'=kebrosId=='{kebrosId}'
[then]Log : "{message}"=System.out.println("{message}");
I am getting the following error
org.drools.rule.InvalidRulePackage: unknown:1:34 mismatched token:
[@12,34:37='rule',<30>,1:34]; expecting type ID
unknown:2:33 mismatched token: [@28,79:82='rule',<30>,2:33]; expecting
type ID
unknown:9:0  Unable to expand: Employee with attribs. Due to Expression
was not expandable: Employee with attribs
unknown:10:0  Unable to expand: - Type is 'Worker'. Due to Expression
was not expandable: - Type is 'Worker'
unknown:11:0  Unable to expand: - Department is 'Internal Automation'.
Due to Expression was not expandable: - Department is 'Internal
Automation'
unknown:10:2 Unexpected token ','
unknown:16:0  Unable to expand: Log : "Entitled". Due to Expression was
not expandable: Log : "Entitled"
unknown:23:0  Unable to expand: Employee with attribs. Due to Expression
was not expandable: Employee with attribs
unknown:26:0  Unable to expand: - Division is 'Financial Division'. Due
to Expression was not expandable: - Division is 'Financial Division'
unknown:27:0  Unable to expand: - City is 'New York'. Due to Expression
was not expandable: - City is 'New York'
unknown:24:2 Unexpected token ','
unknown:30:0  Unable to expand: Log : "Not Entitled". Due to Expression
was not expandable: Log : "Not Entitled"
I don't see any thing wrong with the DRL and DSL
Can someone help mw with this..
Thanks in advance
Sandeep.
                                
                         
                        
                                
                                18 years, 6 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                        
                                
                                
                                        
                                                
                                        
                                        
                                        working on grammar
                                
                                
                                
                                    
                                        by Michael Neale
                                    
                                
                                
                                        I have package attributes working, but got a wierd error with the grammar
accessing a field that is missing from an exception - did someone forget to
check in the latest DRL.g?
                                
                         
                        
                                
                                18 years, 6 months
                        
                        
                 
         
 
        
            
        
        
        
            
        
        
        
                
                        
                        
                                
                                
                                        
                                                
                                        
                                        
                                        Fwd: [rules-users] svn
                                
                                
                                
                                    
                                        by Michael Neale
                                    
                                
                                
                                        I believe this was intended for dev...
---------- Forwarded message ----------
From: Mark Proctor <mproctor(a)redhat.com>
Date: Apr 24, 2007 2:07 PM
Subject: [rules-users] svn
To: rules Users List <rules-users(a)lists.jboss.org>
I'm just doing a big refactor, please don't commit anything to trunk.
Thanks
Mark
--
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street,
Windsor, Berkshire,
SI4 1TE, United Kingdom.
Registered in UK and Wales under Company Registration No. 3798903
Directors: Michael Cunningham (USA), Charlie Peters (USA) and David Owens
(Ireland)
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
                                
                         
                        
                                
                                18 years, 6 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                 
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        Re: [rules-users] Pre Compiling
                                
                                
                                
                                    
                                        by Michael Neale
                                    
                                
                                
                                        I think we should have some dirt simple helper methods in drools-core for
deserializing:
something like "BinaryRuleBaseLoader.load(InputStream)" or similar.
Could also take packages, etc, and have a very simple built in cache. We
could have helper ones that grab it from JNDI etc (and perhaps some example
code on how to bind a binary rulebase to JNDI and how to update etc for
deployment). Just some ideas for simple ways to deal with deployment that
need no dependencies.
On 4/24/07, Mark Proctor <mproctor(a)codehaus.org> wrote:
>
>  just create a package or a rulebsae and serialise it somewhere. RuleBase
> then has a method to create a new working memory from an input stream, i.e.
> the serialised object.
>
> Mark
> Márcio Moraes wrote:
>
> Hi all,
>
> I've just discovered production machine does not have a compiler, so i
> thought pre-compiling my rules.
>
> How can i do that? Is there some ant task?
>
> Thanks,
>
> Márcio Moraes
>
> ------------------------------
>
> _______________________________________________
> rules-users mailing list
> rules-users@lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
                                
                         
                        
                                
                                18 years, 6 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                        
                                
                                
                                        
                                                
                                        
                                        
                                        maven assembler
                                
                                
                                
                                    
                                        by Michael Neale
                                    
                                
                                
                                        BRMS is now added as a seperate file (just the war).
Its a largish file (~20 meg it will be, all told) - so one other idea is a
seperate download.
Thoughts?
Michael.
PS I was trying to make a way to put dependencies in a seperate "lib"
folder, but maven didn't recognise the <dependencySets> tag - just thought
it would make for a neater distro for those not using maven.
Michael.
                                
                         
                        
                                
                                18 years, 6 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                        
                                
                                
                                        
                                                
                                        
                                        
                                        workingmemory and dispose()
                                
                                
                                
                                    
                                        by Mark Proctor
                                    
                                
                                
                                        currently working memories are auto garbage collected once you null 
them, by using a weak hashmap in the RuleBase. I'm currently adding 
async methods to the working memory, which means that the weak hashmap 
no longer works. So I'm thinking of using a normal hashmap, which means 
people MUST call workingMemory.dispose() or they will get memory leaks, 
are people ok with that? I now have ruleBase.newStatelessSession which 
won't adding the session to the Map, to avoid having to call dispose() 
for stateless sessions.
Mark
                                
                         
                        
                                
                                18 years, 6 months