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

2008-01-22 Thread Ingomar Otter

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]
at
org
.drools
.rule
.PredicateConstraint.isAllowedCachedRight(PredicateConstraint.java:246)
at
org
.drools
.common
.TripleBetaConstraints.isAllowedCachedRight(TripleBetaConstraints.java:
200)
at org.drools.reteoo.JoinNode.assertObject(JoinNode.java:150)
at
org
.drools
.reteoo
.CompositeObjectSinkAdapter
.propagateAssertObject(CompositeObjectSinkAdapter.java:318)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:
153)
at org.drools.reteoo.Rete.assertObject(Rete.java:175)
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:
909)
at
org
.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:
881)
at
org
.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]
at
org
.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)
at
org
.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)
at org.mvel.MVEL.executeExpression(MVEL.java:235)
at
org
.drools
.base
.mvel.MVELPredicateExpression.evaluate(MVELPredicateExpression.java:36)
at
org
.drools
.rule
.PredicateConstraint.isAllowedCachedRight(PredicateConstraint.java:240)
... 13 more
Caused by: java.lang.NullPointerException
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at
sun
.reflect
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.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
mailto:[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

http://www.valtech.de

Geschäftsführer: Ingo Kriescher
Amtsgericht Düsseldorf HRB48672
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] 4.0.7 Maven Repo?

2008-05-08 Thread Ingomar Otter

As 4.0.7 seems to be GA, will repository.jboss.com/maven2 also be
updated?
--I

--
Ingomar Otter
Chief Technology Officer
mailto:[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

http://www.valtech.de

Geschäftsführer: Ingo Kriescher
Amtsgericht Düsseldorf HRB48672
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] maven repo

2008-05-09 Thread Ingomar Otter



 It was updated during the release. Check it out:

http://repository.jboss.com/maven2/org/drools/

  []s
  Edson

Strange, it does not work for me:
[INFO] Using default encoding to copy filtered resources.
Downloading: 
http://repository.jboss.com/maven2/org/drools/drools/4.0.7/drools-4.0.7.pom

28K downloaded
Downloading: 
http://repository.jboss.com/maven2/org/drools/drools/4.0.7/drools-4.0.7.jar
Downloading: 
http://repo.open.iona.com/maven2-all/org/drools/drools/4.0.7/drools-4.0.7.jar
Downloading: 
http://repo1.maven.org/maven2/org/drools/drools/4.0.7/drools-4.0.7.jar

[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] Failed to resolve artifact.

Missing:
--
1) org.drools:drools:jar:4.0.7

This is the dependency in my POM:
   dependency
groupIdorg.drools/groupId
artifactIddrools/artifactId
version4.0.7/version
  /dependency

--I

--
Ingomar Otter
Chief Technology Officer
mailto:[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

http://www.valtech.de

Geschäftsführer: Ingo Kriescher
Amtsgericht Düsseldorf HRB48672
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Compilation error: Syntax error, insert ; to complete BlockStatements

2008-07-09 Thread Ingomar Otter

Kris,
that may be silly but have you tried to add the ; after  
'addCharge($event, $amount)'?


If you use the Java dialect for the RHS this IS mostly Java (it's just  
copied over into the generated code).
If in doubt, use -Ddrools.dump.dir=whatever to check out the  
generated code.


--I

Am 09.07.2008 um 21:59 schrieb Kris Nuttycombe:


Hi, all,

I'm new to Drools, and am a bit confused by the compilation error that
I'm getting. From the line number, it appears to be in a generated
Java file instead of in my rules file, so I'm having a hard time
debugging the issue. Here is the full error:

Rule Compilation error : [Rule name=Assert Total Accumulator for
Order, agendaGroup=init, salience=0, no-loop=false]
 com/gaiam/gcsi/rules/Rule_Assert_Total_Accumulator_for_Order_0.java
(7:429) : Syntax error, insert ; to complete BlockStatements


Here is the rule that's being referred to:

rule Add charge amounts to total.
   agenda-group calc_total
when
   $total : Total()
   $event : ProgramBillingEvent( $amount : amount)
then
   modify( $total ) {
   addCharge($event, $amount)
   }
end

I'm working from the example modify block discussed in the docs at
http://downloads.jboss.com/drools/docs/4.0.7.19894.GA/html/ch02s05.html#d0e961
- I haven't been able to find other documentation referring to this
construct.

What am I doing wrong?

Thanks,

Kris
___
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] Is or allowed in a rule? Can I link the rules?

2008-07-24 Thread Ingomar Otter
1. Seems to me that the conditions in a rule are always connected  
with AND relation:

True.
AND is the default.

Is or allowed? I mean , can I express:  if (C1 or C2 or C3) and  
C4, then D1 in 1 rule?
You can have an explicit OR,  see section 6.5.2.3 of the 4.0.7  
documentation.


Can I form a link of rules? Can rule A's decision (the Then part)  
be rule B's condition (The When part)?


for instance:
rule A: if C1, C2, C3 then D1
rule B: if D1, C4 then D2
usually the consequence (RHS) of would modify facts which you can test  
in rule B.

A common way is to assert a fact.

When the complexity increases, the number of rules explodes.
What's your definition of explodes? This suggest that you should  
have another go at your rule/fact model.


Cheers,
  --Ingomar


Am 24.07.2008 um 17:25 schrieb Yu Wang:

I'm a beginner user of Jboss, please bear with my maybe dumb  
questions:


1. Seems to me that the conditions in a rule are always connected  
with AND relation:


such as the following rule

if C1
  C2
  C3
then D1

it means if C1 and C2 and C3, then D1

Is or allowed? I mean , can I express:  if (C1 or C2 or C3) and  
C4, then D1 in 1 rule?


Right now, I can only use 3 rules to express it:

if C1
  C4
then D1

if C2
  C4
then D1

if C3
  C4
then D1


2. Can I form a link of rules? Can rule A's decision (the Then part)  
be rule B's condition (The When part)?


for instance:
rule A: if C1, C2, C3 then D1
rule B: if D1, C4 then D2


When the complexity increases, the number of rules explodes.
I browsed the document and didn't find a clue. I'm using the 4.0.7.
Your help is highly appreciated.


___
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] Handle activationCancelled Event

2008-07-25 Thread Ingomar Otter

Why don't you use facts for control?
when mylamp==on
then
assert/update sth?

That looks easier to me.

--I
Am 25.07.2008 um 13:04 schrieb Claudio Rainoldi:


Hi everyone,
i'm developing a java application using drools 4 for domotic control;
i ve implemented a listener on my working memory with the method
afterActivationFired(...)
and activationCancelled(...) .
At startup of my app i've write the following lines:

listener = *new* FiredRulesListener();
workingMemory.addEventListener(listener);

Each time a rule is fired the method afterActivationFired(...) is  
called and

it is ok; but when the rule stop to be true the method
activationCancelled  isn't
never called.
I try to be more clear:

i 've the following rule:
when mylamp==on
then
System.out.println(light 1 on);


When i turn on the light 1 the method afterActivationFired(...)  is  
called,
but when i turn off the light the method activationCancelled isn't  
called.

Can someboy help me??
Thanks in advance.


Cla


My listener code:

*

public* *static* *class* FiredRulesListener  
*extends*DefaultAgendaEventListener


{

ListRule firedRules = *new* ArrayListRule();

*

public* ListRule getFiredRules()

{
*

return* *this*.firedRules;

}

@Override
*

public* *void* afterActivationFired(AfterActivationFiredEvent event,
WorkingMemory workingMemory)

{

Rule rule = event.getActivation().getRule();
*

if* (!*this*.firedRules.contains(rule))

*this*.firedRules.add(rule);

}

@Override
*

public* *void* activationCancelled (ActivationCancelledEvent event,
WorkingMemory workingMemory)

{

*System.out.println(i never see this message);*

Rule *rule*= event.getActivation().getRule();

*this*.firedRules.remove(rule);

}
___
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] enums

2008-07-28 Thread Ingomar Otter

I don't understand the structure, could you post more source please?
--I

Am 28.07.2008 um 13:43 schrieb thomas kukofka:

=Field/method 'InputObject' not found for class  
'com.rules.InputObject'Rule


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


Re: [rules-users] query or global

2008-07-28 Thread Ingomar Otter
what are disadvantages and advantages of the following  
possibillities to to

get access to working memory facts from outside:
Is there a reason why you want to use something other than queries?
 I would suggest to use queries _unless_ you have a definitive   
requirement that requires something else. Queries are easy and you get  
constraints for free.
Everything else is just work. ;-) If you need to use logicals, you  
also have to implement an event listener in your facts to track them   
properly.



Cheers
--I

Am 28.07.2008 um 15:15 schrieb thomas kukofka:


Hello again,

what are disadvantages and advantages of the following  
possibillities to to

get access to working memory facts from outside:


  - -uses a query:

in drl:

query queryname
   ...
end

in java code

queryResults results = workingMemory.getQueryResults( queryname );

  - -use globals that store facts:

global java.util.HashMap service
rule XY
   when
   f: FactX ()
   then
   ResultFact resultFact = new ResultFact();
   service.put(f.getName(), resultFact);
   insert(resultFact);
end


kind regards
tom
___
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] Measuring Drools Memory Usage

2008-07-29 Thread Ingomar Otter

We used two approaches to double check results.
At first we used an approach similiar to what you haved described.  
Please note that (depneding on platfom) freeMemory is not byte-  
exact). Wo you won't see little changes.
Also, if you were using stateless sessions the result you have seen  
may be correct.


Out other approach was to seriazie that parts we're instrested in (and  
assume that real memory usage is just an small factor to be applied to  
the result we go.
We then compared the two results and they agreed on the order of  
magnitude which was what were looking for.
However we were primarily looking at Rulebase sizes, not WM memory  
consumption - which for the application we are currently are working  
on is neglegctible.


Has anyone attempted to measure the incremental memory usage of using
Drools
Do you expect an incremental memory usage (aka memory leak) using  
Drools? I don't  ;-)
You may want to run your use-case let's say 100.000 times to easiert  
to measure results.


--I





Am 29.07.2008 um 03:11 schrieb Roger Tanuatmadja:


Hi,

Has anyone attempted to measure the incremental memory usage of using
Drools? Anyone cares to share their methodology?

I am currently following the following methodology:
1. Prevent garbage collection from happening by using large Xms Xmx  
(1024m
in my case), a NewRatio of 2 (I am sure other sizes will work as  
well) and

verbogegc enabled to confirm that no garbage collection is happening.
2. Use Runtime.freeMemory before and after fireAllRules and  
measuring the

difference.

The problem with my methods so far has been that after a positive  
memory
usage (indicating you are using memory), subsequent use case (the  
same one)

incurs zero memory usage which is very strange.

So I guess my question is 2 fold: anyone care to share their  
methodology,

and can anyone see what's wrong with mine?

Thanks,

Roger
___
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] Discover when a rule isn't more active

2008-07-29 Thread Ingomar Otter

Use logicals.

Am 29.07.2008 um 11:20 schrieb Claudio Rainoldi:


Hi everyone,
isn'it there a way to find when a rule isn't more active.
For example if i have this rule:


rule light 2 on
dialect java
when
Light (name==0/0/2, actualvalue==1);
then
System.out.println(luce 2 on);
end


when someone turn on the light 2 i discover that the rule is fired  
using an

Agenda Event Listener and the method afterActivationFired;
But when someone turn off the ligth isn't there a similar way to  
discover

that the rule light 2 on isn't more active.
My only solution is to use the dual rule:

rule light 2 on_dual
dialect java
when
not (Light (name==0/0/2, actualvalue==1));
then
System.out.println(luce 2 off);
end

Isn't there a more sample way to do this?
Thanks in advance.


Cla
___
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] Discover when a rule isn't more active

2008-07-29 Thread Ingomar Otter

There is a mechanism called truth maintenance ensuring for example

A - B
B - C

that C becomes false when it's premise (B) becomes false as well.
What it basically does it track the LHS side of the rule and undoes  
asserted facts when there are no more facts to support it (activate  
the rules in question).
Look at the documentation for logicals / truth mainteance. It's pretty  
cool.


For your case:

rule light2on
when
LIght(name==0/0/2, actualvalue==1)
then
  insertLogical( new LightIsOn(2))
end

the fact LightIsOn will only be true (in the working memory) as long  
as the LHS of the rule above is still true. For example if acutalvalue  
becomes 0, that fact would vanish automagically.
That implies that you use facts to make statements about your system  
(not using behind the scene callbacks) - but from my very little  
experience I would say this is a good practice anyway. Fiddeling with  
activations make me suspicious ;-) - But then it all depends on your  
particular problem at hand.


--I



rule light 2 on
dialect java
when
Light (name==0/0/2, actualvalue==1);
then
System.out.println(luce 2 on);
end



Am 29.07.2008 um 14:42 schrieb Claudio Rainoldi:

i'm sorry i'm a new drools user.. Can you try to be a little more  
clear?

thanks..


2008/7/29, Ingomar Otter [EMAIL PROTECTED]:


Use logicals.

Am 29.07.2008 um 11:20 schrieb Claudio Rainoldi:

Hi everyone,

isn'it there a way to find when a rule isn't more active.
For example if i have this rule:


rule light 2 on
dialect java
when
Light (name==0/0/2, actualvalue==1);
then
System.out.println(luce 2 on);
end


when someone turn on the light 2 i discover that the rule is fired  
using

an
Agenda Event Listener and the method afterActivationFired;
But when someone turn off the ligth isn't there a similar way to  
discover

that the rule light 2 on isn't more active.
My only solution is to use the dual rule:

rule light 2 on_dual
dialect java
when
not (Light (name==0/0/2, actualvalue==1));
then
System.out.println(luce 2 off);
end

Isn't there a more sample way to do this?
Thanks in advance.


Cla
___
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] Not Non-Existential Quantifier

2008-07-31 Thread Ingomar Otter

Hans,
If you change not NegativeResult()  to not (exits  
NegativeResult()) this should result in the expected behaviour.


Cheers,
  Ingomar

Am 31.07.2008 um 17:19 schrieb [EMAIL PROTECTED]:

How is not supposed to work with insertLogical? Assume I have two  
different rules whose conditions are mutually exclusive, like the  
following:

rule Rule One
when
not NegativeResult()
then
insertLogical(new ApplicantStatus(Approved));
end
rule Rule Two
when
NegativeResult()
then
insertLogical(new ApplicantStatus(Denied));
end
Assume that the above two rules are the only way an ApplicantStatus  
fact can be inserted into working memory. I would expect, after all  
rules are run, that it would be impossible for there to be one  
ApplicantStatus with Approved as its reason, and another with  
Denied as its reason, in the working memory.
I would expect that, before any NegativeResult is inserted, that  
rule one could run, and insert an ApplicantStatus fact with an  
Approved reason. Then, after a NegativeResult is inserted, that  
rule two could run, and insert an ApplicantStatus fact with a  
Denied reason. At this point I would expect that the original  
ApplicantStatus fact, with an Approved reason, would be retracted,  
since the conditions under which it was inserted are no longer true.
This is not what I am observing, however. I am finding  
ApplicantStatus facts with both reasons in working memory at the end  
of the rules run. Should not work as I expect with regard to  
inserting a fact via insertLogical()? Or is this a known limitation,  
or simply the way it is designed to work?

Thanks,
-Hans___
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] Not Non-Existential Quantifier

2008-07-31 Thread Ingomar Otter

Hans,
I checked the docs and as  Edson says it should work without the  
exists( ).

Strange that never worked for me.

Maybe we all learn something if you can carve out a test-case.
Strange.

--I

Am 31.07.2008 um 19:29 schrieb [EMAIL PROTECTED]:


Ingomar,

I tried this, and indeed that worked. I was surprised, as I thought  
not was meant more to mean that a fact inside its parentheses did  
not exist, rather than a logical negation, which is the way you used  
it in your example. However, if I do what you said, it does work  
exactly how I expected not alone to work.


Thanks!
-Hans

-- Original message --
From: Ingomar Otter [EMAIL PROTECTED]


Hans,
If you change not NegativeResult() to not (exits
NegativeResult()) this should result in the expected behaviour.

Cheers,
Ingomar

Am 31.07.2008 um 17:19 schrieb [EMAIL PROTECTED]:


How is not supposed to work with insertLogical? Assume I have two
different rules whose conditions are mutually exclusive, like the
following:
rule Rule One
when
not NegativeResult()
then
insertLogical(new ApplicantStatus(Approved));
end
rule Rule Two
when
NegativeResult()
then
insertLogical(new ApplicantStatus(Denied));
end
Assume that the above two rules are the only way an ApplicantStatus
fact can be inserted into working memory. I would expect, after all
rules are run, that it would be impossible for there to be one
ApplicantStatus with Approved as its reason, and another with
Denied as its reason, in the working memory.
I would expect that, before any NegativeResult is inserted, that
rule one could run, and insert an ApplicantStatus fact with an
Approved reason. Then, after a NegativeResult is inserted, that
rule two could run, and insert an ApplicantStatus fact with a
Denied reason. At this point I would expect that the original
ApplicantStatus fact, with an Approved reason, would be retracted,
since the conditions under which it was inserted are no longer true.
This is not what I am observing, however. I am finding
ApplicantStatus facts with both reasons in working memory at the end
of the rules run. Should not work as I expect with regard to
inserting a fact via insertLogical()? Or is this a known limitation,
or simply the way it is designed to work?
Thanks,
-Hans___
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] Caching RuleBase in Drools

2008-08-11 Thread Ingomar Otter
 Typically, a rulebase would be generated and cached on first use;  
to save
on the continually re-generation of the Rule Base; which is  
expensive.
Read:   Cache the rulebase (the rulebase object) with a Cache  
mechanism of your choice.


AFAIK there is no dedicated caching mechanism in Drools per se.
This makes sense, otherwise the next person would look for cache  
distribution, cache synchronization in a cluster. A can of worms that  
should not be touched.


For example we use JBOSS TreeCache and are happy with it. This may be  
overkill, simpler implementations  like oscache may just be fine - all  
depends on your requirements and deployment situation.



Cheers,
  Ingomar


Am 11.08.2008 um 13:50 schrieb raj_drools:



Hi ,

i'm trying to implement caching of rules .

in the manual there is a statement as follows :

 Typically, a rulebase would be generated and cached on first use;  
to save
on the continually re-generation of the Rule Base; which is  
expensive.


how does rule base caches rules ?  is there any method to cache the  
rules ?


how can i implement caching in Drools in order to avoid loading  
rules all

the times ?




--
View this message in context: 
http://www.nabble.com/Caching-RuleBase-in-Drools-tp18924137p18924137.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


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


Re: [rules-users] Salience not being considered in DSL

2008-08-11 Thread Ingomar Otter

Hello Harsh,
The problem I am facing is that the salience specified in the drl is  
not

being used.
Please elaborate, this is a too general question. So the salience is  
present in the generated drl?


Salience  (by default)  defines the execution order of those  rules  
which are activated (=their LHS is true). If rules changes facts which  
causes other rules to activate (which is just fine) you may see a  
different order of rules firing.  A good way to understand what's  
going on inside is the Audit View in Eclipse. Have/can you try this?


-Ingomar


Am 11.08.2008 um 11:26 schrieb Harsh Jetly:



Hi ,
I am using Drools version 4.0.4.

I have created a dsl file for my drl ,I have set a salience for each  
rule .
The problem I am facing is that the salience specified in the drl is  
not

being used.

Now when I use the drl without the dsl . Things work just fine and the
salience is used .

What should be done ?



Regards
Harsh Jetly
SOA
Center of Excellence


Larsen  Toubro Infotech Ltd.
www.Lntinfotech.com

This Document is classified as:

|--|
| [X]  |
|--|LT Infotech Proprietary   |--|
  | [ ]  |
  |--|LT Infotech  
Confidential   |--|
  | 
 [ ]  |
  | 
--|

LT Infotech Internal Use Only   |--|
| [ ]  |
|--|LT Infotech General Business

This Email may contain confidential or privileged information for the
intended recipient (s) If you are not the intended recipient, please  
do not
use or disseminate the information, notify the sender and delete it  
from

your system.


__
___
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] Update vs insert

2008-09-11 Thread Ingomar Otter
Ehm, I would think that unless person implements a  
PropertyChangeListener, you need to tell the engine about the change  
of the slot.

Update would be the proper way AFAIK.

In this case, I don't see why one would  want to insert an object into  
WM - as it is already in WM.
I think the exact result of the insert depends on whether you have  
implemented equals/hashCode properly.
But again, in that example I understand that you want to change the  
property of an object you have matched  in the LHS.

The way to do this is using update().

-- Ingomar

Am 11.09.2008 um 12:39 schrieb Shyam, Pallav (MSCIBARRA):

Very strange. The facts are passed into the WM by-reference.  
Therefore the query should work after calling the  
person.setClassName(Math) on the fact. And this should work  
without calling the insert or update.


This leaves me guessing that the query does not work on the facts  
directly, instead they work on shadow facts.







From: [EMAIL PROTECTED]
To: Rules Users List
Sent: Thu Sep 11 04:41:37 2008
Subject: [rules-users] Update vs insert


Hello,

  What is the difference between calling insert and update in a rule  
file? When I use insert my queries don’t work, but if I use update  
they seem to. I don't mind using update, but I would like to  
understand the difference between the two. Here is my rule file.


   rule Add person to math class
   no-loop
   when
   person : Person(likesMath == true)
   then
   person.setClassName(Math);
   insert(person);
   end

  I also have a query:

  query getPeopleForClass(String _className)
 Person(className == _className)
  end

  When I add two facts to working memory, where the likesMath  
attribute is true, then run my query I get zero results back. When I  
change the rule, Add person to math class, to use update(person)  
instead of insert(person) two students are returned.


 Any help would be appreciated.

Thanks,
Dan


Daniel Quinn
Fedex - Custom Critical
Software Specialist I
234.310.4090(x2586)

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] ] On Behalf Of [EMAIL PROTECTED]


Sent: Wednesday, September 10, 2008 2:27 PM
To: rules-users@lists.jboss.org
Subject: [rules-users] Re: looping problem

Hello,

thanks that works. I just forgot to set the focus in the init rule..

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




NOTICE: If received in error, please destroy and notify sender.  
Sender does not intend to waive confidentiality or privilege. Use of  
this email is prohibited when received in error.

___
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] Problem with setting a Global

2008-09-11 Thread Ingomar Otter

You have to declare the global in the rule package.

global foo.bar.Logger  logger;

--Ingomar
Am 11.09.2008 um 18:24 schrieb Earnest Dyke:


Greetings all,

I have the following Java code and rule. When executed I get an  
Unexpected Global exception (see below). What am I doing wrong?



@In WorkingMemory wm

@Logger Log log;

public void calculate() {
   wm.setGlobal(logger,log);
   wm.insert(calcResult);
   wm.fireAllRules();
}


rule Calc
   when
   $c : CalcResult();
then
   log(drools.getRule().getName(),log);
   // Do calculation
end

function void log(String msg, Log log) {
   log.debug(msg,new Object[]{});
}

When the calculate method is executed I get the following exception:


java.lang.RuntimeException: Unexpected global [logger]
	at  
org 
.drools 
.common.AbstractWorkingMemory.setGlobal(AbstractWorkingMemory.java: 
367)
	at  
org.ebsinc.ia.action.AnalysisAction.createData(AnalysisAction.java:93)

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.jboss.seam.util.Reflections.invoke(Reflections.java:21)
	at  
org 
.jboss 
.seam 
.intercept.RootInvocationContext.proceed(RootInvocationContext.java: 
31)
	at  
org 
.jboss 
.seam 
.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java: 
56)
	at  
org 
.jboss 
.seam 
.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
	at  
org 
.jboss 
.seam 
.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java: 
68)
	at  
org 
.jboss 
.seam 
.persistence 
.ManagedEntityIdentityInterceptor 
.aroundInvoke(ManagedEntityIdentityInterceptor.java:48)
	at  
org 
.jboss 
.seam 
.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java: 
68)
	at  
org 
.jboss 
.seam 
.transaction 
.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
	at  
org 
.jboss 
.seam 
.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java: 
68)
	at  
org 
.jboss 
.seam 
.core 
.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java: 
42)
	at  
org 
.jboss 
.seam 
.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java: 
68)
	at  
org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java: 
106)
	at  
org 
.jboss 
.seam 
.intercept 
.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:155)
	at  
org 
.jboss 
.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java: 
91)
	at org.ebsinc.ia.action.AnalysisAction_$ 
$_javassist_9.createData(AnalysisAction_$$_javassist_9.java)

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.jboss.seam.util.Reflections.invoke(Reflections.java:21)
	at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java: 
125)

at org.jboss.seam.Component.callComponentMethod(Component.java:2074)
at org.jboss.seam.Component.callCreateMethod(Component.java:1997)
at org.jboss.seam.Component.newInstance(Component.java:1968)
at org.jboss.seam.Component.getInstance(Component.java:1865)
at org.jboss.seam.Component.getInstance(Component.java:1832)
	at org.jboss.seam.Component.getInstanceFromFactory(Component.java: 
1911)

at org.jboss.seam.Component.getInstance(Component.java:1855)
at org.jboss.seam.Component.getInstance(Component.java:1832)
at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)
at org.jboss.seam.Namespace.get(Namespace.java:28)
	at  
org 
.jboss.seam.el.SeamELResolver.resolveInNamespace(SeamELResolver.java: 
197)

at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:57)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
	at  
com 
.sun 
.faces 
.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java: 
64)
	at  
org 
.jboss.el.parser.AstPropertySuffix.getValue(AstPropertySuffix.java:53)

at org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
	at  
org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java: 
186)
	at  
com 
.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java: 
71)
	at  
javax 
.faces 
.component 
.ValueBindingValueExpressionAdapter 
.getValue(ValueBindingValueExpressionAdapter.java:102)

at com.sun.facelets.component.UIRepeat.getValue(UIRepeat.java:143)
	at com.sun.facelets.component.UIRepeat.getDataModel(UIRepeat.java: 
121)

at 

[rules-users] Disabling pattern matching alltogether for set of rules?

2008-09-16 Thread Ingomar Otter

Folks,
we have a scenario where we are applying rules with complex in their   
LHS at the end of our rule processing.


Today we just use a low salience to achieve this. Obviously, these
rules are included in the pattern matching and in the agenda updates  
for all   preceding changes to the WM.
We do quite some changes to the facts during our regular processing  
so  unnecessary pattern-matching/agenda updates are performed.
I have looked at rule-flow, agenda-groups etc but one thing I could
not figure out by studying the documentation:
Which is the (best) way to exclude certain rules from pattern  
matching  (switch them off alltogether) so that we can delay the  
pattern   matching until the facts have stabilized?


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


Re: [rules-users] Disabling pattern matching alltogether for set of rules?

2008-09-16 Thread Ingomar Otter

Sorry,
...with complex _joins__ in their LHS ...

Am 16.09.2008 um 14:17 schrieb Ingomar Otter:


Folks,
we have a scenario where we are applying rules with complex in  
their  LHS at the end of our rule processing.


Today we just use a low salience to achieve this. Obviously, these
rules are included in the pattern matching and in the agenda updates  
for all   preceding changes to the WM.
We do quite some changes to the facts during our regular processing  
so  unnecessary pattern-matching/agenda updates are performed.
I have looked at rule-flow, agenda-groups etc but one thing I  
could   not figure out by studying the documentation:
Which is the (best) way to exclude certain rules from pattern  
matching  (switch them off alltogether) so that we can delay the  
pattern   matching until the facts have stabilized?


  Cheers,
 Ingomar
___
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] memory issue when listening to market data

2008-09-29 Thread Ingomar Otter

Given the information remote diagnosis is not feasible.
I would suggest to have a look at the heap ... to see where things are  
going.

See
http://weblogs.java.net/blog/kellyohair/archive/2005/09/heap_dump_snaps.html

--Ingomar

Am 29.09.2008 um 17:30 schrieb Cheng, Ping:


All,

I wrote a server which listens to the market data and generates alerts
based on some conditions.
It listens to about 300 symbols and contains  30 simple rules. It  
works

fine when the market is quiet. It uses about 500 M in memory and there
is no big difference between reports from top and jconsole.  When  
market
is busy, memory displayed in jconsole is still ok, but top reports  
much

more memory and it did not come down at all. Sometimes it could reach
50G when it's a crazy day.

I used jmap to check the memory map  and it looks fine from java  
view, I
wonder if drools hold something when it's very busy? What is  
supposed to

happen if drools could not handle the work load?

Thanks for your help.

-Ping

-
The information contained in the linked e-mail transmission and any  
attachments may be
privileged and confidential and is intended only for the use of the  
person(s) named in the
linked e-mail transmission. If you are not the intended recipient,  
or an employee or agent
responsible for delivering this message to the intended recipient,  
you should not review,
disseminate, distribute or duplicate this e-mail transmission or any  
attachments . If you
are not the intended recipient, please contact the sender  
immediately by reply e-mail and
destroy all copies of the original message. We do not accept account  
orders and/or
instructions related to AllianceBernstein products or services by e- 
mail, and therefore will
not be responsible for carrying out such orders and/or instructions.  
The linked e-mail
transmission and any attachments are provided for informational  
purposes only and should not
be construed in any manner as any solicitation or offer to buy or  
sell any investment
opportunities or any related financial instruments and should not be  
construed in any manner
as a public offer of any investment opportunities or any related  
financial instruments.  If
you, as the intended recipient of the linked e-mail transmission,  
the purpose of which is to
inform and update our clients, prospects and consultants of  
developments relating to our
services and products, would not like to receive further e-mail  
correspondence from the
sender, please reply to the sender indicating your wishes.   
Although we attempt to sweep
e-mail and attachments for viruses, we will not be liable for any  
damages arising from the
alteration of the contents of this linked e-mail transmission and  
any attachments by a third

party or as a result of any virus being passed on.

Please note:
Trading instructions sent electronically to Bernstein shall not be  
deemed accepted until a
representative of Bernstein acknowledges receipt electronically or  
by telephone. Comments in
the linked e-mail transmission and any attachments are part of a  
larger body of investment
analysis. For our research reports, which contain information that  
may be used to support
investment decisions, and disclosures, see our website at www.bernsteinresearch.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] memory issue when listening to market data

2008-09-29 Thread Ingomar Otter

Ping,
I  think you should focus on the content of your heap and not on the  
specific size.


So here are my 0.02EUR:
1. get a working heap dump (google is your friend)
2. Inspect the heap (dont focus on measuring it too much)

#2 should give you an idea what is consuming the memory and thus  
should give you a starting point.


By the way: top reports the amount of memory the VM has allocated  and  
the amount of physical memory consumed.
Due to Java heap dynamics this is only somewhat coupled to the actual  
memory consumption of the VM.
But unless you start the VM with weird -X/-XX switches  the memory  
allocated / consumed should come down a while as the VM shrinks the  
heap.

So if it's not doing this the app is not releasing the objects.

This is probably an application and not a Drools issue.

-I


Am 29.09.2008 um 19:06 schrieb Cheng, Ping:


Ingomar,

I tried jmap -heap:format=b, but got some errors and jhat could not
parse the dump file.
Then I tried jmap -histo and I added up all objects' memory and it
pretty much matched what I saw from jconsole.

Is there any chance that jmap -histo and -heap return different  
result?


Thanks.
-Ping

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ingomar  
Otter

Sent: Monday, September 29, 2008 12:47 PM
To: Rules Users List
Subject: Re: [rules-users] memory issue when listening to market data

Given the information remote diagnosis is not feasible.
I would suggest to have a look at the heap ... to see where things are
going.
See
http://weblogs.java.net/blog/kellyohair/archive/2005/09/heap_dump_snaps 
.

html

--Ingomar

Am 29.09.2008 um 17:30 schrieb Cheng, Ping:


All,

I wrote a server which listens to the market data and generates  
alerts

based on some conditions.
It listens to about 300 symbols and contains  30 simple rules. It
works
fine when the market is quiet. It uses about 500 M in memory and  
there

is no big difference between reports from top and jconsole.  When
market
is busy, memory displayed in jconsole is still ok, but top reports
much
more memory and it did not come down at all. Sometimes it could reach
50G when it's a crazy day.

I used jmap to check the memory map  and it looks fine from java
view, I
wonder if drools hold something when it's very busy? What is
supposed to
happen if drools could not handle the work load?

Thanks for your help.

-Ping

-
The information contained in the linked e-mail transmission and any
attachments may be
privileged and confidential and is intended only for the use of the
person(s) named in the
linked e-mail transmission. If you are not the intended recipient,
or an employee or agent
responsible for delivering this message to the intended recipient,
you should not review,
disseminate, distribute or duplicate this e-mail transmission or any
attachments . If you
are not the intended recipient, please contact the sender
immediately by reply e-mail and
destroy all copies of the original message. We do not accept account
orders and/or
instructions related to AllianceBernstein products or services by e-
mail, and therefore will
not be responsible for carrying out such orders and/or instructions.
The linked e-mail
transmission and any attachments are provided for informational
purposes only and should not
be construed in any manner as any solicitation or offer to buy or
sell any investment
opportunities or any related financial instruments and should not be
construed in any manner
as a public offer of any investment opportunities or any related
financial instruments.  If
you, as the intended recipient of the linked e-mail transmission,
the purpose of which is to
inform and update our clients, prospects and consultants of
developments relating to our
services and products, would not like to receive further e-mail
correspondence from the
sender, please reply to the sender indicating your wishes.
Although we attempt to sweep
e-mail and attachments for viruses, we will not be liable for any
damages arising from the
alteration of the contents of this linked e-mail transmission and
any attachments by a third
party or as a result of any virus being passed on.

Please note:
Trading instructions sent electronically to Bernstein shall not be
deemed accepted until a
representative of Bernstein acknowledges receipt electronically or
by telephone. Comments in
the linked e-mail transmission and any attachments are part of a
larger body of investment
analysis. For our research reports, which contain information that
may be used to support
investment decisions, and disclosures, see our website at

www.bernsteinresearch.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] memory issue when listening to market data

2008-09-29 Thread Ingomar Otter

This may be a good starting point
Troubleshooting and  Diagnostic Guide
http://java.sun.com/j2se/1.5/pdf/jdk50_ts_guide.pdf

--I


Am 29.09.2008 um 19:06 schrieb Cheng, Ping:


Ingomar,

I tried jmap -heap:format=b, but got some errors and jhat could not
parse the dump file.
Then I tried jmap -histo and I added up all objects' memory and it
pretty much matched what I saw from jconsole.

Is there any chance that jmap -histo and -heap return different  
result?


Thanks.
-Ping

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ingomar  
Otter

Sent: Monday, September 29, 2008 12:47 PM
To: Rules Users List
Subject: Re: [rules-users] memory issue when listening to market data

Given the information remote diagnosis is not feasible.
I would suggest to have a look at the heap ... to see where things are
going.
See
http://weblogs.java.net/blog/kellyohair/archive/2005/09/heap_dump_snaps 
.

html

--Ingomar

Am 29.09.2008 um 17:30 schrieb Cheng, Ping:


All,

I wrote a server which listens to the market data and generates  
alerts

based on some conditions.
It listens to about 300 symbols and contains  30 simple rules. It
works
fine when the market is quiet. It uses about 500 M in memory and  
there

is no big difference between reports from top and jconsole.  When
market
is busy, memory displayed in jconsole is still ok, but top reports
much
more memory and it did not come down at all. Sometimes it could reach
50G when it's a crazy day.

I used jmap to check the memory map  and it looks fine from java
view, I
wonder if drools hold something when it's very busy? What is
supposed to
happen if drools could not handle the work load?

Thanks for your help.

-Ping

-
The information contained in the linked e-mail transmission and any
attachments may be
privileged and confidential and is intended only for the use of the
person(s) named in the
linked e-mail transmission. If you are not the intended recipient,
or an employee or agent
responsible for delivering this message to the intended recipient,
you should not review,
disseminate, distribute or duplicate this e-mail transmission or any
attachments . If you
are not the intended recipient, please contact the sender
immediately by reply e-mail and
destroy all copies of the original message. We do not accept account
orders and/or
instructions related to AllianceBernstein products or services by e-
mail, and therefore will
not be responsible for carrying out such orders and/or instructions.
The linked e-mail
transmission and any attachments are provided for informational
purposes only and should not
be construed in any manner as any solicitation or offer to buy or
sell any investment
opportunities or any related financial instruments and should not be
construed in any manner
as a public offer of any investment opportunities or any related
financial instruments.  If
you, as the intended recipient of the linked e-mail transmission,
the purpose of which is to
inform and update our clients, prospects and consultants of
developments relating to our
services and products, would not like to receive further e-mail
correspondence from the
sender, please reply to the sender indicating your wishes.
Although we attempt to sweep
e-mail and attachments for viruses, we will not be liable for any
damages arising from the
alteration of the contents of this linked e-mail transmission and
any attachments by a third
party or as a result of any virus being passed on.

Please note:
Trading instructions sent electronically to Bernstein shall not be
deemed accepted until a
representative of Bernstein acknowledges receipt electronically or
by telephone. Comments in
the linked e-mail transmission and any attachments are part of a
larger body of investment
analysis. For our research reports, which contain information that
may be used to support
investment decisions, and disclosures, see our website at

www.bernsteinresearch.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


-
The information contained in the linked e-mail transmission and any  
attachments may be


privileged and confidential and is intended only for the use of the  
person(s) named in the


linked e-mail transmission. If you are not the intended recipient,  
or an employee or agent


responsible for delivering this message to the intended recipient,  
you should not review,


disseminate, distribute or duplicate this e-mail transmission or any  
attachments . If you


are not the intended recipient, please contact the sender  
immediately by reply e-mail and


destroy all copies of the original message. We do not accept account  
orders

Re: [rules-users] EDT dependency -- transitive dependencies broken from 4.07 to 5?

2008-10-31 Thread Ingomar Otter

Hi Andrew,
I've seen this in 4.0.7 as well.
There is a dependency from drools-compiler to either Eclipse JDT or  
Janino for compilation, depending on what compiler you choose. JDT is  
default by now.


Both compilers are supplied with 5M2 bin-dist, see lib/janino.jar and  
lib/core-3.4.2.jar for JDT. Make sure to include the JDT jar in  
your build and you should be fine.


What's strange is that you see this using maven, as this is an  
explicit dependency in the drools-compiler pom. Ehm, maybe I can't  
really help here. :-(



Cheers,
  Ingomar
Am 31.10.2008 um 19:18 schrieb Andrew Waterman:


Hi Everyone,

I've seen this issue in the archives, but I haven't seen anyone  
address it in regards to an upgrade from 4.07 to 5MR2.  Basically, I  
have a set of java dialect drl files that compile properly in 4.07  
and are usable, but when I simply modify my maven build to use the  
5MR2 release, I get the following well-known error:


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: 
94)
   at  
org 
.drools 
.rule 
.builder 
.dialect 
.java.JavaDialectConfiguration.init(JavaDialectConfiguration.java:55)
   at  
org 
.drools 
.compiler 
.PackageBuilderConfiguration 
.addDialect(PackageBuilderConfiguration.java:200)

   ... 30 more

This error seemed to go away when I moved from using my local build  
of Drools to using the staged builds on snapshots.jboss.org, but has  
come back to haunt me this morning.


Have the transitive dependencies changed in 5? Are there any Maven  
specific work-around suggestions? Is this the expected behavior for 5?


best wishes,

Andrew

-
Andrew Waterman
San Cristóbal de las Casas, Chiapas, Mexico
+52 1 967 103 3176
+1 510 342 5693







___
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] For lead Distribution

2008-11-04 Thread Ingomar Otter

yes

Am 04.11.2008 um 17:51 schrieb Pramod Koshy:



Can we use Drools for a CRM tool to implment the business rules for  
lead
assignment. Say Lead 1 has to be distributed to User 1 if Lead is  
from State

Florida.

thanks,
--
View this message in context: 
http://www.nabble.com/For-lead-Distribution-tp20323797p20323797.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


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


Re: [rules-users] foreach in drl file

2009-02-16 Thread Ingomar Otter

Phil,
maybe you can tell us what you are trying to do? Are you talking about  
the RHS?


--Ingomar

Am 16.02.2009 um 23:15 schrieb can_...@gmx.de:


Hello,

I would like to itterate over a list in a drl template file, I  
looked at http://mvel.codehaus.org/MVEL+2.0+Orb+Tags


@foreach{item : products}
- @{item.serialNumber}
@end{}

but I just can't get the syntax right. Could someone please post an  
example drl file with a foreach.


Thank you very much.
Phil
--
Jetzt 1 Monat kostenlos! GMX FreeDSL - Telefonanschluss + DSL
für nur 17,95 Euro/mtl.!* http://dsl.gmx.de/? 
ac=OM.AD.PD003K11308T4569a

___
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] foreach in drl file

2009-02-16 Thread Ingomar Otter

Phl,
I am still not quite there.
, I would like a foreach which itterates through a list in my java  
class, e.g. Golfer, and addes the conditions in the collection to my  
rule with ANDs

So the condition is where?

What I would be looking for is a plain text description of the rule, ie.
find all  serial numbers of all Golfer objects that have ...  Or  
something like that.
Prose is usually a fairly good starting point for transcribing into  
rules/drl.


Afaik foreach loop  / iterations is not supported in the LHS  per  
se. They are also not needed as the pattern matcher will just do the  
right thing.
The same result can be achieved in a 'proper' declarative  way,  
(whatever that means ;-) ). Therefore the question about the what.


--I



Am 16.02.2009 um 23:58 schrieb can_...@gmx.de:


Hello,


maybe you can tell us what you are trying to do? Are you talking  
about

the RHS?

--Ingomar


thank you for your reply. I would like to use a template drl file  
together with a java class. Both the LHS and RHS should contain  
variables, where the LHS should itterate over a collection in the  
when part.


So for example, in the golf example, I would like a foreach which  
itterates through a list in my java class, e.g. Golfer, and addes  
the conditions in the collection to my rule with ANDs.


rule find solution
   when
   // cut

   Golfer(

   @foreach{item : products}
   - @{item.serialNumber}
   @end{}

   )

then
  // do something
end

My problem is that I don't really know how to write the foreach  
syntax.

Hope this is clear.

Thank you.
Phil


Am 16.02.2009 um 23:15 schrieb can_...@gmx.de:


Hello,

I would like to itterate over a list in a drl template file, I
looked at http://mvel.codehaus.org/MVEL+2.0+Orb+Tags

@foreach{item : products}
- @{item.serialNumber}
@end{}

but I just can't get the syntax right. Could someone please post an
example drl file with a foreach.

Thank you very much.
Phil
--
Jetzt 1 Monat kostenlos! GMX FreeDSL - Telefonanschluss + DSL
für nur 17,95 Euro/mtl.!* http://dsl.gmx.de/?
ac=OM.AD.PD003K11308T4569a
___
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


--
Jetzt 1 Monat kostenlos! GMX FreeDSL - Telefonanschluss + DSL
für nur 17,95 Euro/mtl.!* http://dsl.gmx.de/? 
ac=OM.AD.PD003K11308T4569a

___
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] foreach in drl file

2009-02-16 Thread Ingomar Otter

How about

when
Time(value==10)   //it's 10 o'clock
$aFriend: Friend() //any friend in the working memory
then
//RHS will be fired for each friend if it's 10 o'clock
end

or:

when
Time(value==10) //is it 10?
$self:Self()  //get a handle to yourself
	$friend: Friend( name in Mike, Tom, Anna ) from  
$self.friends  //match your friends named Mike, Tom or Anna.

then
..  //will be fired for each of your friends that are called either  
Mike, Tom or Anna

end

Depending on the actual problem there are a lot of ways of doing this.  
If you provide a 'less artificial' example we may be able to help ;-)


Please study Drools Manual (4.07) chapter 6.5.2, it has nice tiny  
examples.




Cheers,
  Ingomar

Am 17.02.2009 um 00:40 schrieb can_...@gmx.de:


Thanks for the reply Ingomar.


I am still not quite there.

, I would like a foreach which itterates through a list in my java
class, e.g. Golfer, and addes the conditions in the collection to  
my

rule with ANDs
So the condition is where?

What I would be looking for is a plain text description of the  
rule, ie.

find all  serial numbers of all Golfer objects that have ...  Or
something like that.
Prose is usually a fairly good starting point for transcribing into
rules/drl.


I will try, hopefully it is a bit clearer this time.


friends = ['Mike', 'Tom', 'Anna'] // this is the collection I want  
to itterate over


time = 10



When my 'friend' is one of 'friends' and time is 10 o'clock then  
ring my alarm.



Hope this shows where I would like the collection to get into play.

Thank you,
Phil


--
Jetzt 1 Monat kostenlos! GMX FreeDSL - Telefonanschluss + DSL
für nur 17,95 Euro/mtl.!* http://dsl.gmx.de/? 
ac=OM.AD.PD003K11308T4569a

___
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] Large Rule base failing? StackOverlowError

2009-02-20 Thread Ingomar Otter

Blair.
can you post the stack trace?

Also, does the probem go away IF you increase stack size?

--I

Am 20.02.2009 um 17:54 schrieb Christie, Blair:


We are having a problem reading in large serialized files. We get a
StackOverflow exception when the rules get to be 2m.

Is there a way to overcome this without increasing the stack size?



Blair Christie





___
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] FW: When is 5.0 GA?

2009-03-11 Thread Ingomar Otter
If you are not the intended recipient, you have received this  
transmission in error and you are hereby advised that any
review, disclosure, copying, distribution, or use of this  
transmission, or any of the information included therein,

 is unauthorized and strictly prohibited.

Maybe off-topic but I am wondering: Am I the intended reciepient? ;-)

 --I
Am 11.03.2009 um 13:39 schrieb Umesh Wankhede:






From: Umesh Wankhede [mailto:umesh.wankh...@arisglobal.co.in]
Sent: Tuesday, March 10, 2009 5:35 PM
To: 'rules-users@lists.jboss.org'
Subject: When is 5.0 GA?



Hi



When is the plan for GA of Drools 5.0?



Umesh


Legal Notice: This transmission, including any attachments, is  
confidential, proprietary, and may be privileged. It is intended  
solely for
the intended recipient. If you are not the intended recipient, you  
have received this transmission in error and you are hereby advised  
that any
review, disclosure, copying, distribution, or use of this  
transmission, or any of the information included therein, is  
unauthorized and strictly
prohibited. If you have received this transmission in error, please  
immediately notify the sender by reply and permanently delete all  
copies of

this transmission and its attachments




___
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 4.0.7 Or 5.0.X ?

2009-03-12 Thread Ingomar Otter
Our project is going into production after 1 year so please let me  
know is it good idea to implement 4.0.7 or 5.0.X ?
I think it's safe to assume that 5.x will be rock solid a year from  
now so I would suggest 5 as migration from 4.0.x to 5.x is not free.

--I

Am 12.03.2009 um 14:53 schrieb surya_n2007:



Hi All,

  We want to implement drools as our rule engine , planning to use  
drools

4.0.7 since i am thinking drools 5.0 has bugs and fixes is going on .
Our application has huge volume of facts performance is main
criteria,planning to use RuleFlow and it is standalone application  
not using

BRMS this is one reason to select 4.0.7 . Our project is going into
production after 1 year so please let me know is it good idea to  
implement

4.0.7 or 5.0.X ?


Thanks  Regards
Surya.
--
View this message in context: 
http://www.nabble.com/Drools-4.0.7-Or-5.0.X---tp22476826p22476826.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


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


[rules-users] Null safe MVEL expressions

2009-03-16 Thread Ingomar Otter

Folks,
it seems that since 2.0 MVEL supports null-safe MVEL expressions, ie.
fact.?property.subproperty == foo will evaluate to false (instead of  
failing) if property is null.
I tried this some time ago and  it seems that the drools parser does  
not like the ?.

Is anybody using this?

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


[rules-users] Hints for profiling pattern-matching

2009-03-18 Thread Ingomar Otter

Folks,
I am currently tuning a Drools application.
We have made good progress with basic rule tuning (pattern  
reordering), however I am under the impression that there is still  
some inefficient matching going on. I am wondering whether there are  
hooks in Drools (or an approach) to get a handle on where expensive   
matching is performed. A regular profiler is not helpful, as I can't  
see the data (what is being matched).

Any ideas?

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


Re: [rules-users] org.drools.runtime.rule.ConsequenceException: [Error: unable to access property (null parent): add] [Near : {... Unknown ....}] ^ [Line: 1, Column: 0]

2009-04-01 Thread Ingomar Otter

Ashish,
My guess is that you are navigating properties and the something along  
the way is null.
Eg object.prop1.prop2 where prop1 is null. If prop1 can be null you  
have to check for nullness first, ie.

object.prop1!=null, object.prop1.prop2

--Ingomar

Am 01.04.2009 um 19:23 schrieb Ashish Soni:


Hi ,

Can some-one please tell What does this error means.

org.drools.runtime.rule.ConsequenceException: [Error: unable to access
property (null parent): add] [Near : {...  
Unknown }]  ^

[Line: 1, Column: 0]

Regards,
Ashish
___
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] Performance of compiler

2009-04-17 Thread Ingomar Otter

Christian,
with our app, we see a compile performance which is at least an order  
of magnitude higher.
I would assume that in your case the extreme fine granularity of your  
DRLs may be slowing things down.

Have you tried to consolidate these in bigger but fewer DRls?

If you need that granualarity, you still have the option of joining  
these together before running it with the help of perl and the likes.


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


[rules-users] Re: Guvnor stuck when opening web based decision table - any hints?

2009-04-27 Thread Ingomar Otter

Well maybe it is lost and I just re-create it.
However the archive button is only visible when I open the asset. :-(
Solution: Mount Guvnor via WebDav and fix it there. :-)
--I

Am 24.04.2009 um 11:17 schrieb Ingomar Otter:


When opening a web-based decision table my 5.0.0CR1 guvnor gets
stuck at Loading Asset
There is no error in the logfile.

That specific server/browser combination used to work until I did
'some' change to the table. ;-)
Any idea how I can track this down?

Cheers,
 Ingomar



--
Ingomar Otter
CTO
mailto:ingomar.ot...@valtech.de
Mobile: +49 172 2367867

Valtech GmbH
Bahnstraße 16
40212 Düsseldorf
Germany

Phone: +49 211 179237-0
Fax: +49 211 179237-19

http://www.valtech.de

Geschäftsführer: Ingo Kriescher
Amtsgericht Düsseldorf HRB48672
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Does drools have any trigger?

2009-04-28 Thread Ingomar Otter

Lindy,
by default Drools will re-evaluate the rules as needed once facts  
are changed (and the engine is told about it), so when changed is  
actually the default behavior.
The examples you give sound more like an event-processing scenario  
(reasoning over time) so you might want to have a look at drools-fusion.


Rules can be updated by business users thru BRMS and Guvnor?
The short answer yes.
The long answer: Your milage may vary.  It really depends on what type  
of rules and what  type of business users. I don't think it's safe to  
just tick this box.
That has not much to do with Guvnor's capabilities (allthough it is a  
new product) - I rather think that this is not true for any BRMS.


-- Ingomar

Am 24.04.2009 um 18:30 schrieb Lindy hagan:


I was looking at  Blaze Advisor documentation it has  “when changed”
operator that only fires when an attribute of an object changes. A  
business
analyst might use it to watch for any important issue, such as a  
thermostat
warning in a process plant or a particular stock reaching a certain  
price or

volume.

In similar way does Drools have this feature?

Can any one correct if I am wrong: Rules can be updated by business  
users

thru BRMS and Guvnor? (I did not get chance to go thru these)
___
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] Rules-users list delays/duplicates

2009-05-02 Thread Ingomar Otter
It seems that the rules-users list is experiencing either massive  
delays or duplicate delivery.

See message below which reached me today.
Should you experience the same effect, I have indicated this to   
rules-users-owner so it is known


Cheers,
  Ingomar



Von: David Boaz dav...@dbmotion.com
Datum: 17. August 2008 17:22:00 MESZ
An: rules-users@lists.jboss.org
Betreff: [rules-users] CEP functionality
Antwort an: Rules Users List rules-users@lists.jboss.org


Dear all,

We posted this question two weeks ago, but with no replies. please  
forgive

me for posting it again.

In our business, most of the facts have time-stamp attributes. For  
example,
each laboratory test (a fact) has the time stamp when the sample was  
taken,
and when the machine produced the result value. In our business- 
logic, we

often analyze the relation between facts using these attributes.

For example:
1) finding two adjacent labResults with an increasing value
2) checking whether 3 facts are consecutive
3) counting the number of facts fulfilling a specific constraint  
within a

specific time window.

We were happy to read (in the blog) about the new CEP feature which  
is about

to be added to drools 5.0.

* Where can we find a more detailed description of CEP functionality  
in

drools?
* Is it a good idea to use CEP for analyzing historic data  
(retrieved from

the database)? or is it best for online data.

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


[rules-users] Sharing packages between rule bases?

2009-05-04 Thread Ingomar Otter

Hello @all.

We are generating quite some rules and we have handcrafted rules.
We'd like to combine both into RuleBases that we use for a limited time.
So far we have parsed the static packages and merged these into  
RuleBases we create. We hang on to the static packages to avoid  
unnnecessary parsing of these.


This results in a n:m relation between packages and rulebases.
For example:
* Rulebase1 contains Package:Pstatic and Package:P1
* Rulebase2 contains Package:Pstatic and Package:P2
etc..
Is this supported/permitted? Any idea how I can achieve shared  
packages between rule bases?


* What we see is a memory leak,. It seems that the generated Rulebases  
(and their classes ) are never unloaded. We are still investigating.


* I included a specific code to remove the packages from the  
rulebases, once we no longer need them.  I use  RuleBase.removePackage  
for this.
To my surprise the removePackage method not only removes the package  
from the RuleBase, it also purges the package. :-(


So I do a
myRuleBase.addPackage(myLovelyPackge) followed by
myRuleBase.removePackage(myLovelyPackage.getName()). This leaves  
myLovelyPackge _empty_. Not what I expected.




-- Ingomar


(ps all this is on 407)
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Download Drools 4.0.7

2009-05-20 Thread Ingomar Otter

Shenika,

It's always here:
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/tags/4.0.7.19894.GA/
Check it out and buikd it (it's trivial).


If you get's nervous because of this,   you might want to consider to  
move from the community to the RedHat  supported version. ;-)


--I


Am 20.05.2009 um 19:18 schrieb Shenika Harris:




Is it still possible to download 4.0.7?

We are in the process of getting approval to implement 4.0.7 in our  
one of our applications.  While 5.x is very appealing, it would be a  
significant delay in the project to get approval for 5 at this  
time.  The links for 4.0.7 are ‘gone’ and making people very nervous.


Please let me know if you have the url to download 4.0.7… I suspect  
it’s something like http://download.jboss.org/drools/release/4.0.7  
etc.


Thank you!
-  Shenika


___
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] fact granularity, performance, and other questions

2009-05-27 Thread Ingomar Otter

David,
- Does the order of the conditions in a rule affect performance, the
execution order, or the structure of the Rete network?
Yes, quite a lot has been written about this. The drools documentation  
has a few paragraphs with good heuristics...
 A popular read seems to be this paper, which provides good insight  
into RETE performance aspects:


Production Matching for Large Learning Systems (Rete/UL)
by Robert B. Doorenbos
PhD thesis, Carnegie Mellon University, January 31, 1995



- Does the order the facts are inserted into a stateless session (as
 a list via the CommandFactory.newInsertElements) affect performance  
at

all?
All I can say that this is true (it has impact) for statefull  
sessions. The deal here is how often the agenda may get changed while  
inserting objects.

I have no experience with stateless sessions and I hope others do;-)

- Should each field in a message be a fact? (more info on my message
below)  What fact granularity have you settled on in your usage and
why?
I would suggest to start with a model which is most natural to your  
rules (with the lowest WTF factor) and take it from there.


I assume that you need to correlate information from all segments of a  
message?
I would stay well clear from your option 3 (eval()) - just because I  
always do ;-)
Eval() simply defies RETE optimizations so it can be very sensitive to  
both number of facts and number of rules (using eval).


If you know the field IDs (which I assume you would, using an EDI  
formant) -  I would see whether you can avoid the field facts and turn  
them into slots (attributes) instead.
But not to the extend you outline in #2, that seems to be too awkward.  
If you have buy another server ;-)



what did you determine the best approach to be?
I am pretty sure that there is no generic best approach.
I would proceed trying to understand the nature of the rules (are they  
regular, ie following the same scheme, can they be generated?) and the  
data and create
regression performance test-suite ASAP to monitor performance during  
development.


In our application we for example have analyzed bottlenecks and found  
that (no surprise) accessing properties like facta.factb.value is  
slower compared to facta.facbtValue  - that's in 4.07 - due to the  
different mechanism the value is obtained. From there we have added  
about three of these shortcut accessors. However we have first  
focused on optimizing the rules themself to avoid excessive matching  
in the first place so there was no need for us to flatten our entire  
model.



my 0.02EUR
 -- Ingomar

Am 28.05.2009 um 02:17 schrieb David Zeigler:


Hi,
I could use some experienced guidance.  I'm in the process of
evaluating Drools for use of using in a real-time transactional
environment to process about 3000 messages/second.  I realize a lot of
this depends on the type and quantity of rules, hardware, etc.  I'm
curious what steps others have taken to improve performance and if
there are any recommendations for my case detailed below.

A few specific questions I have are:
- Should each field in a message be a fact? (more info on my message
below)  What fact granularity have you settled on in your usage and
why?
- Does the order of the conditions in a rule affect performance, the
execution order, or the structure of the Rete network?
- Does the order the facts are inserted into a stateless session (as
a list via the CommandFactory.newInsertElements) affect performance at
all?

The message is an EDI format and will typically have anywhere from 80
to 200 fields, potentially more.  The message is divided into
transactions, then segments, then fields.  We have an object model
that represents the message.  We're using a stateless session and most
of the rules will modify fields or add fields and segments based on
the values of other fields.  Currently, I flatten the object model
into a List containing the message, transactions, segments, and each
field, and then insert the list into the stateless session and fire.
I'm avoiding sequential mode for now until we have a better idea of
our requirements.

Here's a simplified example of what I'm doing now (using json-esque
syntax instead of the EDI format).
message {
 segment {
   SG:header
   A0:agents
 }
 segment {
   SG:agent
   A1:000
   A2:JAMES
   A3:BOND
 }
 segment {
   SG:agent
   A1:86
   A2:MAXWELL
   A3:SMART
 }
}

Each field has an id and a value.  For this message, I would insert 14
facts:  the message object, 3 segments objects, and 10 field objects.

rule set James Bond's A1 to 007
when
 $a1 : Field(id == A1,  value != 007)
 Field(id == A2,  value == JAMES)
 Field(id == A3,  value == BOND)
then
 $a1.setValue(007);
 update($a1);
end

A relatively more complicated, but typical rule would be set James
Bond's A1 to 007 iff he's the second agent in the message and one of
the other agents' first names does not contain AUSTIN and an agency
segment exists

The above example assumes each segment and field is 

Re: [rules-users] Is Drools suitable for this scenario?

2009-05-28 Thread Ingomar Otter

Alex,
sounds like a feasible use of Drools to me.
Do you have details on number of facts, rules and/or typical rules?

The time you give (5msec) is ambitious but I think is feasible if done  
right. This means that I do not see a reason why this can not be  
achieved with Drools - in principle.
Whether it will take 5msec per ?? or 5 seconds now depends on details  
of your problem  (and skill). ;-)


-- Ingomar

Am 28.05.2009 um 16:50 schrieb Zevenbergen, Alex:


Hi all,



I am wondering if Drools is suitable for a task I have to achieve.



I have an application that assigns values to objects - in some
circumstances an object's value may have to be mapped onto another
object. The circumstances that this might happen in don't have many
common characteristics so I have cant really put this logic into a db.



So my question is whether Drools is the better option to put this  
logic

into?



Also this app relies on speed and is Drools fast enough to facilitate
this? (= .005 sec preferably)



Thanks,



Alex



Privileged, confidential and/or copyright information may be  
contained in this communication. This e-mail and any files  
transmitted with it are confidential and intended solely for the use  
of the individual or entity to whom they are addressed. If you are  
not the intended addressee, you may not copy, forward, disclose or  
otherwise use this e-mail or any part of it in any way whatsoever.  
To do so is prohibited and may be unlawful. If you have received  
this email in error

please notify the sender immediately.

Paddy Power PLC may monitor the content of e-mail sent and received  
for the purpose of ensuring compliance with its policies and  
procedures.


Paddy Power plc, Airton House, Airton Road, Tallaght, Dublin 24   
Registered in Ireland: 16956

___
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] Upgrade to Drools 5 - loss of performance

2009-05-28 Thread Ingomar Otter
During a few experiments I did with MVEL, I have found that 2.x  
actually performs slower than 1.x in our case. Maybe that is a  
starting point.


Scott, do you have the possibility to profile your application   using  
4.x and   using 5.x? That should reveal the bottlenecks and I am sure  
that the dev crowd would be glad receiving that input.


 -- Ingomar


Am 28.05.2009 um 17:18 schrieb Scott Reed:

I just upgraded our app from Drools 4 to 5 libraries. We just use  
the rules engine with DRL. The performance of the engine on our  
rulebase is unacceptably slow.  I assume there is something we need  
to do to our rules or the way we are configuring the engine to fix  
this. I don't see anything in the release notes about backwards  
compatibility issues. I would very much appreciate it if someone  
would direct me to any documentation that explains what needs to be  
done so our 4.0 rules perform at least as well as they did before  
the upgrade?

Thanks,
Scott
___
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] A relational SQL Database as RuleBase

2009-06-03 Thread Ingomar Otter

Rene,
mhhm, what are your trying to do (besides storing rules in a rdbms)?
What's the use-case?

Cheers,
--I


Am 03.06.2009 um 22:21 schrieb r.r.neum...@freenet.de:



Hi guys,

my question is listed in the topic. Is it possible? I read, that  
Drools 4
provides such a feature but in this case, there is noch DSL  
available? Is

this correct? What's about Drools 5, same thing?

Thanks for an answer!

Regards
René
--
View this message in context: 
http://www.nabble.com/A-relational-SQL-Database-as-RuleBase-tp2383p2383.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



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


Re: [rules-users] A relational SQL Database as RuleBase

2009-06-04 Thread Ingomar Otter
To me it appears to be  a very generic question that's hard to answer  
without serious mind-reading skills.


Am 04.06.2009 um 09:31 schrieb r.r.neum...@freenet.de:



It's just a question still now :) ...
--
View this message in context: 
http://www.nabble.com/A-relational-SQL-Database-as-RuleBase-tp2383p23865137.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


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


Re: [rules-users] Default rule

2009-06-04 Thread Ingomar Otter
How about if you create a rule with lowest salience, this will fire  
_after_ all other rules have fired.

Would this help?

Am 04.06.2009 um 22:17 schrieb Malenfant, Andre:

Anyone knows if it is possible to have a `default` rule that would  
fire only if others have not?


Also, is there a way, using decision tables in XLS, to look if the  
value of a field is contained in a list elsewhere in the XLS?


Thanks

André

___
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] Templates / Generated rules debugging

2009-06-08 Thread Ingomar Otter
-  Since this is a web application, I cannot debug the rules  
in Eclipse (unless I am missing something)

You are missing something. :-) That's possible.

However we have found regular debuggers not to helpful.
Have a look at the WorkingMemoryLoggers, they can give you a detailed  
insight of what's going on inside Drools, ie.

* Facts inserted, changed, retracted
* Activations
* Rules fired

4.0.7: 
http://downloads.jboss.com/drools/docs/4.0.7.19894.GA/apidocs/org/drools/audit/WorkingMemoryFileLogger.html
(The Drools Eclipse Plugin can be used to view these logs).

To be useful, this requires a usable toString, we have created those  
using apache commmons-lang.


Happy hunting!

 -- Ingomar



Am 08.06.2009 um 17:46 schrieb Malenfant, Andre:


Hi,



Can some of your share your technique for debugging/troubleshooting  
rules:




Here is the situation:



-  I have a web application that uses rules at specific  
points.


-  I use templates and decision tables so the actual rules  
are compiled by my application using a spread sheet compiler.


-  Since this is a web application, I cannot debug the rules  
in Eclipse (unless I am missing something)




I must not be the only one asking this question but I cannot find  
answers in the archives.




Thanks,



André Malenfant



___
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] Templates / Generated rules debugging

2009-06-08 Thread Ingomar Otter

Yes, check this out:
http://blog.athico.com/2008/02/looking-under-drools-skirt.html


Am 08.06.2009 um 18:34 schrieb Malenfant, Andre:


Is it possible to see the generated Java code for the rules?

-Original Message-
From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org 
] On Behalf Of Ingomar Otter

Sent: Monday, June 08, 2009 12:00 PM
To: Rules Users List
Subject: Re: [rules-users] Templates / Generated rules debugging



-  Since this is a web application, I cannot debug the rules

in Eclipse (unless I am missing something)
You are missing something. :-) That's possible.

However we have found regular debuggers not to helpful.
Have a look at the WorkingMemoryLoggers, they can give you a detailed
insight of what's going on inside Drools, ie.
* Facts inserted, changed, retracted
* Activations
* Rules fired

4.0.7: 
http://downloads.jboss.com/drools/docs/4.0.7.19894.GA/apidocs/org/drools/audit/WorkingMemoryFileLogger.html
(The Drools Eclipse Plugin can be used to view these logs).

To be useful, this requires a usable toString, we have created those
using apache commmons-lang.

Happy hunting!

 -- Ingomar



Am 08.06.2009 um 17:46 schrieb Malenfant, Andre:


Hi,



Can some of your share your technique for debugging/troubleshooting
rules:



Here is the situation:



-  I have a web application that uses rules at specific
points.

-  I use templates and decision tables so the actual rules
are compiled by my application using a spread sheet compiler.

-  Since this is a web application, I cannot debug the rules
in Eclipse (unless I am missing something)



I must not be the only one asking this question but I cannot find
answers in the archives.



Thanks,



André Malenfant



___
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