[rules-users] question about encoding in rules

2008-03-12 Thread João Mota
Greetings,

I am having some issues with encoding in my rules. I am using a drl like
this:

package pt.xpto.mydroolstest
import pt.xpto.model.SimpleFact
import pt.xpto.model.SimpleResult
import java.util.ArrayList
import java.util.Collection

global Collection results


rule 'first-rule'

when
 SimpleFact(description=="someDescription", value < "500") and
 SimpleFact(description=="anotherDescription", value=="1");

then

SimpleResult result = new SimpleResult();
ArrayList aList= new ArrayList();
result.setDescription("Some String with portuguese chars like ç and à");
aList.add("Another String with portuguese chars like é and ã.");
result.setValue(aList);
results.add(result);
end


My problem is that when i retrieve the results from firing the rules, the
encoding of the strings with the portuguese chars is all messed up. From the
tests i did, this happens when the rules are compiled by drools.

If i make the following modification to the rules

 result.setDescription(new String("Some String with portuguese chars
like ç and à".getBytes(),"utf-8"));

 and load it like this, then the strings are retrieved ok.

RuleBase ruleBase = RuleBaseLoader.getInstance().loadFromReader(new
InputStreamReader(DroolsTest.class.getResourceAsStream( "Rules.drl" )));

Yet the same modification does not work if the rule is defined in the BRMS
and loaded by the rules agent.


I noticed that in the portuguese example shown in
http://labs.jboss.com/drools/ no portuguese special chars are used, is this
a limitation of the rules engine or am I just using wrong?

Can you point me in the right direction?

best regards,

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


Re: [rules-users] Accessing maps (hashmaps) keys and values in rules

2008-03-12 Thread Mehak

 Hi
I am using xml drl files for my rules. I pass the facts in HashMap.
 Map factAgendaMap = new HashMap();
 factAgendaMap.put("group", ruleConfig.getRuleName());
factAgendaMap.put("fact", fact);
session.execute(factAgendaMap);
In my drl file I m calling the rule as
  

  
  


 
  map.get("fact")
   
   
 

  
 
 
 
  
 



  

  
 System.out.println("Success rule1 activation");

 

This is giving me error that  tag placed misappropriately. I want to
use OR constraint on the facts passed in HashMap.
-- 
View this message in context: 
http://www.nabble.com/Accessing-maps-%28hashmaps%29-keys-and-values-in-rules-tp11692818p16001825.html
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] conversion of .pkg file to other formats

2008-03-12 Thread Knapp, Barry
Rick,

 

We had the same issue/concern and chose to pass the drl to our engine.
We bypass the default BRMS deployer and created a custom servlet to
return the drl.  Here is some logic that will generate the drl.

 

PACKAGE_UUID = uuid of your package

REPOSITORY_SERVICE = "org.drools.brms.client.rpc.RepositoryService";

 

 

ServiceImplementation imp = 

(ServiceImplementation)Component.getInstance( 

 
RulesManagementConstants.REPOSITORY_SERVICE );



String  responsePayload =  

imp.buildPackageSource(

 
RulesManagementConstants.PACKAGE_UUID);

 

 

As a warning though, you may run into upgrade issues since you are
entering the non-supported api.

 

Barry

 

 

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mark Proctor
Sent: Tuesday, March 11, 2008 6:29 PM
To: Rules Users List
Subject: Re: [rules-users] conversion of .pkg file to other formats

 

Rick Lacy wrote: 

Greetings.  

 

I'm using Drools for a project at work.  I'm investigating the
feasibility of using the BRMS in our environment.  I have a question
about the binary packages that are available for download from the BRMS.
Given one of these .pkg files, is there an easy API call that would get
me a text string representing the .drl file equivalent of the .pkg file?
I realize that I can use the 'Show package source' from the BRMS.
However, if we decide to go with .pkg files for deployment, it would be
really nice to be able to get a human-readable form of what was last
deployed to production for any given .pkg for auditing / troubleshooting
purposes.  I perused the docs, and I found something similar to what I
want, but it seems to be specific to decision tables.

Not really a Package is trimmed down for transport. For instance the
text representation of the consequence is gone, it's just bytecode now.
You could intheory make a reverse engineering utility, like you can
already do for bytecode, but we have nothing like this now.



 

Thanks,

 

 

Rick

 






 
___
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] Drools.NET

2008-03-12 Thread Mark Proctor

anishanc wrote:

Hello friends..

Is drools.net support plain drl file
  

Is a port of Drools 3.0 which does use plain drl files.
  example: when 
  ..

   then
  ..  
Actually i want to use the same plain drl file used in the drools for java 
to drools.net
  


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


[rules-users] EJB3.0 on RHS of the rule

2008-03-12 Thread dare

We are using Drools 4.0.3 with EJB3.0 on glassfish.  

When we invoke some method of EJB3.0  stateless session bean (annotated with
@Remote) from the RHS part of .drl file we get NullPointerException.  
Any help would be appreciated
-- 
View this message in context: 
http://www.nabble.com/EJB3.0-on-RHS-of-the-rule-tp16003702p16003702.html
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] Interesting null pointer exception when inserting afact.

2008-03-12 Thread Jason Partyka
It looks like the bug is still in there.

I am attempting to resolve it myself, but in order to do so I need to go into 
the MVEL code, but the mvel jar that is included as part of the drools 
classpath container (within eclipse) is just mvel14.jar. So I'm not sure where 
the source is or what version of MVEL source I should be attaching. I realize 
that the source-location thing is just an Eclipse issue, but I thought I'd let 
you know right away that it looks like it's still there.

Anywhere you can point me to that would help with making sure I'm looking the 
right code.

Thanks,
Jason

From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Mark Proctor [EMAIL 
PROTECTED]
Sent: Monday, March 10, 2008 8:17 AM
To: Rules Users List
Subject: Re: [rules-users] Interesting null pointer exception when inserting 
afact.

please check with 4.0.x, which will be in 4.0.5 this week, and let us know if 
this is fixed or not. But hurry we are releasing 4.0.5 very soon:
http://anonsvn.labs.jboss.com/labs/jbossrules/branches/4.0.x/

Mark
Jason Partyka wrote:
I can give this a shot, but the reason why you suggest this is not obvious to 
me.

Have you encountered this problem yourself?

-Jason




From: [EMAIL PROTECTED] [EMAIL 
PROTECTED]] On Behalf Of Anstis, Michael (M.) [EMAIL 
PROTECTED]]
Sent: Monday, March 10, 2008 5:06 AM
To: Rules Users List
Subject: RE: [rules-users] Interesting null pointer exception when inserting 
afact.

I'm no expert but recall there can be problems running "long running" 
(subjective) code from AWT's worker thread.

I thought it was good practice to run your "application code" in a worker 
thread. This was the first google hit I had on the matter.

http://www.cs.helsinki.fi/u/vihavain/k03/Java/JavathreadsandGUI.html

Cheers,

Mike


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On 
Behalf Of Edson Tirelli
Sent: 08 March 2008 13:15
To: Rules Users List
Subject: Re: [rules-users] Interesting null pointer exception when inserting 
afact.


   Jason,

   Can you please isolate and show us the rule that is creating the problem? It 
is happening either in a eval() statement or in a nested property access.

[]s
Edson

2008/3/7, Jason Partyka <[EMAIL PROTECTED]>:
Hi,

This is in relation to drools 4.0.4

I have an interesting problem. I am getting a null pointer exception when I am 
inserting a fact into a StatefulSession object. What is odd about this NPE is 
that, as far as I can tell (and I have inserted a breakpoint right before I 
insert the fact) that all the properties in the object are initialized, and 
there are no rules accessing any thing that could be null.

So here's my exception trace (just first few lines to get context):

Exception in thread "AWT-EventQueue-0" org.drools.RuntimeDroolsException: 
java.lang.NullPointerException
  at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:76)
  at org.drools.reteoo.EvalConditionNode.assertTuple(EvalConditionNode.java:145)
  at 
org.drools.reteoo.SingleTupleSinkAdapter.createAndPropagateAssertTuple(SingleTupleSinkAdapter.java:55)
  at 
org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:116)
  at 
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:22)
  at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:153)
  at org.drools.reteoo.Rete.assertObject(Rete.java:177)
  at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:192)
  at org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:71)
  at 
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:886)
  at 
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:858)
  at 
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:659)
  at com.hightower.drools.executablerules.Rules.setTemplate(Rules.java:112)

Caused by: java.lang.NullPointerException
  at 
org.drools.base.mvel.MVELEvalExpression.evaluate(MVELEvalExpression.java:39)
  at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:72)
  ... 39 more


(that setTemplate method is not a drools template)

Any ideas?

Thanks,
Jason

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



--
  Edson Tirelli
  JBoss Drools Core Development
  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


__

[rules-users] Serialize RuleBase ClassNotFoundException error.

2008-03-12 Thread Pedro Costa
Hi All,

I have a RuleBase I use it create a working memory,

I add some object to the working memory,

I execute the rules

I get some results

I serialize both the working memory and the rule base

I need the working memory

So, I try to desirialize the RuleBase

When trying to do so, I get the following error:

java.lang.ClassNotFoundException: No ClassLoaders found for:
com.oss.activation.rules.core.types.clientorder.ServiceOrderShadowProxy

com.oss.activation.rules.core.types.clientorder.ServiceOrder is one of the
objects i added to the working memory

I also tryed create the working memory with the keepReference option set to
false but got the same error


Any knows what could be wrong here?

Thanks!

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


Re: [rules-users] Interesting null pointer exception when inserting afact.

2008-03-12 Thread Mark Proctor

Jason Partyka wrote:

It looks like the bug is still in there.
 
I am attempting to resolve it myself, but in order to do so I need to 
go into the MVEL code, but the mvel jar that is included as part of 
the drools classpath container (within eclipse) is just mvel14.jar. So 
I'm not sure where the source is or what version of MVEL source I 
should be attaching. I realize that the source-location thing is just 
an Eclipse issue, but I thought I'd let you know right away that it 
looks like it's still there.
We strip jar version numbers to make deployment with Eclipse easier. If 
you look at parent pom.xml it will tell you the version of MVEL used.
 
Anywhere you can point me to that would help with making sure I'm 
looking the right code.
 
Thanks,

Jason

*From:* [EMAIL PROTECTED] 
[EMAIL PROTECTED] On Behalf Of Mark Proctor 
[EMAIL PROTECTED]

*Sent:* Monday, March 10, 2008 8:17 AM
*To:* Rules Users List
*Subject:* Re: [rules-users] Interesting null pointer exception when 
inserting afact.


please check with 4.0.x, which will be in 4.0.5 this week, and let us 
know if this is fixed or not. But hurry we are releasing 4.0.5 very soon:

http://anonsvn.labs.jboss.com/labs/jbossrules/branches/4.0.x/

Mark
Jason Partyka wrote:
I can give this a shot, but the reason why you suggest this is not 
obvious to me.
 
Have you encountered this problem yourself?
 
-Jason
 
 
 

*From:* [EMAIL PROTECTED] 
[EMAIL PROTECTED] On Behalf Of Anstis, Michael 
(M.) [EMAIL PROTECTED]

*Sent:* Monday, March 10, 2008 5:06 AM
*To:* Rules Users List
*Subject:* RE: [rules-users] Interesting null pointer exception when 
inserting afact.


I'm no expert but recall there can be problems running "long 
running" (subjective) code from AWT's worker thread.
 
I thought it was good practice to run your "application code" in a 
worker thread. This was the first google hit I had on the matter. 
 
http://www.cs.helsinki.fi/u/vihavain/k03/Java/JavathreadsandGUI.html
 
Cheers,
 
Mike



*From:* [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] *On Behalf Of *Edson
Tirelli
*Sent:* 08 March 2008 13:15
*To:* Rules Users List
*Subject:* Re: [rules-users] Interesting null pointer exception
when inserting afact.


   Jason,

   Can you please isolate and show us the rule that is creating
the problem? It is happening either in a eval() statement or in a
nested property access.

[]s
Edson

2008/3/7, Jason Partyka <[EMAIL PROTECTED]
>:

Hi,

This is in relation to drools 4.0.4

I have an interesting problem. I am getting a null pointer
exception when I am inserting a fact into a StatefulSession
object. What is odd about this NPE is that, as far as I can
tell (and I have inserted a breakpoint right before I insert
the fact) that all the properties in the object are
initialized, and there are no rules accessing any thing that
could be null.

So here's my exception trace (just first few lines to get
context):

Exception in thread "AWT-EventQueue-0"
org.drools.RuntimeDroolsException: java.lang.NullPointerException
  at
org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:76)
  at

org.drools.reteoo.EvalConditionNode.assertTuple(EvalConditionNode.java:145)
  at

org.drools.reteoo.SingleTupleSinkAdapter.createAndPropagateAssertTuple(SingleTupleSinkAdapter.java:55)
  at

org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:116)
  at

org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:22)
  at
org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:153)
  at org.drools.reteoo.Rete.assertObject(Rete.java:177)
  at
org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:192)
  at

org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:71)
  at

org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:886)
  at

org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:858)
  at

org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:659)
  at
com.hightower.drools.executablerules.Rules.setTemplate(Rules.java:112)

Caused by: java.lang.NullPointerException
  at

org.drools.base.mvel.MVELEvalExpression.evaluate(MVELEvalExpression.java:39)
  at
org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:72)
  ... 39 more


(that setTemplate m

[rules-users] Re: Serialize RuleBase ClassNotFoundException error.

2008-03-12 Thread Pedro Costa
Sorry! This problem seems to be corrected if using the lastest from
4.0.xtrunk ... :P

2008/3/12, Pedro Costa <[EMAIL PROTECTED]>:
>
> Hi All,
>
> I have a RuleBase I use it create a working memory,
>
> I add some object to the working memory,
>
> I execute the rules
>
> I get some results
>
> I serialize both the working memory and the rule base
>
> I need the working memory
>
> So, I try to desirialize the RuleBase
>
> When trying to do so, I get the following error:
>
> java.lang.ClassNotFoundException: No ClassLoaders found for:
> com.oss.activation.rules.core.types.clientorder.ServiceOrderShadowProxy
>
> com.oss.activation.rules.core.types.clientorder.ServiceOrder is one of the
> objects i added to the working memory
>
> I also tryed create the working memory with the keepReference option set
> to false but got the same error
>
>
> Any knows what could be wrong here?
>
> Thanks!
>
> Pedro.
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


RE: [rules-users] Interesting null pointer exception when inserting afact.

2008-03-12 Thread Jason Partyka
Well, I've downloaded the source, and it appears that it is occuring in the 
org.mvel.MVELRuntime class, method execute(). My equals token ("==") is being 
properly recognized, and converted to its integer representation (10). However, 
in a block with switch (operator), the org.mvel.Operator.EQUAL token does not 
appear, so the execute() method returns a null value because nothing is ever 
evaluated.

I've even verified that null is being returned from the execute method.

I stepped back out to the line (in org.mvel.CompiledExpression,java)
return handleParserEgress(execute(false, this, staticContext, factory), 
returnBigDecimal);

and then stepped into handleParserEgress and the first parameter, which is the 
return value from execute() is null!

Any ideas?

Thanks,
Jason


---


From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Mark Proctor [EMAIL 
PROTECTED]
Sent: Wednesday, March 12, 2008 2:28 PM
To: Rules Users List
Subject: Re: [rules-users] Interesting null pointer exception when inserting 
afact.


Jason Partyka wrote:
It looks like the bug is still in there.

I am attempting to resolve it myself, but in order to do so I need to go into 
the MVEL code, but the mvel jar that is included as part of the drools 
classpath container (within eclipse) is just mvel14.jar. So I'm not sure where 
the source is or what version of MVEL source I should be attaching. I realize 
that the source-location thing is just an Eclipse issue, but I thought I'd let 
you know right away that it looks like it's still there.
We strip jar version numbers to make deployment with Eclipse easier. If you 
look at parent pom.xml it will tell you the version of MVEL used.


Anywhere you can point me to that would help with making sure I'm looking the 
right code.

Thanks,
Jason


From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Mark Proctor [EMAIL 
PROTECTED]
Sent: Monday, March 10, 2008 8:17 AM
To: Rules Users List
Subject: Re: [rules-users] Interesting null pointer exception when inserting 
afact.


please check with 4.0.x, which will be in 4.0.5 this week, and let us know if 
this is fixed or not. But hurry we are releasing 4.0.5 very soon:
http://anonsvn.labs.jboss.com/labs/jbossrules/branches/4.0.x/

Mark
Jason Partyka wrote:
I can give this a shot, but the reason why you suggest this is not obvious to 
me.

Have you encountered this problem yourself?

-Jason





From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Anstis, Michael (M.) 
[EMAIL PROTECTED]
Sent: Monday, March 10, 2008 5:06 AM
To: Rules Users List
Subject: RE: [rules-users] Interesting null pointer exception when inserting 
afact.


I'm no expert but recall there can be problems running "long running" 
(subjective) code from AWT's worker thread.

I thought it was good practice to run your "application code" in a worker 
thread. This was the first google hit I had on the matter.

http://www.cs.helsinki.fi/u/vihavain/k03/Java/JavathreadsandGUI.html

Cheers,

Mike




From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Edson Tirelli
Sent: 08 March 2008 13:15
To: Rules Users List
Subject: Re: [rules-users] Interesting null pointer exception when inserting 
afact.



   Jason,

   Can you please isolate and show us the rule that is creating the problem? It 
is happening either in a eval() statement or in a nested property access.

[]s
Edson


2008/3/7, Jason Partyka <[EMAIL PROTECTED]>:
Hi,

This is in relation to drools 4.0.4

I have an interesting problem. I am getting a null pointer exception when I am 
inserting a fact into a StatefulSession object. What is odd about this NPE is 
that, as far as I can tell (and I have inserted a breakpoint right before I 
insert the fact) that all the properties in the object are initialized, and 
there are no rules accessing any thing that could be null.

So here's my exception trace (just first few lines to get context):

Exception in thread "AWT-EventQueue-0" org.drools.RuntimeDroolsException: 
java.lang.NullPointerException
  at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:76)
  at org.drools.reteoo.EvalConditionNode.assertTuple(EvalConditionNode.java:145)
  at 
org.drools.reteoo.SingleTupleSinkAdapter.createAndPropagateAssertTuple(SingleTupleSinkAdapter.java:55)
  at 
org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:116)
  at 
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:22)
  at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:153)
  at org.drools.reteoo.Rete.assertObject(Rete.java:177)
  at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:192)
  at org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:71)
  at 
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:886)
  at 
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:858)
  at 
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMem

Re: [rules-users] conversion of .pkg file to other formats

2008-03-12 Thread Rick Lacy
Barry,

Thanks a million!  I'm still not sure which way we're going for deployment,
but this looks interesting.  It's always great to have options.


Rick

On Wed, Mar 12, 2008 at 7:03 AM, Knapp, Barry <[EMAIL PROTECTED]>
wrote:

>  Rick,
>
>
>
> We had the same issue/concern and chose to pass the drl to our engine.  We
> bypass the default BRMS deployer and created a custom servlet to return the
> drl.  Here is some logic that will generate the drl.
>
>
>
> PACKAGE_UUID = uuid of your package
>
> REPOSITORY_SERVICE = "org.drools.brms.client.rpc.RepositoryService";
>
>
>
>
>
> ServiceImplementation imp =
>
> (ServiceImplementation)Component.*getInstance*(
>
> RulesManagementConstants.*
> REPOSITORY_SERVICE* );
>
>
>
> String  responsePayload =
>
> imp.buildPackageSource(
>
> RulesManagementConstants.*PACKAGE_UUID
> *);
>
>
>
>
>
> As a warning though, you may run into upgrade issues since you are
> entering the non-supported api.
>
>
>
> Barry
>
>
>
>
>
>
>
> *From:* [EMAIL PROTECTED] [mailto:
> [EMAIL PROTECTED] *On Behalf Of *Mark Proctor
> *Sent:* Tuesday, March 11, 2008 6:29 PM
> *To:* Rules Users List
> *Subject:* Re: [rules-users] conversion of .pkg file to other formats
>
>
>
> Rick Lacy wrote:
>
> Greetings.
>
>
>
> I'm using Drools for a project at work.  I'm investigating the feasibility
> of using the BRMS in our environment.  I have a question about the binary
> packages that are available for download from the BRMS.  Given one of these
> .pkg files, is there an easy API call that would get me a text string
> representing the .drl file equivalent of the .pkg file?  I realize that I
> can use the 'Show package source' from the BRMS.  However, if we decide to
> go with .pkg files for deployment, it would be really nice to be able to get
> a human-readable form of what was last deployed to production for any given
> .pkg for auditing / troubleshooting purposes.  I perused the docs, and I
> found something similar to what I want, but it seems to be specific to
> decision tables.
>
> Not really a Package is trimmed down for transport. For instance the text
> representation of the consequence is gone, it's just bytecode now. You could
> intheory make a reverse engineering utility, like you can already do for
> bytecode, but we have nothing like this now.
>
>
>
> Thanks,
>
>
>
>
>
> Rick
>
>
>
> --
>
>
>
> ___
>
> 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] Do you have a Bug?

2008-03-12 Thread Mark Proctor
We've fixed a huge number of things for 4.0.5. We are going to try and 
get the release out this friday. So please hurry if you have a bug then 
let us know, especially if you have a fix :) And don't forget to try 
your bug out on 4.0.x in svn in case its already fixed:


http://anonsvn.labs.jboss.com/labs/jbossrules/branches/4.0.x/

Mark

Mark Proctor wrote:

Narendra Valada wrote:
I had reported an issue a couple of weeks ago with nested inner 
classes not being handled correctly.
 
I made some changes to the org.drools.base.ClassTypeResolver class to 
resolve it and everything appears to work fine.
 
How do I provide the fix and test case to you? Do you want me to 
raise a JIRA?
Yes you will need to raise a JIRA. At this stage we have no plans to 
fix this, as we can consider inner inner classes esoteric enough to 
say it's unsupported. Although if someone can provide a clean patch, 
it would be nice to fix. You'll have to be quick though, if you want 
the fix in 4.0.5
 
Thanks,
 
Narendra


 
On 3/8/08, *Mark Proctor* <[EMAIL PROTECTED] 
> wrote:


We are about to release 4.0.5, next week. This has a large number
of bug
fixes, especially multi-threading bugs. Anyone that has production
issues can you please do a checkout for the 4.0.x branch asap and
provide us with a test case if it is not fixed. If you don't get your
test case to us by end of monday, start of tuesday, you'll have
to wait
another 2 months+ for 4.0.6.
http://anonsvn.labs.jboss.com/labs/jbossrules/branches/4.0.x/

Mark
___
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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools low concurrency/high synchronization? !NOSIG!

2008-03-12 Thread Leon S

We ran into this problem after upgrading from 3.0.* to 4.0.4.

Is there a JIRA issue filed for this? I see a few MVEL-related issues scoped
for 4.0.5 and 5.0 releases, but  nothing that looks like specifically
covering this problem.

Thanks,

Leon  
 

Mark Proctor wrote:
> 
> This looks different to what was fixed in 4.0.4. I'm cc'ing brockm to 
> get his feedback as it looks like an MVEL bug on accessors.
> 
> Mark
> Fernando Meyer wrote:
>> Hi Ingomar,
>>
>> Which drools version are you using? We made improvements on 4.0.4, 
>> that fixes concurrency issues on mvel core, so if you aren't using it 
>> please do an update and try test against your environment.
>>
>> Please let me know if your problems go away when you upgrade.
>>
>> Thanks 
>>
>> On Jan 22, 2008 11:13 AM, Ingomar Otter <[EMAIL PROTECTED] 
>> > wrote:
>>
>> Folks,
>> I am currently trying to scale our implementation by farming out
>> request into mutliple threads. I am on a 4 CPU Mac.
>> A few things I am wondering about:
>> 1. Although I see an increase in CPU load when going from single
>> to multi-threaded processing the throughput increased marginally.
>> I am pretty sure that my measurements are correct. I have checked
>> the GC and this is not the source of congestion. My question here
>> is whether Drools is using lot's of synchronization that may
>> explain this. 
>> 2. When I share the RuleBase accross threads (which I think is
>> valid?) I get interesting errors during execution. eg:
>>
>> org.drools.RuntimeDroolsException : Exception executing predicate
>> [EMAIL PROTECTED]
>> atorg.drools.rule.PredicateConstraint.isAllowedCachedRight(
>> PredicateConstraint.java:246)
>> at
>>
>> org.drools.common.TripleBetaConstraints.isAllowedCachedRight(TripleBetaConstraints.java:200)
>>
>> atorg.drools.reteoo.JoinNode.assertObject(JoinNode.java:150)
>>
>>
>> atorg.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:318)
>>
>> atorg.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:153)
>> at org.drools.reteoo.Rete.assertObject(Rete.java:175)
>> atorg.drools.reteoo.ReteooRuleBase.assertObject
>> (ReteooRuleBase.java:192)
>> at
>>
>> org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:71)
>>
>> at
>>
>> org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:909)
>>
>>
>> atorg.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:881)
>>
>>
>> atorg.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:682)
>>
>> at.DroolsPD.validate(DroolsPD.java:66)
>> at .DroolsMTRunner.run(DroolsMTRunner.java:30)
>> at java.lang.Thread.run(Thread.java:552)
>> Caused by: org.mvel.CompileException: cannot invoke getter:
>> getSAClass [declr.class: xxx.AbstractSA; act.class: null]
>> atorg.mvel.optimizers.impl.refl.GetterAccessor.getValue(
>> GetterAccessor.java:52)
>> at
>>
>> org.mvel.optimizers.impl.refl.VariableAccessor.getValue(VariableAccessor.java:39)
>>
>> at
>>
>> org.mvel.ast.VariableDeepPropertyNode.getReducedValueAccelerated(VariableDeepPropertyNode.java:22)
>>
>> atorg.mvel.ast.PropertyASTNode.getReducedValueAccelerated(PropertyASTNode.java:21)
>> at
>>
>> org.mvel.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:21)
>>
>> at org.mvel.MVELRuntime.execute(MVELRuntime.java:88)
>> at org.mvel.CompiledExpression.getValue(CompiledExpression.java:111)
>>
>> atorg.mvel.MVEL.executeExpression(MVEL.java:235)
>> at
>>
>> org.drools.base.mvel.MVELPredicateExpression.evaluate(MVELPredicateExpression.java:36)
>>
>>
>> atorg.drools.rule.PredicateConstraint.isAllowedCachedRight(PredicateConstraint.java:240)
>> ... 13 more
>> Caused by: java.lang.NullPointerException
>> atsun.reflect.GeneratedMethodAccessor6.invoke (Unknown Source)
>> atsun.reflect.DelegatingMethodAccessorImpl.invoke(
>> DelegatingMethodAccessorImpl.java:25)
>> atjava.lang.reflect.Method.invoke( Method.java:324)
>> at
>>
>> org.mvel.optimizers.impl.refl.GetterAccessor.getValue(GetterAccessor.java:42)
>>
>> ... 22 more
>>
>> Details:
>>  * I use StatelessSessions which are private to the threads
>>  * No data is shared between threads (with the exception of the
>> RuleBase, as outline above)
>>  * I am on JDK 1.5
>>
>> I would be grateful for any pointers for 'correct' use of Drools
>> in an MT environment.
>> Cheers,
>>   Ingomar
>>
>>
>> Ingomar Otter
>> Chief Technology Officer
>> [EMAIL PROTECTED] 
>> Mobile: +49 172 2367867
>>
>> Valtech GmbH
>> Bahnstraße 16
>> 40212 Düsseldorf
>> Germany
>>
>> Phone: +49 (0)211 179237-0
>> Fax: +49 211 179237-19
>>
>> www.valtech.de