Modify Object and Fact Handles
by dpark
I'm in the process of upgrading from 2.1 to 3.0 and I've noticed the
signature for knowledgeHelper.modifyObject( Object object ) has changed to
include a FactHandle for it.
Architecturally, does this imply that a list of all fact handles for all
asserted objects has to be maintained in order for modifications to occur?
Or would the following call be the way out?
knowledgeHelper.modifyObject( knowledgeHelper.getWorkingMemory()
.getFactHandle( someObject ), someObject );
(curiously, the above could gives me NPE's on the factHandle for
someObject).
DP
--
View this message in context: http://www.nabble.com/Modify-Object-and-Fact-Handles-tf4132409.html#a1175...
Sent from the drools - user mailing list archive at Nabble.com.
17 years, 5 months
Decision Table - Object equality example
by dpark
I'm in the process of upgrading our decision table rules from 2.1 to 3.0.
However I've run into a bit of a snag that I hope someone can help me with.
We have a generalized consolidation rule that:
* takes 2 parameters of the same Object Type
* makes sure that they don't point to the same reference
* makes sure a field is the same
* and finally retracts one of the objects from working memory (and updates
some statistics on the survivor object)
It just seems a little fuzzy to me how I would write that in a DRL and a
Decision Table.
(I'm finding the decision table documentation and supplied example a little
on the light side)
Any sympathetic helpers out there?
Much appreciated,
Dave Park
--
View this message in context: http://www.nabble.com/Decision-Table---Object-equality-example-tf4130937....
Sent from the drools - user mailing list archive at Nabble.com.
17 years, 5 months
Decision Table does not support Agenda Groups
by 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
17 years, 5 months
BRMS Server - memory Issue while execution - Critical
by Arjun Dhar
Hi,
I've been building a BRMS server over the Drools 4MR2 API.
The Server has a Boot process to allow to make it become a Rule server(s).
reads and XML configuration in which a user can specify the location of the
DRL, XLS, CVS, etc. During the Boot proocess it verifies thew authenticity of
each resource it loads. To sommarize:
<Session 1 type="Stateless">
<Rule Source 1>
<Rule Source 2>
..
<Adapter ExternalService class="..."/>
<Session>
<Session 2 type="Stateful">
<Rule Source 1>
<Rule Source 2>
..
<Session>
..well its more, but I guess this paints the picture.
It creates a Pool of Sessions. Now I know creating a Session is inexpensive,
but the process of creating them and authentication of resources etc. (Required
for prodcution quality system)
Once the server is up, requests are serviced. the request knows which session
it wants and facts are asserted per request. The request can be Synchronous or
Async and single or batch.
For testing I'm using: (JMeter test Case)
Session mode: STATELESS
Synchronous
Mode: Batch of 5 facts (composing of other objects (about 5) which are asserted
into the Session as well) at at a time
Loop: 10,000 <-- Does not matter how fast or slow I trow this at the engine
After the request is processed and results logged; Result and what rules led to
that result. I even nullify the top level Business obejcts. (a desperate
attempt to free memory)
After about 10,000 loops the System goes out of memory.
Sorry to bore you so far, but it was important you have the right context :o)
QUESTION:: Is the session maintaining references to those objects ever after
executing them? Why are the objects not being released?
Specially I'd imagine for a STATELESS session (which is what I've set as
default).
Using JMeter this system crashes every time under load, even with a single
Thread. Clearly objects are not being released.
The error I get may help you: (Along with out of memory). This exception only
comes under Load conditions.
Admin:ERROR: [com.myserver.brms.demos.certify.web.servlet.CertifyWebRequests]
[service] :org.drools.spi.ConsequenceException: java.lang.NullPointerException
at org.drools.common.DefaultAgenda.fireActivation
(DefaultAgenda.java:501)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:461)
at org.drools.common.AbstractWorkingMemory.fireAllRules
(AbstractWorkingMemory.java:373)
at org.drools.reteoo.ReteooStatelessSession.execute
(ReteooStatelessSession.java:72)
at com.myserver.brms.sessions.RulesEngineSessionJBossRules4.execute
(RulesEngineSessionJBossRules4.java:113)
at
com.myserver.brms.services.execute.recore.batch.ExecuteSessionBatch.executeBatch
(ExecuteSessionBatch.java:160)
Please help me! This is the only downtime issue I face and unfortunatley its
the most critical point of failure.
All thats left is to build an RMI service with a console dameon shell to give
it the final touches. Once this is done i'd like to share the deisng with you
guys if you like it.
17 years, 5 months
The method modify(MyBusinessObject) is undefined for the type Rule_xxx
by Arjun Dhar
Hi,
I took the latest Snapshots from the trunk, to check if the memory leak
problem was fixed, but in compiling the rules i got:
The method modify(MyBusinessObject) is undefined for the type Rule_xxx
Have you removed "modify()"? so By default modify will be invoked without
having to explicitly call it?
Thanks,
Arjun
17 years, 6 months
Predicate expression effect on performance
by Yuri de Wit
What is the extent of the performance impact caused by using predicate
expressions?
Check( amount == $amount )
or
Check( $amt : amount -> (isSameAmount($amt, $amount) )
My understanding is that once asserted the amount property will be
"cached" in the shadow fact, is the result of isSameAmount(...) also
cached?
thanks,
-- yuri
17 years, 6 months