Dynamic updates of stateful sessions
by Mattias Avelin
We have a application in which we have both stateless & stateful sessions
running. We're using the KnowledgeAgent and ChangeSets to automatically
update our knowledge bases when the rules are changed.
This works fine for our stateless sessions for which we are creating a new
session for each request and if the rules have been updated this is
reflected in next session we create.
But for stateful sessions I'm not quite as sure on how to get it working. I
can see in the logs that the KnowledgeBase is re-built when the
KnowledgeAgent detects the updated rule files. But my "long running" session
is does not reflect these changes (which it shouldn't right?). But how do we
apply these changes to the stateful session without loosing all the facts I
accumulated?
The way I've solved it now is to keep a "last updated" timestamp for the
knowledgeBase and a "created" timestamp for the session and then compare
these before using the session. If the knowledgeBase's "update timestamp" is
later that the sessions "creation timestamp" I create a new Session and then
"manually" copy all facts from the former to the latter.
Is this the way you would do this or is there a better way?
Best Regards
Mattias Avelin
15 years, 1 month
Format of model for guvnor
by azahra
I am trying to use Guvnor with an existing model. I am having class
dependency issues even though I have created a jar with dependencies.
I noticed that the demo package seems to have its model declared in some
non-java way like so:
declare LoanApplication
amount: Integer
approved: Boolean
...
end
Is the use of this format discussed somewhere?
Are there any other alternatives to building a jar with full dependencies?--
View this message in context: http://drools.46999.n3.nabble.com/Format-of-model-for-guvnor-tp2878374p28...
Sent from the Drools: User forum mailing list archive at Nabble.com.
15 years, 1 month
Re: [rules-users] Guvnor rule with a not and an ==
by Esteban Aliverti
Which version of guvnor are you using? I think i solved a similar problem in
trunk. Please search in jira to check if this is already solved.
Unfortunately i don't have the link :(
Best regards,
El abr 29, 2011 7:27 p.m., "Michael Anstis" <michael.anstis(a)gmail.com>
escribió:
15 years, 1 month
drools in my web-app
by Abhay B. Chaware
Hi
I have a simple j2ee web app and would like to make use of drools in it. What's the best way for me to implement this ?
Thanks
15 years, 1 month
Guvnor rule with a not and an ==
by Dean Whisnant
Hi,
I have a rule where I want to check if an object doesn't exist or it exists and a field in it is null or a field in it is D.
Here's .drl code that works
rule "test does not exist is null or is D"
when
(not CLM_DET_LOAD_PendCode() ||
CLM_DET_LOAD_PendCode(pendCode_29== (null)) ||
CLM_DET_LOAD_PendCode(pendCode_29== "D")
)
then
System.out.println("CLM_DET_LOAD_PENDCOE does not exist, is null, or is D");
End
Normally in Guvnor to do an Or, I choose "Any of the following are true..." from the 'Add a condition to the rule...' dialogue. But when I choose this and then try to do the "not" logic, there is no choice for 'not'. I can get the other two conditions in just fine. Short of putting freeform DRL language in there, do you have any suggestions? Am I missing an option in guvnor?
Thanks
Dean
15 years, 1 month
Drools Performance
by Sumeet Karawal
Hi,
I have an Application where I have to give the discount to user according
to their profile points.
i.e. when the user logs in, his profile points are fetched from the
database, and respectively he is given the required discount.
My concern is how many concurrent users will be supported by the rules
engine, will there a performance lag if the concurrent number of users
exceed a certain limit. Please help me on this as I have no idea regarding
this.
Thanks and Reagrds,
Sumeet Karawal
Mailto: sumeet.karawal(a)tcs.com
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
15 years, 1 month
Salience problems
by Chris Selwyn
I am finding that the "salience" feature is acting very erratically.
Some of my rules modify the working memory. So I would like them to
execute before the others that simply read the memory after modification
and report on certain data conditions that are left after all
modifications have happened.
The "modifying" rules have a salience of 5. The "reading" rules have a
salience of 0.
Using the rules logging I can see activations of my modifying rules
being created and activations of the reading rules being created.
And I can see "reading" rules (with salience 0) being executed /before/
"modifying" rules (with salience 5) even though no other activations are
being created in between them.
I am not using agenda groups or anything "fancy" like that.
Debugging through the code I can see the "MAIN" agenda group is a queue
organised as heap.
However, the order in which things happen is very non-deterministic
(presumably due to hashing or something like that) and I am finding it
very difficult to actually pin down an actual 100% reproducible case.
Is there any known problem with the salience mechanism?
I am using JBoss Rules 5.1.0 (with a support licence).
Chris Selwyn
15 years, 1 month