Difference between Rule Base and Knowledge Base
by Swapnil Sawant
Hi,
I had a very basic doubt. 'Rule Base' and 'Knowledge Base' are two different concepts (may be from implementation point of view )?
I got this doubt when I was going through section '1.4.7.2. Drools execution server' of drools guvnor (v5.0) where it was written like :
The drools execution server (drools-server) module is a war which you can deploy to execute "knowledgebases (rulebases)" remotely for any sort of client application
The thing is that , I have created Knowledge base from changeset.xml as follows :
kagent = KnowledgeAgentFactory.newKnowledgeAgent( "MyRuleAgent" );
kagent.applyChangeSet( ResourceFactory.newUrlResource( changesetUrl ) );
kbase = kagent.getKnowledgeBase();
Now if I wish to get Rule Base corresponding to my changeset(or rather my DRL file) using 'this kbase object' , how can I do that ?
Thanks,
Swapnil Sawant
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.
______________________________________________________________________
14 years, 2 months
Activation Firing slow on many events with timer attribute in rule (Drools Fusion)
by Philipp Herzig
Dear Community,
Drools is pretty fast regarding all my use cases. However, today I have
found a problem where I cannot find any solution. Hopefully someone of you
can help.
1. I have a rule with a @timer(10s) attribute (should be 24h later on but
doesn't matter). This rule is activated when a "create" event occurs and
invalidated once a "delete" event occurs within the timeframe of @timer.
2. I have approx. 9000 "create" events which are bulk loaded into the
working memory and creating activations for the rule above.
3. I have approx. 2000 "delete" events which are bulk loaded into my
entry-point cancelling the respective activations from step (2)
4. After the timer expired, the first activation is fired correctly.
However, all other activations are fired with some noticeable delay
(actually it needs 20-30minutes until all activations are fired).
Do you have an idea what the problem with the timer might be?
Unfortunately, I have neither an idea how the scheduler in the background
works nor which class I should start looking at.
BTW: For testing purpose I switched step (2) & (3), that is, "delete"
events are inserted before the "create" events and removed the timer
attribute which is obviously the same logic. It performs lightning fast in
this case... (all remaining activations are fired within 5
seconds). However, insertinging my "delete" events before the "create"
events is ok for testing but not feasible in practice.
It would be great if some of you has an idea or point to start within the
code.
Thanks in advance,
Philipp
14 years, 2 months
Adventures example
by tomschut
Hi,
I've been trying to get the drools examples from the 5.3 final zip to work,
but I seem to be stuck on the adventures example, the one I'm trying to
understand because of the use of the query syntax.
All other examples work, but as for Adventures eclipse reports errors on
importing declarations and analyzing expressions in e.g. Commands.drl.
When I run the examples from command line or even eclipse it does compile
and run the adventures example, so the problem seems to be related to the
plugin.
Thanks,
Tom Schut
--
View this message in context: http://drools.46999.n3.nabble.com/Adventures-example-tp3703045p3703045.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 2 months
Drools 5.3 DSL Or conditions
by gboro54
I am just curious if there is a way to use the "-" appending format for
appending OR conditions to an object. For example:
There exist object a
-where property1 is "Value1"
-or where property2 is "Value2"
This would equate to the drl:
Object(property1=="Value1" || property2=="Value2")
Is this possible or a trick to get something similar? Worst case I can just
separate to two individual rules.
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-5-3-DSL-Or-conditions-tp3703338p...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 2 months
DSL for multiple 'OR'
by Stephen Masters
Hi folks,
I'm trying to create a DSL (to drive a Guvnor guided editor), for which a rule could be written as:
Given a cucumber
- containing one or more worm holes
- or with a curvature greater than 10mm per 10 cm length
- or with a hue of less than 90 degrees
- or with a hue of greater than 150 degrees
Do not put that cucumber on the supermarket shelf
(note: I'm actually developing a banking risk management system looking at different types of counterparty ratings, rather than a fruit&veg quality control system, but hopefully the above example is more readable!)
Is there a decent metaphor that could be used by a business user in Guvnor to manage such rules in one place? Or is it likely to be necessary to create multiple rules?
As far as I understand, every condition added to a rule through such DSLRs adds itself to the filter. i.e. They are AND rather than OR.
The other metaphor I could think of is the decision table as a neat interface for generating multiple rules, but that seems to be geared towards creating rules based on multiple values of a single attribute rather than multiple conditions.
I'm trying to keep the user interface as simple as possible, so any thoughts would be appreciated.
Cheers,
Steve
14 years, 2 months
Guvnor Global Area Usage Restirictions
by domingo
I imported some pakages into Guvnor and I want to put it into Global Area.
The following are my observation...
1. Import action create new package into *'Packages' *section do not have
option like want to put *Global Area* or *Packages*.
2. After import into Packages I want to move the packages to Global Area but
package level is not possible.
3. To move my rules files into Global area..I have to open the individual
rules then only Edit menu shows the Promote to Global option.
If I have 20 or 30 rules in the package I have to the same thing 30 times.
It is very timetaking and think not good idea. what happen If have 30
packages and each package having 30 rules.
I am not sure I am using *Guvnor5.3* effectively or not. *In the
documentation(Guvnor5.3) I noticed two lines only about the Global
area.*Please some one can guide me.....
-----
with kind regards,
--
View this message in context: http://drools.46999.n3.nabble.com/Guvnor-Global-Area-Usage-Restirictions-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 2 months