Re: [rules-users] dependency issue after upgrading to 4.0.0 from MR3 with maven2?

2007-07-26 Thread Mark Proctor

As the stack trace says, you are missing the JDT Core binary:
Caused by: java.lang.RuntimeException: The Eclipse JDT Core jar is not 
in the classpath


Mark
Eric Miles wrote:
I am attempting to ween our project off of MR3 and on to the 4.0.0 GA 
and am having a lot of difficulty.  First off, I had compile issues 
with the PackageBuilderConfiguration class (attempting to set the 
compliance level to 1.5).  I figured that was no longer necessary so I 
removed that (I hope that's correct although I haven't seen this 
mentioned anywhere).  Now when I attempt to run a unit test, I get the 
following error:


org.drools.RuntimeDroolsException: Unable to load dialect 
'org.drools.rule.builder.dialect.java.JavaDialectConfiguration:java'
at 
org.drools.compiler.PackageBuilderConfiguration.buildDialectRegistry(PackageBuilderConfiguration.java:138)
at 
org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:114)
at 
org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:87)
at 
com.kronos.webta.service.key.rules.AccountKeyLookupTest.setUpBeforeClass(AccountKeyLookupTest.java:49)

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.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterRunner.java:74)
at 
org.junit.internal.runners.BeforeAndAfterRunner.runBefores(BeforeAndAfterRunner.java:50)
at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:33)

at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
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:98)
at 
org.drools.rule.builder.dialect.java.JavaDialectConfiguration.init(JavaDialectConfiguration.java:56)
at 
org.drools.compiler.PackageBuilderConfiguration.buildDialectRegistry(PackageBuilderConfiguration.java:134)

... 17 more


I am using Maven2, so I would assume my dependencies would be taken 
care of?  I'm only using 2 dependencies in my project for Drools:


dependency
groupIdorg.drools/groupId
artifactIddrools-compiler/artifactId
version4.0.0/version
scopecompile/scope
/dependency
dependency
groupIdorg.drools/groupId
artifactIddrools-core/artifactId
version4.0.0/version
scopecompile/scope
/dependency

From the following repo:

repository
idjboss/id
nameJBoss maven repository/name
urlhttp://repository.jboss.com/maven2 
http://repository.jboss.com/maven2%3C/url

/repository

Am I missing something?  I completely blew away my org.drools 
directory in my local repository to allow maven2 to download the 
dependencies, I see it's downloading the drools-compiler and 
drools-core 4.0.0 versions (although they do not have associated poms 
or checksums which I find odd).  Thanks!


Eric


___
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] Quick syntax question

2007-07-26 Thread Felipe Piccolini

This works:

if your fact is:
cl = Class.forName(java.lang.String);

And the rule is:

rule Test Class type
when
$cl: Class(this == (String.class))
then
System.out.println(Test Class: OK);
end



On 26-07-2007, at 12:11, Eric Miles wrote:

Eh, I need a marker fact that identifies if a certain rule needs to  
be run.  So I'm inserting a java.lang.ClassT object into the  
session.  The T determines if a rule is activated.  Does that make  
sense?


On Thu, 2007-07-26 at 16:06 +0100, Anstis, Michael (M.) wrote:

Surely this LHS is matched by the pattern

$sc : SomeClass()

???

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Eric Miles
Sent: 26 July 2007 15:19
To: rules-users@lists.jboss.org
Subject: [rules-users] Quick syntax question

Is there an easier way to write this LHS?

Class(name == 'com.mycompany.SomeClass')

It would be nice to do something like this:

Class(name == SomeClass.class.getName())

Suggestions?

Thanks all!

___
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



Felipe Piccolini M.
[EMAIL PROTECTED]




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


Re: [rules-users] dependency issue after upgrading to 4.0.0 from MR3 with maven2?

2007-07-26 Thread Mark Proctor
Yes it's a dependency of drools-compiler, I don't know why maven isn't 
working for you.


Mark
Eric Miles wrote:
So is this not a dependency of 4.0.0 or do I have to include a 
dependency manually?  Maven should take care of classpath issues for 
me, that's why I found this issue to be odd.


On Thu, 2007-07-26 at 20:48 +0100, Mark Proctor wrote:

As the stack trace says, you are missing the JDT Core binary:
Caused by: java.lang.RuntimeException: The Eclipse JDT Core jar is 
not in the classpath


Mark
Eric Miles wrote:
I am attempting to ween our project off of MR3 and on to the 4.0.0 
GA and am having a lot of difficulty.  First off, I had compile 
issues with the PackageBuilderConfiguration class (attempting to set 
the compliance level to 1.5).  I figured that was no longer 
necessary so I removed that (I hope that's correct although I 
haven't seen this mentioned anywhere).  Now when I attempt to run a 
unit test, I get the following error:


org.drools.RuntimeDroolsException: Unable to load dialect 
'org.drools.rule.builder.dialect.java.JavaDialectConfiguration:java'
at 
org.drools.compiler.PackageBuilderConfiguration.buildDialectRegistry(PackageBuilderConfiguration.java:138)
at 
org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:114)
at 
org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:87)
at 
com.kronos.webta.service.key.rules.AccountKeyLookupTest.setUpBeforeClass(AccountKeyLookupTest.java:49)

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.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterRunner.java:74)
at 
org.junit.internal.runners.BeforeAndAfterRunner.runBefores(BeforeAndAfterRunner.java:50)
at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:33)
at 
org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
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:98)
at 
org.drools.rule.builder.dialect.java.JavaDialectConfiguration.init(JavaDialectConfiguration.java:56)
at 
org.drools.compiler.PackageBuilderConfiguration.buildDialectRegistry(PackageBuilderConfiguration.java:134)

... 17 more


I am using Maven2, so I would assume my dependencies would be taken 
care of?  I'm only using 2 dependencies in my project for Drools:


dependency
groupIdorg.drools/groupId
artifactIddrools-compiler/artifactId
version4.0.0/version
scopecompile/scope
/dependency
dependency
groupIdorg.drools/groupId
artifactIddrools-core/artifactId
version4.0.0/version
scopecompile/scope
/dependency

From the following repo:

repository
idjboss/id
nameJBoss maven repository/name
urlhttp://repository.jboss.com/maven2 
http://repository.jboss.com/maven2%3C/url

/repository

Am I missing something?  I completely blew away my org.drools 
directory in my local repository to allow maven2 to download the 
dependencies, I see it's downloading the drools-compiler and 
drools-core 4.0.0 versions (although they do not have associated 
poms or checksums which I find odd).  Thanks!


Eric




___
rules-users mailing list
rules-users@lists.jboss.org mailto: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


Re: [rules-users] Re: Load working memory with old/existsing facts

2007-07-26 Thread Mark Proctor
I've found the issue, its removing the item twice. I'll fix this for the 
point release next week.

http://jira.jboss.org/jira/browse/JBRULES-1033

Thanks

Mark
Mark Proctor wrote:
hmm that looks like a bug, I'll look into it. We do have 
unit/integration tests for this, so I'd be interested to know what you 
are doing to kick this off. Are you just adding a clear agenda after 
the fireAllRules() in that example?


Mark
[EMAIL PROTECTED] wrote:


Thank you for the hint. I've tried to use clearAgenda() but I've 
following error:


 


Exception in thread main _java.lang.NullPointerException_

at org.drools.util.LinkedList.remove(_LinkedList.java:97_)

at 
org.drools.common.DefaultAgenda.removeScheduleItem(_DefaultAgenda.java:150_) 



at 
org.drools.common.ScheduledAgendaItem.remove(_ScheduledAgendaItem.java:159_) 



at org.drools.common.DefaultAgenda.clearAgenda(_DefaultAgenda.java:362_)

at 
org.drools.common.AbstractWorkingMemory.clearAgenda(_AbstractWorkingMemory.java:363_) 



at 
org.drools.examples.TroubleTicketExample.main(_TroubleTicketExample.java:58_)



  


Is there anything special to consider when using clearAgenda()?

 

 

 

- Edison wrote:  

 Technically it is possible and supported to serialize working 
memories. Although, we did faced problems with large serializations 
due to a known recursion issue in JDK. There is a JIRA for that, but 
I don't have the link right now.


Now, if you want to reassert objects without firing rules, maybe 
what you can do is call WorkingMemory.clearAgenda() after reasserting 
the ob! jects. Not sure if that will give you the results you expect.


[]s
Edson

2007/7/25, Arjun Dhar [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]:

bergstein-soraic.de
/xml/deref?link=http%3A%2F%2Fbergstein-soraic.de writes:



 I've a use case that is similar to the TroubleTicketExample that
is part of
the drools examples.
 In this examples new tickets are inserted via
workingMemory.assertObject
(ticket). However, tickets are usually managed and stored in a
ticketing system
(Remedy, Peregrine, etc). When I stop the drools engine, I assume
that the
state of the working memory is lost. When I start the engine
again, I'd like to
load the working memory with the tickets that are stored in the
tic! keting
system, but I don't want to fire all rules, since I'd to avoid
that rules are
executed again (e.g., rule Escalate - send a e-mail), which
have been
already executed before the drools engine has
   been stopped. Existing tickets in the ticketing system are
important facts
for the rules!
   and therefore the need to be loaded into the morking memory.


 Is there a way to build up the working memory with initial facts?
 Can I persist the state of the working memory and load it later
again?


 Many thanks in advance,
 Tom


Hey my two bits,

Assuming I dont know much about StatefulSessions holding objects
I wanted to
check with you, is this safe? I'm not sure over a period of time
if your
objects would be released with a StatefulSession/WorkingMemory,
would recommend
you 'soak test' (test over a period of time with consistent l oad)

But here is the possibility:
Well the interface WorkinfgMemory -- extends -- Eventmanager
which extends
Serializable.

You could try serializing the object, or query your WorkingMemory
for its state
and save it to a database. Am assuming you are using
StatefulSession so you
will have access to WorkingMemory.

Conceptually I just think its worng to use a Rule Engine to
persist state over
a such a long period of time. Any expert opinion?

regards,
Arjun

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

/xml/deref?link=https%3A%2F%2Flists.jboss.org%2Fmailman%2Flistinfo%2Frules-users




--
  Edson Tirelli
  Soft! ware Engineer - JBoss Rules Core Developer
  Office: +55 11 3529-6000
  Mobile: +55 11 9287-5646
  JBoss, a division of Red Hat @ www.jboss.com 
/xml/deref?link=http%3A%2F%2Fwww.jboss.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


Re: [rules-users] Re: Load working memory with old/existsing facts

2007-07-26 Thread Mark Proctor
hmm that looks like a bug, I'll look into it. We do have 
unit/integration tests for this, so I'd be interested to know what you 
are doing to kick this off. Are you just adding a clear agenda after the 
fireAllRules() in that example?


Mark
[EMAIL PROTECTED] wrote:


Thank you for the hint. I've tried to use clearAgenda() but I've 
following error:


 


Exception in thread main _java.lang.NullPointerException_

at org.drools.util.LinkedList.remove(_LinkedList.java:97_)

at 
org.drools.common.DefaultAgenda.removeScheduleItem(_DefaultAgenda.java:150_) 



at 
org.drools.common.ScheduledAgendaItem.remove(_ScheduledAgendaItem.java:159_) 



at org.drools.common.DefaultAgenda.clearAgenda(_DefaultAgenda.java:362_)

at 
org.drools.common.AbstractWorkingMemory.clearAgenda(_AbstractWorkingMemory.java:363_) 



at 
org.drools.examples.TroubleTicketExample.main(_TroubleTicketExample.java:58_)



  


Is there anything special to consider when using clearAgenda()?

 

 

 

- Edison wrote:  

 Technically it is possible and supported to serialize working 
memories. Although, we did faced problems with large serializations 
due to a known recursion issue in JDK. There is a JIRA for that, but I 
don't have the link right now.


Now, if you want to reassert objects without firing rules, maybe 
what you can do is call WorkingMemory.clearAgenda() after reasserting 
the ob! jects. Not sure if that will give you the results you expect.


[]s
Edson

2007/7/25, Arjun Dhar [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]:

bergstein-soraic.de
/xml/deref?link=http%3A%2F%2Fbergstein-soraic.de writes:



 I've a use case that is similar to the TroubleTicketExample that
is part of
the drools examples.
 In this examples new tickets are inserted via
workingMemory.assertObject
(ticket). However, tickets are usually managed and stored in a
ticketing system
(Remedy, Peregrine, etc). When I stop the drools engine, I assume
that the
state of the working memory is lost. When I start the engine
again, I'd like to
load the working memory with the tickets that are stored in the
tic! keting
system, but I don't want to fire all rules, since I'd to avoid
that rules are
executed again (e.g., rule Escalate - send a e-mail), which
have been
already executed before the drools engine has
   been stopped. Existing tickets in the ticketing system are
important facts
for the rules!
   and therefore the need to be loaded into the morking memory.


 Is there a way to build up the working memory with initial facts?
 Can I persist the state of the working memory and load it later
again?


 Many thanks in advance,
 Tom


Hey my two bits,

Assuming I dont know much about StatefulSessions holding objects I
wanted to
check with you, is this safe? I'm not sure over a period of time
if your
objects would be released with a StatefulSession/WorkingMemory,
would recommend
you 'soak test' (test over a period of time with consistent l oad)

But here is the possibility:
Well the interface WorkinfgMemory -- extends -- Eventmanager
which extends
Serializable.

You could try serializing the object, or query your WorkingMemory
for its state
and save it to a database. Am assuming you are using
StatefulSession so you
will have access to WorkingMemory.

Conceptually I just think its worng to use a Rule Engine to
persist state over
a such a long period of time. Any expert opinion?

regards,
Arjun

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

/xml/deref?link=https%3A%2F%2Flists.jboss.org%2Fmailman%2Flistinfo%2Frules-users




--
  Edson Tirelli
  Soft! ware Engineer - JBoss Rules Core Developer
  Office: +55 11 3529-6000
  Mobile: +55 11 9287-5646
  JBoss, a division of Red Hat @ www.jboss.com 
/xml/deref?link=http%3A%2F%2Fwww.jboss.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] Does when order matter?

2007-07-26 Thread Edson Tirelli

  Yes. The same way that the order in SQL statements matter. So always
write more constraining patterns first and you will get huge performance
benefits.

  []s
  Edson

2007/7/26, Ronald R. DiFrango [EMAIL PROTECTED]:


All,

I was wondering [and maybe this has be answered before] ,but does the
order of the rules in the when clause matter?

For example I have the following:

rtvHeader : RtvHeader( headerRtvNumber : rtvNumber )
repaymentCode : RepaymentCode( actualCode : code, matchApprv !=
Y )
lineCharge : HeaderAdditionalCharge( rtvNumber == headerRtvNumber,
originalRepaymentCode == actualCode )

In my case there is a higher likelihood that I will have more
RepaymentCodes than RtvHeaders [1 of these guys] and likely less
HeaderAdditionalCharge objects.  So should the order be more like:

rtvHeader : RtvHeader( headerRtvNumber : rtvNumber )
lineCharge : HeaderAdditionalCharge( rtvNumber == headerRtvNumber,
originalRepaymentCode : originalRepaymentCode)
repaymentCode : RepaymentCode( actualCode ==
originalRepaymentCode, matchApprv != Y )

Or does it not really matter?

Thanks in advance,

Ron

___
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] Quick syntax question

2007-07-26 Thread Anstis, Michael \(M.\)
Surely this LHS is matched by the pattern

$sc : SomeClass()

??? 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Eric Miles
Sent: 26 July 2007 15:19
To: rules-users@lists.jboss.org
Subject: [rules-users] Quick syntax question

Is there an easier way to write this LHS?

Class(name == 'com.mycompany.SomeClass')

It would be nice to do something like this:

Class(name == SomeClass.class.getName())

Suggestions?

Thanks all!

___
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: Odd static inner class behavior

2007-07-26 Thread Eric Miles

Edson,

That certainly makes sense.  However I'm fairly certain that in 
referencing the inner class in rule definition, I always qualified it 
with the outer class name, ie:


DataClass.AlternativeKey()
or
AnotherClass.AlternativeKey()

I appreciate your explaination of the merge process.  Rather than have 
you spend any more time on this, I'll try to put together a test case to 
ensure I was seeing the behavior I thought I was seeing.  I probably 
won't get around to this until tonight or the weekend.


If I was mistaken, I'll let you (and the mailing list) know.  If I was 
not, would you like me to open a JIRA with the attached test case?  I 
would assume that if the inner classes contain the qualified name that 
the engine should be able to handle that?


Thanks,
Eric

Edson Tirelli wrote:


Eric,

Thanks, I understand now.

 What happens is that if both DRL files declare the same package 
name, all their contents will be merged. It means that you would end up 
with both imports in the same namespace:


import com.company.DataClass.AlternativeKey;
import com.company.AnotherClass.AlternativeKey;

 And so the engine will raise an error saying that it does not know 
which one you are refering to when you write simply:


AlternativeKey

I think the engine behavior is correct, since the idea of loading 
two different files with the same name space into the same package 
builder is to merge them, or even replace (update) that eventually have 
the same name.


What do you think?

Edson


2007/7/26, Eric Miles [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]:


Edson,

I have since changed my schema but here was my issue:

rule1.drl:
import com.company.DataClass.AlternativeKey;
import com.company.DataClass;

rule Some rule
when
DataClass.AlternativeKey(someParm == true)
then
...
end

Different drlf file:
rule2.drl
import com.company.AnotherClass.AlternativeKey;
import com.company.AnotherClass;

rule Another rule
when
AnotherClass.AlternativeKey(diffParm == 1)
then
...
end


This was the gist of what I was doing.  The outer classes' names
were different, it was the INNER class of each of these classes that
had the same name.  I was actually getting compile errors on the
import statements.  Like I said, these rules worked fine if loaded
separately, but once I tried to put them all int he same rule base,
I was getting the import collision error.  Later on this evening
(when I'm not at work), I'll try to put together a small test case
and upload it.  In the meantime, you can look skim over this and let
me know if something jumps out at you.

Thanks,
Eric


On Thu, 2007-07-26 at 10:32 -0300, Edson Tirelli wrote:

Eric,

Not sure if I understood your problem, but if you have
multiple classes with the same name, and the only difference is
that they are inner classes of different classes, I guess what you
need to do is to fully qualify your class names in your rules...

rule xxx
when
my.package.MyClass.MyInnerClass( ... )
...
end

   If this is not your problem, can you please show us an example
so we understand it better?

   Edson


2007/7/25, Eric Miles [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]: 


Due to how JAXB treats anonymous inner complex types, I ended
up with a public static inner classes named AlternativeKey in
several of my data classes  I have several rules written to
deal with each data class individually that all work ok. 
However, when I attempt to put them all in the same rule base

(all belong to the same package), I get an import collision
exception on the AlternativeKey inner class.  Depending on
where in the builder I add the resource depends on which
AlternativeKey the compiler bitches about (validity).  I'm not
familiar with the source at all, so I'm unsure as to where to
look for this.  However, this sounds like a bug to me?  There
is an easy workaround for this as I I just don't use anonymous
types and define them in my schema explicitly.  Just thought
I'd identify this as a possi ble issue.

Thanks,
Eric 



___
rules-users mailing list
rules-users@lists.jboss.org mailto: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 http://www.jboss.com 





--
  Edson Tirelli
  Software Engineer - JBoss Rules Core Developer
  Office: +55 11 3529-6000
  Mobile: +55 11 9287-5646
  JBoss, a division of Red 

Re: [rules-users] Trying to create a restriction for an empty restriction error

2007-07-26 Thread Edson Tirelli

   Yuri,

   We support - for backward compatibility and I confess I haven't seen
this error before. I guess it may be complaining about the variable binding:

 $age : age - (Math.abs($age - c1.age)  10),

   Anyway, if you can please open a JIRA for that.
   An yes, we prefer to not use - anymore, so if you are able to change
this during your upgrade, then it is better to simply use the eval keyword
instead of the -. Example:

  c2:Child( eval(Math.abs(age - c1.age)  10), ...)

   Note that if that is the only place where you use the age field, the
binding is automatically created for you. You don't need to do it explicitly
anymore. If you need the binding for other purposes, you can do a regular
binding:

  c2:Child( $age : age, eval(Math.abs($age - c1.age)  10), ...)

   Regarding your second questions, the answer is yes. We now support
totally nestable  and || as constraints and restriction connectors. So:

  p2: Person(
   (sex == M  p1.sex == F) || (sex == F  p1.sex == M)
)

() are optional and  has higher priority than ||.
We already updated docs for such things in the manual. I would like to
ask you to read and please provide feedback and even patches for parts of
the text that eventually are not clear:

http://labs.jboss.com/file-access/default/members/drools/freezone/docs/4.0.0.13773GA/html/index.html

   Section 6.5.2.

   []s
   Edson


2007/7/25, Yuri [EMAIL PROTECTED]:


I am migrating my 3.0.6 rules into 4.0 but I am getting the following
error in
Drools IDE:

Trying to create a restriction for an empty restriction

I am basically using an inline-eval (I believe this is the new terminology
for
the -() construct):

Rule
when
   c1:Child()
   c2:Child(
  age - (Math.abs(age - c1.age)  10),
  ...)
then
   ...
end

If I remove the age - ... line the error goes away.

Along the same lines I am also wondering if there is a better way (aside
from
using -(), which has a lower perf as I understand it) of doing the
following:

Rule
when
   p1: Person()
   p2: Person(
 ...,
 sex - (
(sex == M  p1.sex == F)
|| (sex == F  p1.sex == M)
 )
   )
then
   insert(new Couple(p1, p2));
end

thanks,

___
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] processBuilder constructor

2007-07-26 Thread Kris Verlaenen
You shouldn't really access the ProcessBuilder directly anymore, we've added 
support in the PackageBuilder for that (similar to rules, decision tables, 
etc.):

PackageBuilder.addRuleFlow(Reader)

If you want to access ProcessBuilder directly, you can just provide an empty 
PackageBuilder, but it seems unlikely that you don't want to add any rules, 
as the ruleflows main purpose is to manage the evaluation of rulesets.  The 
ProcessBuilder requires access to a PackageBuilder as it internally also 
uses rules to control the ruleflow process execution.


Kris

- Original Message - 
From: hypnosat7 [EMAIL PROTECTED]

To: rules-users@lists.jboss.org
Sent: Thursday, July 26, 2007 2:49 PM
Subject: [rules-users] processBuilder constructor




hi,

Why the constructor take a package builder as argument :
ProcessBuilder(PackageBuilder packageBuilder)
isn't necessary to have rules in packageBuilder to add process to a rule
base ?
--
View this message in context: 
http://www.nabble.com/processBuilder-constructor-tf4151428.html#a11809817

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] or split

2007-07-26 Thread Mark Proctor

We will do a point release early next week, as there is also an MVEL bug.

Mark
Kris Verlaenen wrote:

  When I set the split type to OR I have this exception :

Seems like a copy-paste bug slipped into the OR implementation there.
The error has been fixed on trunk, so getting the latest version from 
svn will solve this problem.


Kris

- Original Message - From: hypnosat7 [EMAIL PROTECTED]
To: rules-users@lists.jboss.org
Sent: Wednesday, July 25, 2007 5:26 PM
Subject: [rules-users] or split




Hi,

  When I set the split type to OR I have this exception :

Exception in thread AWT-EventQueue-0 java.lang.ClassCastException:
org.drools.common.RuleFlowGroupNode cannot be cast to
org.drools.spi.Activation

What it could be
--
View this message in context: 
http://www.nabble.com/or-split-tf4142836.html#a11784787

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] [Newbie] Can't execute BRMS Discount insurance brokers tutorial

2007-07-26 Thread Massimo Frossi

Hi all,
I'm having troubles following the tutorial at 9.5.1 in Drools Documentation.
At the point
...Import the demo business rules insurance repository file into BRMS,
the compressed can be found at files folder in the demo project.
I cannot find any files folder in
http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-examples/drools-examples-brms/. 





I managed to import rules repository using repository_export.xml in
http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-examples/drools-examples-brms/src/main/resources/
I can see package and rules correctly loaded in BRMS, but when i try to
build binary package I get

16:37:25,203 INFO  [STDOUT] ERROR 25-07 16:37:25,203
(ApplicationContext.java:log:660)   Exception while dispatching incoming
RPC call
java.lang.IllegalArgumentException: Unable to handle the content type: dslr
   at
org.drools.brms.server.contenthandler.ContentHandler.getHandler(ContentHandler.java:74).

Could you please tell me what I am doing wrong?
Thank you,
Max


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


Re: [rules-users] Unhappy (hoppy?) jackrabbit

2007-07-26 Thread Fernando Meyer

Have you tried to delete both repository and repository.xml ?
It always works with corrupted data.

BTW, get the latest BRMS build in http://labs.jboss.com/drools/ 
download/index.html


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



On Jul 26, 2007, at 10:48 AM, Wagner Rick - rwagne wrote:


Fernando,

Thanks for the tip about JSF dependencies-- I believe I've gotten past
that error with the BRMS.  (Downloaded JSF1.3 and copied jsf- 
api.jar and

jsf-impl.jar to Tomcat's lib directory.  I also threw in commons
beanutils, collections, and digester per a web posting I'd found that
advocated these actions.)

So now JSF and Tomcat are happy, I can run the sample JSF apps just
fine.  Back to the BRMS!

It seems JackRabbit is unhappy-- it's complaining about the empty
custom_nodetypes.xml file I've got in Tomcat's
bin/repository/repository/nodetypes directory.  Here's the stacktrace:

Jul 26, 2007 8:44:18 AM org.apache.catalina.core.StandardContext
listenerStart
SEVERE: Exception sending context initialized event to listener  
instance

of class org.jboss.seam.servlet.SeamListener
org.drools.repository.RulesRepositoryException:
javax.jcr.RepositoryException: internal error: failed to read custom
node type definitions stored in custom_nodetypes.xml: Premature end of
file.: Premature end of file.
at
org.drools.brms.server.repository.BRMSRepositoryConfiguration.newSessi 
on

(BRMSRepositoryConfiguration.java:91)

I'm afraid I'm new to Jackrabbit, so I tried downloading and building
the given release (1.3) and supplying a valid custom_nodetypes.xml  
from
the build-- of course that didn't work.  Neither did removing the  
parts

of that file that seemed specific to the Jackrabbit build.

Can you please point me in the right direction?

Thanks much,

Rick
** 
***

The information contained in this communication is confidential, is
intended only for the use of the recipient named above, and may be
legally privileged.

If the reader of this message is not the intended recipient, you are
hereby notified that any dissemination, distribution or copying of  
this

communication is strictly prohibited.

If you have received this communication in error, please resend this
communication to the sender and delete the original message or any  
copy

of it from your computer system.

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


Re: Re: [rules-users] Re: Load working memory with old/existsing facts

2007-07-26 Thread tom
Thank you for the hint. Ive tried to use clearAgenda() but Ive following error:Exception in thread main java.lang.NullPointerExceptionat org.drools.util.LinkedList.remove(LinkedList.java:97)at org.drools.common.DefaultAgenda.removeScheduleItem(DefaultAgenda.java:150)at org.drools.common.ScheduledAgendaItem.remove(ScheduledAgendaItem.java:159)at org.drools.common.DefaultAgenda.clearAgenda(DefaultAgenda.java:362)at org.drools.common.AbstractWorkingMemory.clearAgenda(AbstractWorkingMemory.java:363)at org.drools.examples.TroubleTicketExample.main(TroubleTicketExample.java:58)Is thereanything special to consider when using clearAgenda()?- Edison wrote: Technically it is possible and supported to serialize working memories. Although, we did faced problems with large serializations due to a known recursion issue in JDK. There is a JIRA for that, but I dont have the link right now.  Now, if you want to reassert objects without firing rules, maybe what you can do is call WorkingMemory.clearAgenda() after reasserting the ob!
 jects. Not sure if that will give you the results you expect. []s Edson2007/7/25, Arjun Dhar [EMAIL PROTECTED]: bergstein-soraic.de writes: Ive a use case that is similar to the TroubleTicketExample that is part ofthe drools examples.  In this examples new tickets are inserted via workingMemory.assertObject(ticket). However, tickets are usually managed and stored in a ticketing system(Remedy, Peregrine, etc). When I stop the drools engine, I assume that the state of the working memory is lost. When I start the engine again, Id like toload the working memory with the tickets that are stored in the tic!
 ketingsystem, but I dont want to fire all rules, since Id to avoid that rules are executed again (e.g., rule Escalate - send a e-mail), which have beenalready executed before the drools engine has been stopped. Existing tickets in the ticketing system are important facts for the rules! and therefore the need to be loaded into the morking memory.  Is there a way to build up the working memory with initial facts? Can I persist the state of the working memory and load it later again?   Many thanks in advance, TomHey my two bits,Assuming I dont know much about StatefulSessions holding objects I wanted tocheck with you, is this safe? Im not sure over a period of time if your objects would be released with a StatefulSession/WorkingMemory, would recommendyou soak test (test over a period of time with consistent l

oad)But here is the possibility:Well the interface WorkinfgMemory -- extends -- Eventmanager which extends Serializable.You could try serializing the object, or query your WorkingMemory for its stateand save it to a database. Am assuming you are using StatefulSession so youwill have access to WorkingMemory. Conceptually I just think its worng to use a Rule Engine to persist state overa such a long period of time. Any expert opinion?regards,Arjun___rules-users mailing listrules-users@lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users -- Edson TirelliSoft!
 ware Engineer - JBoss Rules Core DeveloperOffice: +55 11 3529-6000Mobile: +55 11 9287-5646JBoss, 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] Odd static inner class behavior

2007-07-26 Thread Edson Tirelli

   Eric,

   Thanks, I understand now.

What happens is that if both DRL files declare the same package name,
all their contents will be merged. It means that you would end up with both
imports in the same namespace:

import com.company.DataClass.AlternativeKey;
import com.company.AnotherClass.AlternativeKey;

And so the engine will raise an error saying that it does not know
which one you are refering to when you write simply:

AlternativeKey

   I think the engine behavior is correct, since the idea of loading two
different files with the same name space into the same package builder is to
merge them, or even replace (update) that eventually have the same name.

   What do you think?

   Edson


2007/7/26, Eric Miles [EMAIL PROTECTED]:


 Edson,

I have since changed my schema but here was my issue:

rule1.drl:
import com.company.DataClass.AlternativeKey;
import com.company.DataClass;

rule Some rule
when
DataClass.AlternativeKey(someParm == true)
then
...
end

Different drlf file:
rule2.drl
import com.company.AnotherClass.AlternativeKey;
import com.company.AnotherClass;

rule Another rule
when
AnotherClass.AlternativeKey(diffParm == 1)
then
...
end


This was the gist of what I was doing.  The outer classes' names were
different, it was the INNER class of each of these classes that had the same
name.  I was actually getting compile errors on the import statements.  Like
I said, these rules worked fine if loaded separately, but once I tried to
put them all int he same rule base, I was getting the import collision
error.  Later on this evening (when I'm not at work), I'll try to put
together a small test case and upload it.  In the meantime, you can look
skim over this and let me know if something jumps out at you.

Thanks,
Eric

On Thu, 2007-07-26 at 10:32 -0300, Edson Tirelli wrote:

Eric,

Not sure if I understood your problem, but if you have multiple
classes with the same name, and the only difference is that they are inner
classes of different classes, I guess what you need to do is to fully
qualify your class names in your rules...

rule xxx
when
my.package.MyClass.MyInnerClass( ... )
...
end

   If this is not your problem, can you please show us an example so we
understand it better?

   Edson


 2007/7/25, Eric Miles [EMAIL PROTECTED]:

 Due to how JAXB treats anonymous inner complex types, I ended up with a
public static inner classes named AlternativeKey in several of my data
classes  I have several rules written to deal with each data class
individually that all work ok.  However, when I attempt to put them all in
the same rule base (all belong to the same package), I get an import
collision exception on the AlternativeKey inner class.  Depending on where
in the builder I add the resource depends on which AlternativeKey the
compiler bitches about (validity).  I'm not familiar with the source at all,
so I'm unsure as to where to look for this.  However, this sounds like a bug
to me?  There is an easy workaround for this as I I just don't use anonymous
types and define them in my schema explicitly.  Just thought I'd identify
this as a possible issue.

Thanks,
Eric


___
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





--
 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] Odd static inner class behavior

2007-07-26 Thread Edson Tirelli

   Eric,

   Not sure if I understood your problem, but if you have multiple classes
with the same name, and the only difference is that they are inner classes
of different classes, I guess what you need to do is to fully qualify your
class names in your rules...

rule xxx
when
   my.package.MyClass.MyInnerClass( ... )
...
end

  If this is not your problem, can you please show us an example so we
understand it better?

  Edson


2007/7/25, Eric Miles [EMAIL PROTECTED]:


 Due to how JAXB treats anonymous inner complex types, I ended up with a
public static inner classes named AlternativeKey in several of my data
classes  I have several rules written to deal with each data class
individually that all work ok.  However, when I attempt to put them all in
the same rule base (all belong to the same package), I get an import
collision exception on the AlternativeKey inner class.  Depending on where
in the builder I add the resource depends on which AlternativeKey the
compiler bitches about (validity).  I'm not familiar with the source at all,
so I'm unsure as to where to look for this.  However, this sounds like a bug
to me?  There is an easy workaround for this as I I just don't use anonymous
types and define them in my schema explicitly.  Just thought I'd identify
this as a possible issue.

Thanks,
Eric

___
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] problems using rule flow

2007-07-26 Thread Kris Verlaenen

So my question is, how can I say to the split node to consider the fact
outgoing from the ruleFlowGroup1 and not a fact in the working memory 
In one of the future releases, we will add support for ruleflow 'variables' 
that can temporarly store some value so that it can be used by other rules 
or inside constraints (like a split in your example).  For now you can 
simulate this by either using some dedicated Fact in your working memory or 
a global that can store this value.


Kris

- Original Message - 
From: hypnosat7 [EMAIL PROTECTED]

To: rules-users@lists.jboss.org
Sent: Monday, July 23, 2007 10:18 AM
Subject: [rules-users] problems using rule flow




When I use my rule flow with only one asserted fact it work very well, but
when I assert more than one fact it goes wrong. I used the Audit View to 
fix

the problem.

My rule flow : Start - ruleFlowGroup1 - split - ruleFlowGroup2 
 - join 
When I edit my split node I have this :
 To node ruleFlowGroup2 : constraint
 To node join : constraint

For the node join constraint I specified something like :
myFact(state==myFact.state1)

And when a fact with state==myFact.state1 is inserted the split node
constraint are true for the others facts even if their states are 
different

from myFact.state.

I'm also updating my fact in all the rules.

So my question is, how can I say to the split node to consider the fact
outgoing from the ruleFlowGroup1 and not a fact in the working memory 

Thanks

Any help pls ?
--
View this message in context: 
http://www.nabble.com/problems-using-rule-flow-tf4128169.html#a11739566

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] dependency issue after upgrading to 4.0.0 from MR3 with maven2?

2007-07-26 Thread Eric Miles
So is this not a dependency of 4.0.0 or do I have to include a
dependency manually?  Maven should take care of classpath issues for me,
that's why I found this issue to be odd.

On Thu, 2007-07-26 at 20:48 +0100, Mark Proctor wrote:

 As the stack trace says, you are missing the JDT Core binary:
 Caused by: java.lang.RuntimeException: The Eclipse JDT Core jar is not
 in the classpath
 
 Mark
 Eric Miles wrote: 
 
  I am attempting to ween our project off of MR3 and on to the 4.0.0
  GA and am having a lot of difficulty.  First off, I had compile
  issues with the PackageBuilderConfiguration class (attempting to set
  the compliance level to 1.5).  I figured that was no longer
  necessary so I removed that (I hope that's correct although I
  haven't seen this mentioned anywhere).  Now when I attempt to run a
  unit test, I get the following error:
  
  org.drools.RuntimeDroolsException: Unable to load dialect
  'org.drools.rule.builder.dialect.java.JavaDialectConfiguration:java'
  at
  org.drools.compiler.PackageBuilderConfiguration.buildDialectRegistry(PackageBuilderConfiguration.java:138)
  at
  org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:114)
  at
  org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:87)
  at
  com.kronos.webta.service.key.rules.AccountKeyLookupTest.setUpBeforeClass(AccountKeyLookupTest.java:49)
  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.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterRunner.java:74)
  at
  org.junit.internal.runners.BeforeAndAfterRunner.runBefores(BeforeAndAfterRunner.java:50)
  at
  org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:33)
  at
  org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
  at
  org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
  at
  org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
  at
  org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
  at
  org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
  at
  org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
  at
  org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
  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:98)
  at
  org.drools.rule.builder.dialect.java.JavaDialectConfiguration.init(JavaDialectConfiguration.java:56)
  at
  org.drools.compiler.PackageBuilderConfiguration.buildDialectRegistry(PackageBuilderConfiguration.java:134)
  ... 17 more
  
  
  I am using Maven2, so I would assume my dependencies would be taken
  care of?  I'm only using 2 dependencies in my project for Drools:
  
  dependency
  groupIdorg.drools/groupId
  artifactIddrools-compiler/artifactId
  version4.0.0/version
  scopecompile/scope
  /dependency
  dependency
  groupIdorg.drools/groupId
  artifactIddrools-core/artifactId
  version4.0.0/version
  scopecompile/scope
  /dependency
  
  From the following repo:
  
  repository
  idjboss/id
  nameJBoss maven repository/name
  urlhttp://repository.jboss.com/maven2/url
  /repository
  
  Am I missing something?  I completely blew away my org.drools
  directory in my local repository to allow maven2 to download the
  dependencies, I see it's downloading the drools-compiler and
  drools-core 4.0.0 versions (although they do not have associated
  poms or checksums which I find odd).  Thanks!
  
  Eric 
  
  
  
  
  ___
  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] Does when order matter?

2007-07-26 Thread Ronald R. DiFrango

All,

I was wondering [and maybe this has be answered before] ,but does the order
of the rules in the when clause matter?

For example I have the following:

   rtvHeader : RtvHeader( headerRtvNumber : rtvNumber )
   repaymentCode : RepaymentCode( actualCode : code, matchApprv != Y
)
   lineCharge : HeaderAdditionalCharge( rtvNumber == headerRtvNumber,
originalRepaymentCode == actualCode )

In my case there is a higher likelihood that I will have more RepaymentCodes
than RtvHeaders [1 of these guys] and likely less HeaderAdditionalCharge
objects.  So should the order be more like:

   rtvHeader : RtvHeader( headerRtvNumber : rtvNumber )
   lineCharge : HeaderAdditionalCharge( rtvNumber == headerRtvNumber,
originalRepaymentCode : originalRepaymentCode)
   repaymentCode : RepaymentCode( actualCode == originalRepaymentCode,
matchApprv != Y )

Or does it not really matter?

Thanks in advance,

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


[rules-users] dependency issue after upgrading to 4.0.0 from MR3 with maven2?

2007-07-26 Thread Eric Miles
I am attempting to ween our project off of MR3 and on to the 4.0.0 GA
and am having a lot of difficulty.  First off, I had compile issues with
the PackageBuilderConfiguration class (attempting to set the compliance
level to 1.5).  I figured that was no longer necessary so I removed that
(I hope that's correct although I haven't seen this mentioned anywhere).
Now when I attempt to run a unit test, I get the following error:

org.drools.RuntimeDroolsException: Unable to load dialect
'org.drools.rule.builder.dialect.java.JavaDialectConfiguration:java'
at
org.drools.compiler.PackageBuilderConfiguration.buildDialectRegistry(PackageBuilderConfiguration.java:138)
at
org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:114)
at
org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:87)
at
com.kronos.webta.service.key.rules.AccountKeyLookupTest.setUpBeforeClass(AccountKeyLookupTest.java:49)
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.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterRunner.java:74)
at
org.junit.internal.runners.BeforeAndAfterRunner.runBefores(BeforeAndAfterRunner.java:50)
at
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:33)
at
org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
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:98)
at
org.drools.rule.builder.dialect.java.JavaDialectConfiguration.init(JavaDialectConfiguration.java:56)
at
org.drools.compiler.PackageBuilderConfiguration.buildDialectRegistry(PackageBuilderConfiguration.java:134)
... 17 more


I am using Maven2, so I would assume my dependencies would be taken care
of?  I'm only using 2 dependencies in my project for Drools:

dependency
groupIdorg.drools/groupId
artifactIddrools-compiler/artifactId
version4.0.0/version
scopecompile/scope
/dependency
dependency
groupIdorg.drools/groupId
artifactIddrools-core/artifactId
version4.0.0/version
scopecompile/scope
/dependency

From the following repo:

repository
idjboss/id
nameJBoss maven repository/name
urlhttp://repository.jboss.com/maven2/url
/repository

Am I missing something?  I completely blew away my org.drools directory
in my local repository to allow maven2 to download the dependencies, I
see it's downloading the drools-compiler and drools-core 4.0.0 versions
(although they do not have associated poms or checksums which I find
odd).  Thanks!

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