Re: [rules-users] parsing error using accumulate

2007-09-06 Thread Mark Proctor

$media : Double(double value  5)


double value has a space in it? that's not a valid field accessor..

Mark
Isabelle Hupont wrote:

Hi!

I'm integrating Weka with Drools v.4 and I have a parsing error while trying
to read the following DRL rule:

rule calculate average
when
$inst : Instance()  
$media : Double(double value  5)
from accumulate($value : inst.classValue()
  average($value))  
then
		System.out.println(media ); 
end


I have the following error: 


org.drools.compiler.DroolsParserException: Unknown error while parsing. This
is a bug. Please contact the Development team.
at org.drools.compiler.DrlParser.compile(DrlParser.java:180)
at org.drools.compiler.DrlParser.parse(DrlParser.java:61)
at
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:158)
at com.sample.DroolsTest.readRule(DroolsTest.java:67)
at com.sample.DroolsTest.main(DroolsTest.java:24)

What I am doing wrong?
Thx
  


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] storing array in variable!

2007-09-06 Thread Edson Tirelli
   I believe that this happens because of the usage of x.y.z (nested
accessors). When using nested accessors, I think the engine is assuming the
result is a single object and not an array.
   Can you please open a jira for it and attach a test case?

   I will fix that for 4.0.2.

   Thanks.

[]s
Edson

2007/9/6, vamshidhar reddy chitti [EMAIL PROTECTED]:

 Hello Mr Edson,
 I tried using memberOf , but i get
 java.lang.ClassCastException: Can't check if an attribute is member of an
 object of class class [Ljava.lang.String;

 here is my code

 MyFact($arraystore : x.y.z)
 MyAnotherFact(a memberOf $arraystore)

 where z is an string of array
 and MyAnotherFact.a is a string

 waiting for ur reply

 thank you
 vamshi

 *Edson Tirelli [EMAIL PROTECTED]* schrieb:


 Yes, but use memberOf instead of in:

 rule XYZ
 when
 MyFact( $array : arrayAttr )
 AnotherFact( attr memberOf $array )
 then
 ...
 end

 []s
 Edson

 2007/9/5, vamshidhar reddy chitti [EMAIL PROTECTED]:
 
  hi
  how to store array of string values in a variable and later checking for
  some value to be in that array..
  for example
  String[] str = new String[] { Spouse, Annuitant, Nominee };
 
  am trying to store like this
  $test1 : Object($example : str)
  is it right?
 
  and i need to compare like Object2 ( x in ($example) )
 
  my rule doesnt fire..
 
  please help me..
 
  tnx
  vamshi
  --
  Beginnen Sie den Tag mit den neuesten Nachrichten. Machen Sie Yahoo! zu
  Ihrer Startseite!
  http://de.rd.yahoo.com/evt=41213/*http://de.yahoo.com/set
 
  ___
  rules-users mailing list
  rules-users@lists.jboss.org
  https://lists.jboss.org/mailman/listinfo/rules-users
 
 


 --
   Edson Tirelli
   Software Engineer - JBoss Rules Core Developer
   Office: +55 11 3529-6000
   Mobile: +55 11 9287-5646
   JBoss, a division of Red Hat @ 
 www.jboss.com___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users


 --
 Yahoo! Clever: Stellen Sie Fragen und finden Sie Antworten. Teilen Sie Ihr
 Wissen.


 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users




-- 
  Edson Tirelli
  Software Engineer - JBoss Rules Core Developer
  Office: +55 11 3529-6000
  Mobile: +55 11 9287-5646
  JBoss, a division of Red Hat @ www.jboss.com
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] parsing error using accumulate

2007-09-06 Thread Edson Tirelli
   Well, seems the parser is raising the wrong message here... need to fix
that...
   But the syntax should be something like:

rule calculate average
when
$media : Number( doubleValue  5)
from accumulate( Instance( $value : classValue
),
  average($value))
then
System.out.println(media );
end

   []s
   Edson




2007/9/6, Isabelle Hupont [EMAIL PROTECTED]:


 Hi!

 I'm integrating Weka with Drools v.4 and I have a parsing error while
 trying
 to read the following DRL rule:

 rule calculate average
 when
 $inst : Instance()
 $media : Double(double value  5)
 from accumulate($value : inst.classValue()
   average($value))
 then
 System.out.println(media );
 end

 I have the following error:

 org.drools.compiler.DroolsParserException: Unknown error while parsing.
 This
 is a bug. Please contact the Development team.
 at org.drools.compiler.DrlParser.compile(DrlParser.java:180)
 at org.drools.compiler.DrlParser.parse(DrlParser.java:61)
 at
 org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java
 :158)
 at com.sample.DroolsTest.readRule(DroolsTest.java:67)
 at com.sample.DroolsTest.main(DroolsTest.java:24)

 What I am doing wrong?
 Thx
 --
 View this message in context:
 http://www.nabble.com/parsing-error-using-accumulate-tf4390367.html#a12517682
 Sent from the drools - user mailing list archive at Nabble.com.

 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users




-- 
  Edson Tirelli
  Software Engineer - JBoss Rules Core Developer
  Office: +55 11 3529-6000
  Mobile: +55 11 9287-5646
  JBoss, a division of Red Hat @ www.jboss.com
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Still can't create a standalone application

2007-09-06 Thread MarkA

That still hasn't fixed it. I can now compile it with javac without errors
but it still gives noclassdeffound error when it runs.

At least I now have your example that does work, so I am going to modify it
bit by bit until I find out where my mistake is. My initial one was created
with the wizard in eclipse so I'm not sure what has happened!

Anyway, I will persevere and post the results in case anyone else needs
pointers.

Thanks all.

Mark.

Mark Proctor wrote:
 
 MarkA wrote:
 Okay, many thanks for this.

 Firstly, I apologise if I am asking these questions in the wrong place, I
 don't want to waste people's time but it is *very* frustrating for new
 users
 when problems like this occur. I scoured the documentation, the
 quick-start
 guide, the faqs and searched on the internet but could find no help. From
 some of the responses I have received from the various sources it seems
 that
 I am not the only person hitting these issues.

 Secondly, it looks like my error is that I set the CLASSPATH to point at
 the
 directories, .../JAR and .../JAR/lib, not each individual .jar file as in
 your batch file. I had tried it with just the small set of .jars that you
 have and, as far as I can tell, the only difference is using the
 directories
 in the CLASSPATH variable. I'll change that in mine and see what happens
 but
 I can compile and run the example you sent which is fantastic.
   
 This is standard Java, I don't think this is something we should be 
 explaining, as it's done in hundreds of places around the net.
 Many thanks again and sorry for being stupid.
   
 np, stupid Qs are allowed (we get lots of them), but you have to expect 
 a bit ot stick with them - call it character building ;) Good luck.

 Mark Proctor wrote:
   
 sigh I've zipped up droools-examples eclipse project with a 
 populated lib directory and a dos .bat file. Should be enough to get you 
 over the basics of java classpath configuration:
 http://wiki.jboss.org/wiki/PageInfo.jsp?page=JBossRules%2Fdrools-examples-401-runfib.zip

 Mark
 MarkA wrote:
 
 I'm close to giving up! 

 No matter what I do I get the noclassdeffound error. I can't get
 anything
 that uses Drools to work outside of eclipse.
 I've now tried using javac and I still get errors, the first is:
 

 [javac] [search path for source files:
 [/Users/mark/Documents/eclipse/drools-test-mini/src]]
 [javac] [search path for class files: [... (lots of paths removed) ...
 /Users/mark/Documents/eclipse/drools-test-mini/JAR
 ...]]
 ...
 [javac]
 /Users/mark/Documents/eclipse/drools-test-mini/src/com/mda/dt/DroolsTest.java:6:
 package org.drools does not exist
 [javac] import org.drools.RuleBase;
 [javac]   ^

 

 But the directory '/Users/mark/Documents/eclipse/drools-test-mini/JAR'
 has
 the following:

 antlr-runtime-3.0.jar   drools-compiler-4.0.1.jar  
 mvel14-1.2rc4rv908.jar  xpp3_min-1.1.3.4.O.jar
 core-3.2.3.v_686_R32x.jar   drools-core-4.0.1.jar  
 xercesImpl-2.4.0.jarxstream-1.2.2.jar
 drools-ant-4.0.1.jarjxl-2.4.2.jar  
 xml-apis-1.0.b2.jar

 The org.drools.RuleBase is in the drools-core jar file so what is it
 that
 I
 am doing wrong? 



   
   
 ___
 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
 
 

-- 
View this message in context: 
http://www.nabble.com/Still-can%27t-create-a-standalone-application-tf4387915.html#a12524542
Sent from the drools - user 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] Deploying BRMS package

2007-09-06 Thread kissro
Hello,

After building a rules package in BRMS, there is an option to create a
'Snapshot' and/or 'Download binary package'.  If you select download,
where do you put the .pkg file?  How do you deploy the .pkg file and get
your application to access it?  The documentation does not say where to
download the file to or how to use it.  Could someone tell me.

Thanks,
Rod
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Deploying BRMS package

2007-09-06 Thread Fernando Meyer

Hi,

Search in documentation for RuleAgent.

Regards

Fernando Meyer http://fmeyer.org
[EMAIL PROTECTED]
PGP: 0xD804DDFB



On Sep 6, 2007, at 1:42 PM, [EMAIL PROTECTED] wrote:


Hello,

After building a rules package in BRMS, there is an option to create a
'Snapshot' and/or 'Download binary package'.  If you select download,
where do you put the .pkg file?  How do you deploy the .pkg file  
and get
your application to access it?  The documentation does not say  
where to

download the file to or how to use it.  Could someone tell me.

Thanks,
Rod
___
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