Import into specific package GUVNOR help !
by abhinay_agarwal
hello,
m using GUVNOR v5.3.0
i upload a POJO JAR in global area and created a rule using it in the global
area..
now, when i imported the same jar into a package and tried making rules
using it, it shows me the following error..
Note: No model has been defined.
Tip: You will want to import or define a model for this user interface to
work !
M, i doing something wrong, can yu plz help me out !!
Thanks,
Abhinay
--
View this message in context: http://drools.46999.n3.nabble.com/Import-into-specific-package-GUVNOR-hel...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 8 months
Does Drools Fusion consume a lot of memory?
by chrisLi
Hi, Edson and all
I am making an experiment on Drools Fusion these days. I found it
consumes a lot of memory. And the
number of rules, the fields of events, the complexity of rules affect the
memory usage.
The flow of my experiment is as follow:
1. I have two tables, one for Transaction, one for account. The
transaction table have a foreign key
number which is the primary key of account table.
2. In one thread, I loaded transaction data and account data into a
ArrayBlockingQueue, whose size is 100000.
3. In another thread, I inserted the Transaction as events and the
related account as facts into the
Fusion Engine.
4. I used a java profiler tool to monitor the memory usage of the Fusion
engine, and recorded the
highest heap memory usage of ecah round of my experiment.
Here is the results:
Amount of events highest heap memory usage(MB)
5000 268
10000 470
15000 555
20000 645
25000 845
30000 958
35000 1011
40000 1127
45000 1331
Is this the normal memory usage of Drools Fusion? Otherwise, did I make a
mistake?
See the attachments for the rules and Java Model classes . If you are
intrested in this experiment, I can upload all codes.
Thank you very much. I will appreciate for your response.
http://drools.46999.n3.nabble.com/file/n4018307/Cep1.drl Cep1.drl
http://drools.46999.n3.nabble.com/file/n4018307/TransactionEvent.java
TransactionEvent.java
http://drools.46999.n3.nabble.com/file/n4018307/Account.java Account.java
--
View this message in context: http://drools.46999.n3.nabble.com/Does-Drools-Fusion-consume-a-lot-of-mem...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 8 months
Continuous deployment of rules/vetoing changesets
by Gustaf Cele
Hi,
I have a Guvnor server (5.4.0.Final) which provides rules to a client (which itself is an EJB server app) using KnowledgeAgents to get hold of rule updates. The knowledge agents are started with changeset XMLs on the classpath which point at my Guvnor instance.
The KnowledgeAgents are set up thus:
ResourceFactory.getResourceChangeNotifierService().start();
ResourceFactory.getResourceChangeScannerService().start();
KnowledgeAgent knowledgeAgent = KnowledgeAgentFactory.newKnowledgeAgent(agentName);
knowledgeAgent.monitorResourceChangeEvents(true);
Resource resource = ResourceFactory.newClassPathResource(changeSetResourcePath, getClass());
knowledgeAgent.applyChangeSet(resource);
ResourceFactory.getResourceChangeNotifierService().start();
ResourceFactory.getResourceChangeScannerService().start();
And the changesets look like this (xsd stuff removed for brevity):
<change-set>
<add>
<resource username="ruleclient" password="hunter2" basicAuthentication="enabled"
source="http://guvnorhost/drools-guvnor/org.drools.guvnor.Guvnor/package/my.packa..."
type="PKG" />
</add>
</change-set>
As you can see, we use LATEST because we want continuous deployment of our rules. Change a rule, build the package, and have the connected KnowledgeAgents updated with the new rule. This works very well - a bit too well, unfortunately. We have a comprehensive test suite, and every now and then, you'll check in a rule that breaks a test. We want to prevent any changes to our rules from being propagated to the clients until all the tests succeed, and this is where we're stuck.
We've tried using a KnowledgeAgentEventListener which throws an exception when it detects test failures:
public class VetoListener extends DefaultKnowledgeAgentEventListener {
@Override
public void beforeChangeSetApplied(BeforeChangeSetAppliedEvent event) {
if (!allTestsPass()) {
throw new RuntimeException("tests failed, not applying change set");
}
}
boolean allTestsPass(){
// Get test results from ${guvnor_url}/org.drools.guvnor.Guvnor/package/my.package/LATEST/SCENARIOS
// and check if there were any failures
}
}
// Usage:
knowledgeAgent.addEventListener(new VetoListener());
This does prevent the new changeset from being applied, but it also seems to kill the thread polling for new changes entirely. Restarting the ResourceChange{Scanner,Notifier}Services doesn't help.
I've also tried modifying the event's changeset (I know you shouldn't), but it doesn't stop the changes from being applied:
public void beforeChangeSetApplied(BeforeChangeSetAppliedEvent event) {
if (!allTestsPass()) {
event.getChangeSet().getResourcesModified().clear();
// ... and clear all the other collections you can get from event.getChangeSet()
}
}
So, what I wonder is if there is any way of preventing a changeset from being applied to a KnowledgeAgent's knowledge base when there are failing test scenarios, but which applies updates as soon as all tests succeed? More generally, I'm looking for something with fewer manual steps than run tests-make snapshot-publish, and in particular I want to ensure you never publish a package when there are tests failing, and it should preferably not require any changes outside of Guvnor to get out new rules to the client app. Any ideas?
Thanks in advance,
/g
13 years, 8 months
drools-camel-server > RetractAll() Command?
by Nicholas Hemley
Hello,
I am currently working with the drools-camel-server and would like to retract all objects in the KB (via Commands that connect using JAXRS).
Some of the objects are created by rules and so I do not have all the FactHandles.
How do I achieve this, please?
Interestingly, the newGetObjects command will return all the objects but not their associated facthandles since if it did, I could simply have looped over this list and issued a RetractCommand for each.
Any ideas (apart from re-creating the knowledge base), please?
Cheerio,
Nic
Nicholas Hemley
13 years, 8 months
RuleFlow not Found
by abhinay_agarwal
hey i want to make a ruleflow using eclipse..
when i go to FILE -> NEW -> OTHERS -> DROOLS -> here i sud get a RULEFLOW
FILE option which creates a .rf file..
instead of this m getting a FLOW FILE option which is creating a .bpmn
file..
can any1 tellme what is wrong with my eclipse/drools ?
--
View this message in context: http://drools.46999.n3.nabble.com/RuleFlow-not-Found-tp4018251.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 8 months
The rule language. More about the agenda-group and ruleflow-group attributes
by Maxim Kolchin
Hi,
I've only been working with drools about couple of months. I've read the
documentation and some articles about drools.
But, I've not found the detail information about the agenda-group and
ruleflow-group attributes, or examples showing how to work with them.
Have I missed something? Will be grateful for any useful information.
Regards,
Maxim Kolchin,
Laboratory of Intellectual Systems,
National Research University ITMO,
Saint-Petersburg.
http://ailab.ifmo.ru/
Email: kolchinmax(a)gmail.com
13 years, 8 months