Re: [rules-users] error message

2007-10-11 Thread ekke

hi,
I'm running drools with eclipse 3.3 - there are some minor problems, but it
works
just confirmed:
create a new rules project with hello world example
then go to project - properties - java build path - added external jar: my
jdt.core from my eclipse 33 installation
run hello world - all is ok
without adding the jdt.core jar to my cp I get the error you reported

ekke

suresh00 wrote:
 
 Hi,
 I guess its not the issue with the classpath. The plugin doesn't work with
 eclipse 3.3. This works with Eclipse 3.2 (verified few minutes ago) 
 Here is the defect at Jboss site:
 http://jira.jboss.com/jira/browse/JBRULES-1260
 
 Thank you,
 Suresh Reddy.
 
 
 ekke wrote:
 
 hi,
 
 the error message gives you the answer:
 
 ...
 Caused by: java.lang.RuntimeException: The Eclipse JDT Core jar is not in
 the classpath
 ...
 
 put this jar into your classpath and it works
 (and much better and faster for you to get results: read the docs and
 search in the list before asking ;-)
 
 ekke
 
 
 
 suresh00 wrote:
 
 Hi,
 I am new to using Drools. I am trying to run hellow world from eclipse
 3.3. I got the following error msg:
 
 org.drools.RuntimeDroolsException: Unable to load dialect
 'org.drools.rule.builder.dialect.java.JavaDialectConfiguration:java'
 at
 org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:152)
 at
 org.drools.compiler.PackageBuilderConfiguration.buildDialectConfigurationMap(PackageBuilderConfiguration.java:140)
 at
 org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:117)
 at
 org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:94)
 at org.drools.compiler.PackageBuilder.init(PackageBuilder.java:124)
 at org.drools.compiler.PackageBuilder.init(PackageBuilder.java:86)
 at com.sample.DroolsTest.readRule(DroolsTest.java:50)
 at com.sample.DroolsTest.main(DroolsTest.java:21)
 Caused by: java.lang.RuntimeException: The Eclipse JDT Core jar is not
 in the classpath
 at
 org.drools.rule.builder.dialect.java.JavaDialectConfiguration.setCompiler(JavaDialectConfiguration.java:93)
 at
 org.drools.rule.builder.dialect.java.JavaDialectConfiguration.init(JavaDialectConfiguration.java:54)
 at
 org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:148)
 ... 7 more
 
 Any suggestions fixing this issue?
 
 Thanks,
 Suresh
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/error-message-tf4602256.html#a13149940
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


Re: [rules-users] error message

2007-10-11 Thread ekke

joshua,
I think this would be no good idea. this small step is not much work
and I'm flexible: if working with eclipse 3.4 milestones I can easy
use the 3.4 jdt.core jar
...and the error msg is clear enough: jdt.core.jar is missing
ekke

Joshua Jackson-3 wrote:
 
 Too bad Mark don't want to add eclipse JDT library into the plugin :(
 
 On 10/11/07, ekke [EMAIL PROTECTED] wrote:

 hi,
 I'm running drools with eclipse 3.3 - there are some minor problems, but
 it
 works
 just confirmed:
 create a new rules project with hello world example
 then go to project - properties - java build path - added external jar:
 my
 jdt.core from my eclipse 33 installation
 run hello world - all is ok
 without adding the jdt.core jar to my cp I get the error you reported

 
 -- 
 It's not just about coding, it's a matter of fulfilling your core being
 
 YM!: thejavafreak
 Blog: http://joshuajava.wordpress.com/
 ___
 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/error-message-tf4602256.html#a13150208
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] about function in rule file

2007-10-11 Thread prateek.katiyar

Hi all
 
I am using Drools 4.0.
I have written a function in a rule file and i want to use that function in 
another rule file.
Please tell me what should i do for this.
 
Thanks.
 
With Regards
Prateek 



The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.
 
www.wipro.com___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] call function from one rule file to another file

2007-10-11 Thread marimuthu.balasubramanian

Hi all
 
I am using Drools 4.0.
I have written a function in a rule file and i want to use that function
in another rule file.
Please tell me what should i do for this.
 
Regards
Marimuthu
 



The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.
 
www.wipro.com___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


RE: [rules-users] Basic questions about rule deployment

2007-10-11 Thread Hehl, Thomas
Just a note about URLs. URLs will automatically do base 64 encoding, which
primarily means that all spaces are replaced with %20%. If you are using a
URL to represent a file, make sure you test it with a file that has spaces
somewhere in the path.

I just learned this the hard way. You may need to convert your URL to a URI.

Good luck!

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Fermion
Sent: Thursday, October 11, 2007 5:29 AM
To: rules-users@lists.jboss.org
Subject: Re: [rules-users] Basic questions about rule deployment


Thank you very much!

I followed your advice and created URLs for my .drl and .dsl files.
Then I created a new URLClassLoader instance with these two URLs.
Finally I assigned this class loader to my packager builder using:

myPackageBuilder.getPackageBuilderConfiguration().setClassLoader(myURLClassL
oader);

Absolute path names seem to be Ok, as long as one uses file: as a prefix
to the URL string. I plan to use a config file to specify the locations of
my rule files (dsl and drl). The location of the config file itself will
then be defined by a command line argument.

Thanks again!
-- 
View this message in context:
http://www.nabble.com/Basic-questions-about-rule-deployment-tf4601653.html#a
13152365
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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Basic questions about rule deployment

2007-10-11 Thread Godmar Back
Replacing a space with %20 has nothing to do with base 64 encoding.
It's called percent-encoding (in RFC 3986) and it's required for valid URI.

You may be confusing terminology here, but your point of testing with
space-containing filenames is well taken.

 - Godmar

On 10/11/07, Hehl, Thomas [EMAIL PROTECTED] wrote:
 Just a note about URLs. URLs will automatically do base 64 encoding, which
 primarily means that all spaces are replaced with %20%. If you are using a
 URL to represent a file, make sure you test it with a file that has spaces
 somewhere in the path.

 I just learned this the hard way. You may need to convert your URL to a URI.

 Good luck!

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Fermion
 Sent: Thursday, October 11, 2007 5:29 AM
 To: rules-users@lists.jboss.org
 Subject: Re: [rules-users] Basic questions about rule deployment


 Thank you very much!

 I followed your advice and created URLs for my .drl and .dsl files.
 Then I created a new URLClassLoader instance with these two URLs.
 Finally I assigned this class loader to my packager builder using:

 myPackageBuilder.getPackageBuilderConfiguration().setClassLoader(myURLClassL
 oader);

 Absolute path names seem to be Ok, as long as one uses file: as a prefix
 to the URL string. I plan to use a config file to specify the locations of
 my rule files (dsl and drl). The location of the config file itself will
 then be defined by a command line argument.

 Thanks again!
 --
 View this message in context:
 http://www.nabble.com/Basic-questions-about-rule-deployment-tf4601653.html#a
 13152365
 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 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


[rules-users] Problem with DSL and 4.0.2

2007-10-11 Thread vdelbart

Hi,

I have a problem with my DSL and the 4.0.2 version :

this sentence doesn't work in 4.0.2 (work in 4.0.1) in Eclipse Editor :

[condition][]there is at least {number} {object}=ArrayList( size =
{number}) from collect( {object}() )

log :
!ENTRY org.eclipse.ui 4 0 2007-10-11 14:29:29.052
!MESSAGE String index out of range: -1
!STACK 0
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1768)
at
org.drools.lang.dsl.DefaultDSLMappingEntry.setMappingKey(DefaultDSLMappingEntry.java:139)
at org.drools.eclipse.dsl.editor.MappingEditor.okPressed(Unknown Source)
at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:508)
at org.eclipse.jface.dialogs.Dialog$3.widgetSelected(Dialog.java:660)
at 
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at org.eclipse.jface.window.Window.open(Window.java:796)
at org.drools.eclipse.dsl.editor.DSLEditor$8.widgetSelected(Unknown 
Source)
at 
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at 
org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)


If I put two blanks between {number} {object}, it's working.
[condition][]there is at least {number}  {object}=ArrayList( size =
{number}) from collect( {object}() )


But it's not a solution. 

thanks for your help,

V.
-- 
View this message in context: 
http://www.nabble.com/Problem-with-DSL-and-4.0.2-tf4606960.html#a13154907
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


Re: [rules-users] Basic questions about rule deployment

2007-10-11 Thread Fermion

Thanks for the warning!

I tested this with a path that contains spaces. For some reason I don't have
any problems with the corresponding URLs. Nevertheless I tried to convert
those URLs into URIs and THEN I see the problem of the spaces not being
accepted.

As the URLClassLoader takes URLs, this is not really an issue for me so far.

Still I don't really understand what is going wrong, as I had the impression
that URLs are a SUBSET of URIs. But this relationship seems not to be
strict...

The only thing I can say is that my app works with spaces inside the path
without the need of the described URI-workaround.
-- 
View this message in context: 
http://www.nabble.com/Basic-questions-about-rule-deployment-tf4601653.html#a13155173
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] 4.0.2 : Class EventManager

2007-10-11 Thread vdelbart

Hi,

I didn't find the class org.drools.EventManager in 4.0.2 where is it ?

And I find nothing about this in the documentation...

thanks,

V.
-- 
View this message in context: 
http://www.nabble.com/4.0.2-%3A-Class-EventManager-tf4607170.html#a13155535
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] drools jbrms- forall condition!

2007-10-11 Thread vamshidhar reddy chitti
hello,
is there any replace condition for 'forall' in drools jbrms web ui

tnx n advance
vamshidhar

   
-
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


Re: [rules-users] 4.0.2 : Class EventManager

2007-10-11 Thread vdelbart

thanks,

for my information, what's the difference between RuleBaseEventManager 
WorkingMemoryEventManager ?

thks,

V.





Mark Proctor wrote:
 
 vdelbart wrote:
 Hi,

 I didn't find the class org.drools.EventManager in 4.0.2 where is it ?
   
 http://downloads.jboss.com/drools/docs/4.0.2.15666.GA/apidocs/org/drools/RuleBaseEventManager.html
 http://downloads.jboss.com/drools/docs/4.0.2.15666.GA/apidocs/org/drools/WorkingMemoryEventManager.html
 And I find nothing about this in the documentation...

 thanks,

 V.
   
 
 
 ___
 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/4.0.2-%3A-Class-EventManager-tf4607170.html#a13156653
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


Re: [rules-users] 4.0.2 : Class EventManager

2007-10-11 Thread Mark Proctor

vdelbart wrote:

Hi,

I didn't find the class org.drools.EventManager in 4.0.2 where is it ?
  

http://downloads.jboss.com/drools/docs/4.0.2.15666.GA/apidocs/org/drools/RuleBaseEventManager.html
http://downloads.jboss.com/drools/docs/4.0.2.15666.GA/apidocs/org/drools/WorkingMemoryEventManager.html

And I find nothing about this in the documentation...

thanks,

V.
  



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


[rules-users] activation-group not canceling other rule members

2007-10-11 Thread Karl Trout
All,
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] activationCancelled() not being executed?

2007-10-11 Thread Edson Tirelli
   It is really difficult to answer that since your understanding seems
correct. Is it possible for you to provide a self contained test showing the
problem?

   []s
   Edson

2007/10/11, Fermion [EMAIL PROTECTED]:


 It's been a while since I had time to investigate this problem.

 I followed your advice and hooked up the DebugAgendaEventListener to my
 workingMemory instance.

 This clearly shows, that my activations are created but never canceled. So
 at least it is consistent with what I'm observing in my application.

 But before I start even considering it being a bug (I'm quite sure it is
 not), maybe it's better to understand what is happening in my code:

 I think that I nailed my problem down to an issue with my fact IDs:

 If I have, for example, a real world value (lets say a temperature) that
 is
 connected to a java bean, my understanding is, that the fact ID of this
 value inside the workingMemory should not change, even if I change the
 real
 world value (temperature rises)(and thus the java beans value).
 In fact the change is propagated to the working memory (as I call
 firePropertyChange inside my bean), but a NEW rule is activated by the
 changed fact, having a DIFFERENT fact ID!

 I'm quite sure that this is the reason for my problem with the missing
 cancellations. I'd assume that for a rule to be canceled the fact with the
 CORRECT fact ID would have to be changed.

 Now, in my application, it seems that every modification creates a NEW
 fact
 inside the working memory (which is of course not, what I want).

 I had the hope, that calling the firePropertyChange from inside the beans
 setters would notify the working memory automatically about the correct
 fact-ID.

 I checked my equals() and hashCode() methods but the hash code is
 always
 constant and equals is correspondingly true. I also checked that I don't
 accidentally re-assert the fact on modification.

 So what I don't understand is WHY the working memory thinks that the fact
 ID
 has changed...

 See you,

 fermion
 --
 View this message in context:
 http://www.nabble.com/activationCancelled%28%29-not-being-executed--tf4348054.html#a13158335
 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] activation-group not canceling other rule members

2007-10-11 Thread Mark Proctor

Karl Trout wrote:

All,
  

Care to give more details?

___
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] activationCancelled() not being executed?

2007-10-11 Thread Fermion

Hi,

as you might have noticed, I'm trying to avoid supplying a self-contained
test package.

The problem with that is, that my application code has grown quite a bit and
it will not be very easy to extract the code.

Nevertheless I will provide such a test package, should I not succeed in
finding the error myself very soon. As  I have next to no experience in
Java, I just want to rule out that it is no stupid Java-beginner mistake.

Actually I'm quite sure that it is; otherwise the bug would most likely be
known to someone in the community.

Therefore I will first clean up my code a bit more.

Thanks for the help anyway and I'll report back...

fermion
-- 
View this message in context: 
http://www.nabble.com/activationCancelled%28%29-not-being-executed--tf4348054.html#a13162482
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


Re: [rules-users] pattern

2007-10-11 Thread Karl.Trout




Karl Trout


On Oct 10, 2007, at 5:44 AM, DELBART Vincent [EMAIL PROTECTED]  
wrote:



Hi,

I think you have to use Test\\s+.

I don't think it's a DROOLS problem (maybe jdk).

V.


-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
] De la part de Markus Helbig

Envoyé : mercredi 10 octobre 2007 11:12
À : rules-users@lists.jboss.org
Objet : [rules-users] pattern

Drools Documentation says:

Matches a field against any valid Java Regular Expression. Typically  
that regexp is a String, but variables that resolve to a valid  
regexp are also allowed. It is important to note that different from  
java, if you write a String regexp directly on the source file, you  
don't need to escape '\'. Example:


but

Test\s+ is a valid RegEx (it was valid in Drools 3.x too), but now:

SyntaxfehlerRule Compilation error : [Rule name=OnlineStreaming  
Start, agendaGroup=MAIN, salience=100, no-loop=true] com/p7s1/swi/ 
phoenix/n24/Rule_OnlineStreaming_Start_0.java (19:923) :

Invalid escape sequence (valid ones are \b \t \n \f \r \ \' \\ )



What i'm doing wrong here?

Cheers

Markus
___
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


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