Re: [rules-users] Attribute activations vs object activations

2007-10-22 Thread Mark Proctor
firstly I wouldn't recommend you use the dynamic update stuff its not 
very efficient. its no less efficient than jess, but the principle 
itslef is bad. The reason is because each field change results in a 
notification to the engine, where as you really want to notify the 
engine after a batch of changes to the instance.


The feature I believe you are after is called slot-specific, so that 
only fields which are constrained on pick up the notifications if those 
fields have changed. This is not currently supported - sorry. Will 
probably be in our next major release in Q1.


Mark

Joshua Undesser wrote:
I am sorry if this has already been answered, I tried a few different 
search

combinations within this user forum and didn't find an answer.

I am pretty new to Drools, but am no stranger to JESS and CLIPS.   We are
currently looking at moving over our product implementations from JESS to
DROOLS.   In looking at what it will take to do the conversion, and 
working
with a few sample systems, i've noticed that DROOLS doesn't seem to 
support

attribute activations, only object activations.What I mean by this is
say that I have two rules.

rule "Rule 1"
when
   $o : ObjectType (type == OBJECTTYPE.STATIC )
then
   System.out.println("ObjectType is Static");
end

rule "Rule 2"
when
   $o : ObjectType (active == false)
then
   System.out.println("ObjectType not active");
end


(My sample system is utilizing the default Drools 4.0 shadow fact 
support so
as an ObjectType object is created I am calling memory.insert(obj, 
true) for

dynamic updates.)

If on external property change event occurs on an ObjectType:active
attribute, both rules fire.  Which to me signifies that if any 
attribute on
the ObjectType object happens, all rules that contain ObjectType on 
the LHS

of the rule will be re-evaluated (not re-fired, but re-evaluated).  Now I
realize these rules are simple and that I could code the rules in a 
way to

avoid them being fired, but non the less, they would still need to be
evaluated to the point where the engine realizes it should run.   
Instead,

performance-wise, wouldn't it be more beneficial to only re-evaluate the
rules that contain the attribute that changed that you are interested 
in?   I.E.  In the above scenario, only RULE 2 would fire because rule 
1 doesn't
contain the attribute that changed.  
The early versions of JESS did not support attribute activations (aka per
slot activations), which was a major stumbling block.   However ever 
since
JESS 5.0, if I remember right, they've been included.  
So I guess my question is, does DROOLS support attribute activations 
and I

am just blind?If Drools does not support this, is it scheduled to be
supported in the future?   
Thank you in advance!


Joshua

___
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] Error in upgrading to drools 4

2007-10-22 Thread Mark Proctor

prashant sharma wrote:

Hi,
  I have an application using drools 3.0.6. I downloaded jboss rules 
4.0.2 GA and made necessary changes to the code to make it compatible 
to version 4.0.2. When I try to run the application now, I am getting 
following error.


2007-10-22 19:12:16,255 ERROR [STDERR] java.lang.NoSuchMethodError: 
org.antlr.runtime.DFA.unpackEncodedString(Ljava/lang/String;)[S


2007-10-22 19:12:16,255 ERROR [STDERR]  at 
org.drools.lang.DRLParser.(DRLParser.java:7205)


2007-10-22 19:12:16,255 ERROR [STDERR]  at 
org.drools.compiler.DrlParser.getParser(DrlParser.java:204)


2007-10-22 19:12:16,255 ERROR [STDERR]  at 
org.drools.compiler.DrlParser.parse(DrlParser.java:60)


2007-10-22 19:12:16,256 ERROR [STDERR]  at 
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:158)


2007-10-22 19:12:16,256 ERROR [STDERR]  at 
com.egatematrix.ess.framework.service.remote.rules.RulesEngineInvoker.readRule(RulesEngineInvoker.java:83)


2007-10-22 19:12:16,256 ERROR [STDERR]  at 
com.egatematrix.ess.framework.service.RuleService.doProcess(RuleService.java:294)


2007-10-22 19:12:16,256 ERROR [STDERR]  at 
com.egatematrix.ess.framework.service.FetchFSSData.invokeRuleService(FetchFSSData.java:140)


2007-10-22 19:12:16,256 ERROR [STDERR]  at 
com.egatematrix.ess.framework.service.FetchFSSData.triggerData(FetchFSSData.java:68)


2007-10-22 19:12:16,256 ERROR [STDERR]  at 
com.egatematrix.ess.framework.service.FetchFSSData$1.run(FetchFSSData.java:84)


2007-10-22 19:12:16,256 ERROR [STDERR]  at 
java.util.TimerThread.mainLoop(Timer.java:512)


2007-10-22 19:12:16,257 ERROR [STDERR]  at 
java.util.TimerThread.run(Timer.java:462)



I have antlr-runtime-3.0.jar in my classpath which came with drools 4 
distribution. I don't have any other version of antlr in my classpath. 
Has anyone else encountered this problem? Any help will be appreciated.
That error can only occur if its finding the wrong version of antlr, 
maybe you still have the old version in the classpath somewhere?
 
thanks,

Prashant



___
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] NoSuchMethodError

2007-10-22 Thread Mark Proctor

Hehl, Thomas wrote:


OK, I upgraded to 4.0.2 and here is the updated error:

 

java.lang.NoSuchMethodError: 
org.eclipse.jdt.internal.compiler.CompilationResult


.getProblems()[Lorg/eclipse/jdt/core/compiler/CategorizedProblem;

at 
org.drools.commons.jci.compilers.EclipseJavaCompiler$3.acceptResult(E


clipseJavaCompiler.java:321)

at 
org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:335)


 

at 
org.drools.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJ


avaCompiler.java:351)

at 
org.drools.commons.jci.compilers.AbstractJavaCompiler.compile(Abstrac


tJavaCompiler.java:51)

at 
org.drools.rule.builder.dialect.java.JavaDialect.compileAll(JavaDiale


ct.java:332)

at 
org.drools.compiler.DialectRegistry.compileAll(DialectRegistry.java:6


0)

at 
org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:308


)

at 
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.j


ava:167)

 

I have found this function in the file core-3.2.3.v_686_R32x.jar in 
the drools/lib directory for 4.2.


 

One of the things that has happened recently is that I have upgraded 
from 3.2 to 3.3.1. I thought this might be part of the problem, but I 
looked at the core jar for 3.3.1 and it has the same method.


 

The thing that puzzles me is that I'm not including the core file in 
my distribution, but if that's the problem, why am I not getting a 
ClassNotFoundException?


 


Thanks.

 




*From:* Hehl, Thomas
*Sent:* Monday, October 22, 2007 10:04 AM
*To:* 'Rules Users List'
*Subject:* NoSuchMethodError

 


I am running 4.01 and I started get this exception on a new piece of code:

 

java.lang.NoSuchMethodError: 
org.eclipse.jdt.internal.compiler.CompilationResult


.getProblems()[Lorg/eclipse/jdt/core/compiler/CategorizedProblem;

at 
org.drools.commons.jci.compilers.EclipseJavaCompiler$3.acceptResult(E


clipseJavaCompiler.java:335)

at 
org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:335)


 

at 
org.drools.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJ


avaCompiler.java:372)

at 
org.drools.commons.jci.compilers.AbstractJavaCompiler.compile(Abstrac


tJavaCompiler.java:51)

at 
org.drools.rule.builder.dialect.java.JavaDialect.compileAll(JavaDiale


ct.java:332)

at 
org.drools.compiler.DialectRegistry.compileAll(DialectRegistry.java:6


0)

at 
org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:287


)

at 
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.j


ava:160)

at 
com.acs.gs.juror.workflow.RulesBasedWorkflowManager.init(RulesBasedWo


rkflowManager.java:114)

 


It is blowing up on this line of code:

 


builder.addPackageFromDrl( *new* StringReader(drl) );

 

Which is the drl created from the spreadsheet compiler on the decision 
table.


 

This rules class has been tested thoroughly under junit. It wasn't 
until I deployed the library into my webapp that this issue turned up.


 


Does anyone have any idea what I should be doing next?


You need to be using the correct version of jdt core.


 


Thanks.

**Thom Hehl***
*Sr. eJuror Architect

**) Office (859) 277-8800 x 144**

*** [EMAIL PROTECTED] 
 ***

***ACS, Inc.**

**Government Solutions**

**1733 Harrodsburg Road***
**Lexington, KY 40504-3617***

**This e-mail message, including any attachments, is for the sole use 
of the intended recipient(s) and may contain confidential and 
privileged information. Any unauthorized review, use, disclosure or 
distribution is prohibited. If you are not the intended recipient, 
please contact the sender by reply e-mail and destroy all copies of 
the original message and notify sender via e-mail at 
[EMAIL PROTECTED] _ or by 
telephone at 859-277-8800 ext. 144. Thank you.**


 




___
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] Attribute activations vs object activations

2007-10-22 Thread Joshua Undesser

I am sorry if this has already been answered, I tried a few different search
combinations within this user forum and didn't find an answer.

I am pretty new to Drools, but am no stranger to JESS and CLIPS.   We are
currently looking at moving over our product implementations from JESS to
DROOLS.   In looking at what it will take to do the conversion, and working
with a few sample systems, i've noticed that DROOLS doesn't seem to support
attribute activations, only object activations.What I mean by this is
say that I have two rules.

rule "Rule 1"
when
   $o : ObjectType (type == OBJECTTYPE.STATIC )
then
   System.out.println("ObjectType is Static");
end

rule "Rule 2"
when
   $o : ObjectType (active == false)
then
   System.out.println("ObjectType not active");
end


(My sample system is utilizing the default Drools 4.0 shadow fact support so
as an ObjectType object is created I am calling memory.insert(obj, true) for
dynamic updates.)

If on external property change event occurs on an ObjectType:active
attribute, both rules fire.  Which to me signifies that if any attribute on
the ObjectType object happens, all rules that contain ObjectType on the LHS
of the rule will be re-evaluated (not re-fired, but re-evaluated).  Now I
realize these rules are simple and that I could code the rules in a way to
avoid them being fired, but non the less, they would still need to be
evaluated to the point where the engine realizes it should run.   Instead,
performance-wise, wouldn't it be more beneficial to only re-evaluate the
rules that contain the attribute that changed that you are interested in?   
I.E.  In the above scenario, only RULE 2 would fire because rule 1 doesn't
contain the attribute that changed.   


The early versions of JESS did not support attribute activations (aka per
slot activations), which was a major stumbling block.   However ever since
JESS 5.0, if I remember right, they've been included.   


So I guess my question is, does DROOLS support attribute activations and I
am just blind?If Drools does not support this, is it scheduled to be
supported in the future?


Thank you in advance!

Joshua

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


[rules-users] Error in upgrading to drools 4

2007-10-22 Thread prashant sharma
Hi,
  I have an application using drools 3.0.6. I downloaded jboss rules 4.0.2 GA 
and made necessary changes to the code to make it compatible to version 4.0.2. 
When I try to run the application now, I am getting following error.

2007-10-22 19:12:16,255 ERROR 
[STDERR] java.lang.NoSuchMethodError: 
org.antlr.runtime.DFA.unpackEncodedString(Ljava/lang/String;)[S

2007-10-22 19:12:16,255 ERROR 
[STDERR]  at 
org.drools.lang.DRLParser.(DRLParser.java:7205)

2007-10-22 19:12:16,255 ERROR 
[STDERR]  at 
org.drools.compiler.DrlParser.getParser(DrlParser.java:204)

2007-10-22 19:12:16,255 ERROR 
[STDERR]  at 
org.drools.compiler.DrlParser.parse(DrlParser.java:60)

2007-10-22 19:12:16,256 ERROR 
[STDERR]  at 
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:158)

2007-10-22 19:12:16,256 ERROR 
[STDERR]  at 
com.egatematrix.ess.framework.service.remote.rules.RulesEngineInvoker.readRule(RulesEngineInvoker.java:83)

2007-10-22 19:12:16,256 ERROR 
[STDERR]  at 
com.egatematrix.ess.framework.service.RuleService.doProcess(RuleService.java:294)

2007-10-22 19:12:16,256 ERROR 
[STDERR]  at 
com.egatematrix.ess.framework.service.FetchFSSData.invokeRuleService(FetchFSSData.java:140)

2007-10-22 19:12:16,256 ERROR 
[STDERR]  at 
com.egatematrix.ess.framework.service.FetchFSSData.triggerData(FetchFSSData.java:68)

2007-10-22 19:12:16,256 ERROR 
[STDERR]  at 
com.egatematrix.ess.framework.service.FetchFSSData$1.run(FetchFSSData.java:84)

2007-10-22 19:12:16,256 ERROR 
[STDERR]  at 
java.util.TimerThread.mainLoop(Timer.java:512)

2007-10-22 19:12:16,257 ERROR 
[STDERR]  at java.util.TimerThread.run(Timer.java:462)

I have antlr-runtime-3.0.jar in my classpath which came with drools 4 
distribution. I don't have any other version of antlr in my classpath. Has 
anyone else encountered this problem? Any help will be appreciated.
 
thanks, 
Prashant

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


[rules-users] NoSuchMethodError

2007-10-22 Thread Hehl, Thomas
OK, I upgraded to 4.0.2 and here is the updated error:

 

java.lang.NoSuchMethodError:
org.eclipse.jdt.internal.compiler.CompilationResult

.getProblems()[Lorg/eclipse/jdt/core/compiler/CategorizedProblem;

at
org.drools.commons.jci.compilers.EclipseJavaCompiler$3.acceptResult(E

clipseJavaCompiler.java:321)

at
org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:335)

 

at
org.drools.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJ

avaCompiler.java:351)

at
org.drools.commons.jci.compilers.AbstractJavaCompiler.compile(Abstrac

tJavaCompiler.java:51)

at
org.drools.rule.builder.dialect.java.JavaDialect.compileAll(JavaDiale

ct.java:332)

at
org.drools.compiler.DialectRegistry.compileAll(DialectRegistry.java:6

0)

at
org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:308

)

at
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.j

ava:167)

 

I have found this function in the file core-3.2.3.v_686_R32x.jar in the
drools/lib directory for 4.2.

 

One of the things that has happened recently is that I have upgraded from
3.2 to 3.3.1. I thought this might be part of the problem, but I looked at
the core jar for 3.3.1 and it has the same method.

 

The thing that puzzles me is that I'm not including the core file in my
distribution, but if that's the problem, why am I not getting a
ClassNotFoundException?

 

Thanks.

 

  _  

From: Hehl, Thomas 
Sent: Monday, October 22, 2007 10:04 AM
To: 'Rules Users List'
Subject: NoSuchMethodError

 

I am running 4.01 and I started get this exception on a new piece of code:

 

java.lang.NoSuchMethodError:
org.eclipse.jdt.internal.compiler.CompilationResult

.getProblems()[Lorg/eclipse/jdt/core/compiler/CategorizedProblem;

at
org.drools.commons.jci.compilers.EclipseJavaCompiler$3.acceptResult(E

clipseJavaCompiler.java:335)

at
org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:335)

 

at
org.drools.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJ

avaCompiler.java:372)

at
org.drools.commons.jci.compilers.AbstractJavaCompiler.compile(Abstrac

tJavaCompiler.java:51)

at
org.drools.rule.builder.dialect.java.JavaDialect.compileAll(JavaDiale

ct.java:332)

at
org.drools.compiler.DialectRegistry.compileAll(DialectRegistry.java:6

0)

at
org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:287

)

at
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.j

ava:160)

at
com.acs.gs.juror.workflow.RulesBasedWorkflowManager.init(RulesBasedWo

rkflowManager.java:114)

 

It is blowing up on this line of code:

 

builder.addPackageFromDrl( new StringReader(drl) );

 

Which is the drl created from the spreadsheet compiler on the decision
table.

 

This rules class has been tested thoroughly under junit. It wasn't until I
deployed the library into my webapp that this issue turned up.

 

Does anyone have any idea what I should be doing next?

 

Thanks.

Thom Hehl
Sr. eJuror Architect

* Office (859) 277-8800 x 144

* [EMAIL PROTECTED]   
ACS, Inc.

Government Solutions

1733 Harrodsburg Road
Lexington, KY 40504-3617

This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or distribution is
prohibited. If you are not the intended recipient, please contact the sender
by reply e-mail and destroy all copies of the original message and notify
sender via e-mail at [EMAIL PROTECTED]
  or by telephone at 859-277-8800 ext. 144.
Thank you.

 

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


AW: [rules-users] Re: Entity-Beans with Drools 4.0.2

2007-10-22 Thread Guardian
Oh shit - sorry that’s  embarrassing, thanks a lot Frank. 

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Im Auftrag von Frank Langelage
Gesendet: Montag, 22. Oktober 2007 17:50
An: rules-users@lists.jboss.org
Betreff: [rules-users] Re: Entity-Beans with Drools 4.0.2

Guardian wrote:
> Hello,
> 
> i have a problem to use entity-beans (ejb 3.0) in a DRL-file.
> If i use java-beans everything works fine, but when I use the following
rule
> with the "pruefungs"-entity object i get an exception. What is the
problem,
> can i use EJB 3.0 entitybeans with drools?
> 
> My rules are the following:
> 
> rule "Test Entity"
>   when
>   p : Pruefung( name : pruefungsName  )
>   then
>   System.out.println( name )  
> end 
> 
> rule "Hello World"
>   when
>   m : Message( status == Message.HELLO, message : message )
>   then
>   System.out.println( message ); 
>   m.setMessage( "Goodbye cruel world" );
>   m.setStatus( Message.GOODBYE );
>   update( m );
> end
> 
> 
> and the exception that occurs:
> 
> 12:29:31,093 INFO  [STDOUT] cannot read rule file:
> /drools/rules/testRule.drl
> 12:29:31,093 ERROR [STDERR] org.drools.rule.InvalidRulePackage: Rule
> Compilation error : [Rule name=Test Entity, agendaGroup=MAIN, salience=0,
> no-loop=false]
>   drools/rules/Rule_Test_Entity_0.java (8:25) : File
> drools/rules/Rule_Test_Entity_0.java, Line 8, Column 25: Expression
> "System.out.println(name)" is not a type

That has nothing to do with the type of Object.
There's simply missing the ";" at the end of the RHS line.

___
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] Re: Entity-Beans with Drools 4.0.2

2007-10-22 Thread Frank Langelage

Guardian wrote:

Hello,

i have a problem to use entity-beans (ejb 3.0) in a DRL-file.
If i use java-beans everything works fine, but when I use the following rule
with the "pruefungs"-entity object i get an exception. What is the problem,
can i use EJB 3.0 entitybeans with drools?

My rules are the following:

rule "Test Entity"
when
p : Pruefung( name : pruefungsName  )
then
System.out.println( name )  
end 


rule "Hello World"
when
m : Message( status == Message.HELLO, message : message )
then
		System.out.println( message ); 
		m.setMessage( "Goodbye cruel world" );

m.setStatus( Message.GOODBYE );
update( m );
end


and the exception that occurs:

12:29:31,093 INFO  [STDOUT] cannot read rule file:
/drools/rules/testRule.drl
12:29:31,093 ERROR [STDERR] org.drools.rule.InvalidRulePackage: Rule
Compilation error : [Rule name=Test Entity, agendaGroup=MAIN, salience=0,
no-loop=false]
drools/rules/Rule_Test_Entity_0.java (8:25) : File
drools/rules/Rule_Test_Entity_0.java, Line 8, Column 25: Expression
"System.out.println(name)" is not a type


That has nothing to do with the type of Object.
There's simply missing the ";" at the end of the RHS line.

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


[rules-users] NoSuchMethodError

2007-10-22 Thread Hehl, Thomas
I am running 4.01 and I started get this exception on a new piece of code:

 

java.lang.NoSuchMethodError:
org.eclipse.jdt.internal.compiler.CompilationResult

.getProblems()[Lorg/eclipse/jdt/core/compiler/CategorizedProblem;

at
org.drools.commons.jci.compilers.EclipseJavaCompiler$3.acceptResult(E

clipseJavaCompiler.java:335)

at
org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:335)

 

at
org.drools.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJ

avaCompiler.java:372)

at
org.drools.commons.jci.compilers.AbstractJavaCompiler.compile(Abstrac

tJavaCompiler.java:51)

at
org.drools.rule.builder.dialect.java.JavaDialect.compileAll(JavaDiale

ct.java:332)

at
org.drools.compiler.DialectRegistry.compileAll(DialectRegistry.java:6

0)

at
org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:287

)

at
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.j

ava:160)

at
com.acs.gs.juror.workflow.RulesBasedWorkflowManager.init(RulesBasedWo

rkflowManager.java:114)

 

It is blowing up on this line of code:

 

builder.addPackageFromDrl( new StringReader(drl) );

 

Which is the drl created from the spreadsheet compiler on the decision
table.

 

This rules class has been tested thoroughly under junit. It wasn't until I
deployed the library into my webapp that this issue turned up.

 

Does anyone have any idea what I should be doing next?

 

Thanks.

Thom Hehl
Sr. eJuror Architect

* Office (859) 277-8800 x 144

* [EMAIL PROTECTED]   
ACS, Inc.

Government Solutions

1733 Harrodsburg Road
Lexington, KY 40504-3617

This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or distribution is
prohibited. If you are not the intended recipient, please contact the sender
by reply e-mail and destroy all copies of the original message and notify
sender via e-mail at [EMAIL PROTECTED]
  or by telephone at 859-277-8800 ext. 144.
Thank you.

 

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


[rules-users] When to Use Rule Flow File

2007-10-22 Thread Bhattacharya, Sougata

Hi All,
I have one question on using rule flow file.
I have certain object to be validated, for this purpose I am using
drool. All the validation logic I am writing in drl file, Could anyone
let me know when to use rule flow file? 

Cheers
Sougata

This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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


[rules-users] Number of days beetween two dates

2007-10-22 Thread vdelbart

Hi,

I have 2 dates and I want compare them in mvel coding.

example :

public class MyObject
{
   Date nextDate;
   Date previousDate;
}

a rule :

rule "example"
dialect "mvel"
when
   $obj:MyObject( nextDate - previousDate > 30)
then
   System.out.println($obj);
end

Of course, it doesn't work but maybe somebody have a solution ?

thanks,

V.
-- 
View this message in context: 
http://www.nabble.com/Number-of-days-beetween-two-dates-tf4670492.html#a13342153
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] Sequence of rules in a decision table

2007-10-22 Thread Hehl, Thomas
That did it! Thanks.

 

  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mark Proctor
Sent: Friday, October 19, 2007 9:04 PM
To: Rules Users List
Subject: Re: [rules-users] Sequence of rules in a decision table

 

Hehl, Thomas wrote: 

I have a decision table and I'm running a series of rules. It is important
that the rules run in a specific order. How do I make my decision table
process the rules in the sequence I want, or simply from the top down?

There is an attribute called "sequential" for decision tables that when set
causes it row to have a high salience value of the previous row, this way it
executes the rules in the row order. Note this is different to the
sequential mode on stateless sessions, so don't confuse the two.



 

Thanks.

 

Thom Hehl
Sr. eJuror Architect

* Office (859) 277-8800 x 144

* [EMAIL PROTECTED]   
ACS, Inc.

Government Solutions

1733 Harrodsburg Road
Lexington, KY 40504-3617

This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or distribution is
prohibited. If you are not the intended recipient, please contact the sender
by reply e-mail and destroy all copies of the original message and notify
sender via e-mail at [EMAIL PROTECTED]
  or by telephone at 859-277-8800 ext. 144.
Thank you.

 

 





  _  



 
___
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] Entity-Beans with Drools 4.0.2

2007-10-22 Thread Guardian
Hello,

i have a problem to use entity-beans (ejb 3.0) in a DRL-file.
If i use java-beans everything works fine, but when I use the following rule
with the "pruefungs"-entity object i get an exception. What is the problem,
can i use EJB 3.0 entitybeans with drools?

My rules are the following:

rule "Test Entity"
when
p : Pruefung( name : pruefungsName  )
then
System.out.println( name )  
end 

rule "Hello World"
when
m : Message( status == Message.HELLO, message : message )
then
System.out.println( message ); 
m.setMessage( "Goodbye cruel world" );
m.setStatus( Message.GOODBYE );
update( m );
end


and the exception that occurs:

12:29:31,093 INFO  [STDOUT] cannot read rule file:
/drools/rules/testRule.drl
12:29:31,093 ERROR [STDERR] org.drools.rule.InvalidRulePackage: Rule
Compilation error : [Rule name=Test Entity, agendaGroup=MAIN, salience=0,
no-loop=false]
drools/rules/Rule_Test_Entity_0.java (8:25) : File
drools/rules/Rule_Test_Entity_0.java, Line 8, Column 25: Expression
"System.out.println(name)" is not a type
12:29:31,093 ERROR [STDERR] at
org.drools.rule.Package.checkValidity(Package.java:424)
12:29:31,093 ERROR [STDERR] at
org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:361)
12:29:31,093 ERROR [STDERR] at
drools.session.RuleEngineWrapper.(RuleEngineWrapper.java:131)
12:29:31,093 ERROR [STDERR] at
drools.session.RuleEngineWrapper.(RuleEngineWrapper.java:59)
12:29:31,093 ERROR [STDERR] at
drools.session.droolsManagementBean.startRuleEngineWrapper(droolsManagementB
ean.java:35)
12:29:31,093 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
12:29:31,093 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
12:29:31,093 ERROR [STDERR] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
12:29:31,093 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown
Source)
12:29:31,093 ERROR [STDERR] at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:11
2)
12:29:31,093 ERROR [STDERR] at
org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextIm
pl.java:166)
12:29:31,093 ERROR [STDERR] at
org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3Intercepto
rsInterceptor.java:63)
12:29:31,093 ERROR [STDERR] at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:10
1)
12:29:31,093 ERROR [STDERR] at
org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(Trans
actionScopedEntityManagerInterceptor.java:54)
12:29:31,093 ERROR [STDERR] at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:10
1)
12:29:31,093 ERROR [STDERR] at
org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsIntercep
tor.java:46)
12:29:31,093 ERROR [STDERR] at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:10
1)
12:29:31,093 ERROR [STDERR] at
org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
12:29:31,093 ERROR [STDERR] at
org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
12:29:31,093 ERROR [STDERR] at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:10
1)
12:29:31,093 ERROR [STDERR] at
org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationIntercepto
r.java:76)
12:29:31,093 ERROR [STDERR] at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:10
1)
12:29:31,093 ERROR [STDERR] at
org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstan
ceInterceptor.java:62)
12:29:31,093 ERROR [STDERR] at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:10
1)
12:29:31,109 ERROR [STDERR] at
org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationIn
terceptor.java:77)
12:29:31,109 ERROR [STDERR] at
org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3Authenticat
ionInterceptor.java:102)
12:29:31,109 ERROR [STDERR] at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:10
1)
12:29:31,109 ERROR [STDERR] at
org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.ja
va:47)
12:29:31,109 ERROR [STDERR] at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:10
1)
12:29:31,109 ERROR [STDERR] at
org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInter
ceptor.java:106)
12:29:31,109 ERROR [STDERR] at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:10
1)
12:29:31,109 ERROR [STDERR] at
org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer
.java:263)
12:29:31,109 ERROR [STDERR] at
org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
12:29:31,109 ERROR [STDERR

Re: [rules-users] Drools 4.0.3

2007-10-22 Thread Mark Proctor

[EMAIL PROTECTED] wrote:

Hi all
 
I am using drools 4.0.2 and in one of my application i am facing the 
same memory leak problem about which we have discussed earlier.
I want to know that when are you going to release the latest version 
of Drools i.e. Drools 4.0.3.

monday or tuesday.
 
It's very argent please give me the proper advice.
 
Thanks. Have a great day.
 
/*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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users