[rules-users] problems using rule flow

2007-07-23 Thread hypnosat7

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] Re: BRMS Server - memory Issue while execution - Critical

2007-07-23 Thread Arjun Dhar
Michael Neale michael.neale at gmail.com writes:

 
 
 Hi Arjun - I wouldn't recommend re-using session unless there is some 
expensive state you wish to reuse. Pooling them will use up far more resources 
then freeing them. You should only pool expensive to obtain resources.


Hi Michael,
 thanks a lot for your help.

I wish to share something that might be news:
Well I tried two models:
1. Create a new stateless session, everytime you recieve a request
2. Share the same session among multiple threads.
(Million Loops, Zero ramp up time - JMeter settings)

.. As I increased the number of threads the performance output for 1 dipped 
around. But for 2 there was a minor exponential increase in performance.

Ofcourse, this depends on the rules and the way the business obejcts are also 
written. But this was m personal experience.

Functionally there was no difference and also no memory leaks in the latest 
build.

I'm pretty happy.
Thanks,
Arjun

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


Re: [rules-users] JBossRules and JAVA Servlet / JSP (part2)

2007-07-23 Thread spilirit

Hi Burr,

That would be very kind from you, if you could send me the WAR,

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


Re: [rules-users] JBossRules and JAVA Servlet / JSP (part2)

2007-07-23 Thread Fernando Meyer

Hi spilirit,

	Try copy all your dependencies to the WebContent/WEB-INF/lib instead  
referring in your project. The Eclipse IDE will automatically add  
these libs to your classpath and to your exported war.


Regards

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



On Jul 23, 2007, at 5:33 AM, spilirit wrote:


Hi,
please find attached a copy of my Eclipse project,

Thank you for your  
HelpTest.zip___

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] ConcurrentModificationException in Drools...

2007-07-23 Thread McShiv

Hi,

 I am getting the following error when I try to run the rules in
bulk(EG: 5 or 6 rules together). But when I start running the rules
individually, all the rules are working fine.

0060 SystemErr R org.drools.spi.ConsequenceException:
java.util.ConcurrentModificationException

Anyone have any idea about it?


Thanks,
McShiv...
-- 
View this message in context: 
http://www.nabble.com/ConcurrentModificationException-in-Drools...-tf4128586.html#a11740571
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] Decision Table does not support Agenda Groups

2007-07-23 Thread Arjun Dhar
Hi,
 I reported this earlier also, I cant understand why do we not provide AGENDA-
Group support for Decision tables, while we do provide Activation?

See DefaultRuleSheetListener.

I need to do two things:
1. Support sequencing of rule groups
2. allow two modes: a. Execute all rules, b. Break on first rule

1 -- Solution: Agenda groups :o( -- NOT SUPPORTED in decision table
2 -- Solution: Activation Group: :o)

.. is there any reason for not supporting Agenda Groups in D.Tables 

regards,
Arjun

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


[rules-users] Few rules, many facts

2007-07-23 Thread Yuri de Wit

I am working on a drools application with few rules and large number
of facts. In my first design I tried to avoid excessive joins thinking
I was helping improve performance but didnt realized that I was
actually shooting myself in the foot. I was basically creating a
single facade-fact that would contain two or three diff concerns
joined under the same interface. The problem I am seeing is that for
simple things like changing the status of one of many facts would
cause that fact to be reevaluated against all the other facts.

I then realized that thinking relationally about the problem would not
only simplify my solution but also probably make a lot faster.
However, in this new and relational solution I will need to make use
of many not CE.

My question is: is there any cost in using nots that I should be
awae of? Any other words of wisdom re: improving the performance in
small rules x many facts?

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


Re: [rules-users] The effect of not using shadow facts

2007-07-23 Thread Ronald R. DiFrango

Anthony,

If you have a choice on your binding framework, I might suggesting
switching to Castor.  I had the same problem you experienced and
switched to Castor and it worked like a champ.

Ron


On 7/23/07, trandinh tho [EMAIL PROTECTED] wrote:

Hello,
I got same problem to Chris's. Java classes are generated from XML schema
(using XMLBean). And the problem occurs when I try to assert objects of
those classes into working memory. The exception is:

java.lang.VerifyError: class
b2BContext.impl.UserImplShadowProxy overrides final method
hashCode.()I
at java.lang.ClassLoader.defineClass1(Native
Method)
at
java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at
java.lang.ClassLoader.defineClass(ClassLoader.java:465)
at
org.drools.rule.MapBackedClassLoader.fastFindClass(MapBackedClassLoader.java:40)
at
org.drools.rule.MapBackedClassLoader.loadClass(MapBackedClassLoader.java:59)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
org.drools.reteoo.Rete$ObjectTypeConf.init(Rete.java:352)
at
org.drools.reteoo.Rete.assertObject(Rete.java:152)
at
org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:190)
at
org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:70)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:772)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:584)
at
org.drools.jsr94.rules.StatefulRuleSessionImpl.addObject(StatefulRuleSessionImpl.java:162)
at
org.drools.jsr94.rules.StatefulRuleSessionImpl.addObjects(StatefulRuleSessionImpl.java:185)

I am new to JBoss Rule, so may you show me how to disable Shadow. Please
help.

Thanks,
Anthony.


Edson Tirelli [EMAIL PROTECTED] wrote:

   Chris,

   I know why it happens, but I don't know what to do. Basically, we need to
do a shallow clone of any collections asserted to the working memory to
ensure integrity. So, what I try to do is:

 * Check if the collection is cloneable. If it is, use clone method.
* Else, check if the collection has a default no-arg constructor. If so,
create a new instance and use addAll() method to add all previous elements.
 * Otherwise, use objenesis to instantiate object without calling the
constructor.

   What is happening in your case, as you don't have a default constructor
and apparently is not cloneable, it is falling to the 3rd alternative above,
and as you are extending a java.util.Collection class, it is raising the NPE
because it is not executing the class constructor.

   Not sure about how to handle such scenario since we don't get such
exception until it is too late to rollback.

   []s
   Edson

2007/7/20, Chris West [EMAIL PROTECTED]:
 Edson,

 It appears that revision #13637 of drools breaks the ability for me to use
one of my existing classes.  The attached eclipse project illustrates the
problem.  This test works on 4.0.0MR3, but not revision #13637.  The
exception is:

 org.drools.spi.ConsequenceException:
org.drools.RuntimeDroolsException: Error creating shadow
fact for object: NamedList(Hello List): [1, 2, 3]
 at
org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java
:549)
 at
org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:509)
 at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:430)
 at
org.drools.common.AbstractWorkingMemory.fireAllRules
(AbstractWorkingMemory.java:392)
 at com.sample.DroolsTest.main(DroolsTest.java:29)
 Caused by: org.drools.RuntimeDroolsException: Error
creating shadow fact for object: NamedList(Hello List): [1, 2, 3]
 at
org.drools.reteoo.Rete$ObjectTypeConf.getShadow(Rete.java:458)
 at org.drools.reteoo.Rete.assertObject(Rete.java:157)
 at
org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:190)
 at org.drools.reteoo.ReteooWorkingMemory.doInsert
(ReteooWorkingMemory.java:70)
 at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:848)
 at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:822)
 at org.drools.base.DefaultKnowledgeHelper.insert
(DefaultKnowledgeHelper.java:60)
 at
org.drools.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:54)
 at
com.sample.Rule_Insert_named_list_0.consequence(Rule_Insert_named_list_0.java:7)
 at
com.sample.Rule_Insert_named_list_0ConsequenceInvoker.evaluate(Rule_Insert_named_list_0ConsequenceInvoker.java:19)
 at
org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:545)
 ... 4 more
 Caused by: java.lang.NullPointerException
 at
java.util.ArrayList.ensureCapacity(ArrayList.java:163)
 at java.util.ArrayList.addAll(ArrayList.java:475)
 at
com.sample.NamedListShadowProxy.updateProxy(Unknown Source)
 at
com.sample.NamedListShadowProxy.setShadowedObject(Unknown
Source)
 at

[rules-users] Re: ConcurrentModificationException in Drools...

2007-07-23 Thread Arjun Dhar

 Just info, I ran a test on about a million requests (loop) and 50 threads. 
 approx 6 business Obectts and 15 rules. I did get any concurrent modfication 
 issues on JBoss Rules 4. Can you please post the rule scripts/DRL used
 
 regards,
 Arjun
 

Sorry Typo. I was saying is I did not get any concurrent exception. I'm using 
a stateless session in JBoss rules 4. 

I tried this on SynchronizedWorkingMemory in 3 also and did not get any problem.

regads,
Arjun




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