Semantic Web Drools Module, Request for Feedbak
by Xavier Breton
Hi,
I'm looking for feedback, I'll develop a Semantic Web Drools Module that
will be the subject of my Master Degree Tesis.
The idea is to use Eclipse Modelling Framework (EMF) for prototyping and
follow a Model Driven Architecture (MDA) where the source language is
Semantic of Business Vocabularies and Business Rules (SBVR) and the target
language is Drools DRL.
The mapping could be (PIM level):
- Semantic Web Rule Language (SWRL)
- Ontology Web Language (OWL)
- RuleML
- Rule Interchange Format (RIF)
- REWERSE Rule Markup Language (R2ML)
It could be added to the module at the source UML or Entity Relationship
like models to transform the models into SBVR.
Regards
Xavier Breton
10 years, 8 months
Attach custom editor on guided decision table cell
by c3310082
Hi,
We would like to render a custom editor when a user double-clicks on a cell
that is present in web guided decision table in Guvnor 5.1 (or later). The
custom editor needs to be invoked for cells that represent a particular fact
model attribute only.
This is somewhat similar to WS custom forms functionality available for
guided business rules.
So far we have seen the
org.drools.guvnor.client.decisiontable.GuidedDecisionTableWidget class that
contains implementation for:
public void onCellDblClick(GridPanel grid,
int rowIndex,
int colIndex,
EventObject e)
in the GridCellListenerAdapter class that opens up text editor or drop down
editor.
We're new to GWT and Guvnor so would appreciate it if anyone can provide the
high level steps.
Thanks
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Attach-custom-editor-...
Sent from the Drools - Dev mailing list archive at Nabble.com.
11 years, 11 months
Guided Editor in BRMS / Guvnor Version 5 (Snapshot of 26 June)
by Paul Browne
Folks,
For various reasons I'm trying out the Guided Editor for Business Rules in
the Guvnor Version 5 (Snapshot of 26 June from Hudson, deployed on JBoss App
Server 4.2.2GA).
I've created the Package / Category and uploaded a simple fact model (as
works in BRMS version 4). I create a new business rule using the guided
editor and the screen shows successfully with both 'When' and 'Then'
parts.Assume the next question is due to me missing something, but wanted to
double check:
When I press the green '+' to the right of the screen I am shown the message
/ dialog layer saying '
*Add a condition to the rule... *or* Add an action to the rule.
*Problem is that there doesn't appear to be a way of adding a condition or
action. The only thing I'm seeing in the logs is
* (Contexts.java:flushAndDestroyContexts:335) could not discover
transaction status
*Am I missing something or should I come back to Guvnor later in the
development Cycle?
Thanks
Paul
12 years, 7 months
Drools on android
by Justin King
Hi All,
I'm wondering if anyone has tried to use drools in a google android
application, and if so what problems did you have? I'd also be interested to
know if its even possible!
Thanks!
--
Regards,
Justin King
PhD Candidate
Faculty of Information and Communication Technologies
Swinburne University of Technology
http://www.ict.swin.edu.au/ictstaff/justinking
--
Regards,
Justin King
PhD Candidate
Faculty of Information and Communication Technologies
Swinburne University of Technology
http://www.ict.swin.edu.au/ictstaff/justinking
12 years, 9 months
Guvnor documentation
by Michael Anstis
Hi,
There are quite a few gaps in Guvnor's documentation.
Here is a list
https://docs.google.com/spreadsheet/ccc?key=0AvNo0onpk9PedG5hSkRsU3kxRUQ0...
I've assigned some sections to people - *Rikkola, Jervis, Tihomir, Geoffrey,
me, Estaban\Salaboy* (if the area is something you developed and can write a
few lines?).
The ownership column represents how is to document, not who owns that part
of the application.
Please feel free to have a look and update any section :)
With kind regards,
Mike
13 years
java.lang.NullPointerException while testing
by shubhranshu
Hello everybody,
I am new to drools. We have to integrate drools in our application. After
lot of searching a found something very helpful. Here is what I did.
I created a new package say test.
I uploaded a new jar file which contains my model.
I created a new category say banking.
Then I created a rule under the banking category in test package.
Finally I create a new snapshot for deployment.
Then I get the changeset.xml
<change-set xmlns='http://drools.org/drools-5.0/change-set'
xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
xs:schemaLocation='http://drools.org/drools-5.0/change-set
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/...'
>
<add>
<resource
source='http://localhost:8080/guvnor-5.2.0.Final-tomcat-6.0/org.drools.guvnor.Guv...'
type='PKG' />
</add>
</change-set>
Below is the code to test
package com.test;
import junit.framework.TestCase;
import org.drools.KnowledgeBase;
import org.drools.agent.KnowledgeAgent;
import org.drools.agent.KnowledgeAgentConfiguration;
import org.drools.agent.KnowledgeAgentFactory;
import org.drools.io.ResourceFactory;
import org.drools.runtime.StatefulKnowledgeSession;
public class Test extends TestCase{
public void testDroolsWithGuvnor() throws Exception {
KnowledgeBase knowledgeBase = createKnowledgeBase();
StatefulKnowledgeSession session =
knowledgeBase.newStatefulKnowledgeSession();
try {
Person person = new Person();
person.setAge(20);
session.insert(person);
assertTrue(session.getFactCount() == 1);
session.fireAllRules();
assertTrue(session.getFactCount() == 2);
}
finally {
session.dispose();
}
}
public static KnowledgeBase createKnowledgeBase(){
KnowledgeAgentConfiguration kaconf =
KnowledgeAgentFactory.newKnowledgeAgentConfiguration();
kaconf.setProperty( "drools.agent.scanDirectories", "false"
);
KnowledgeAgent kagent =
KnowledgeAgentFactory.newKnowledgeAgent( "test
agent", kaconf );
kagent.applyChangeSet(
ResourceFactory.newClassPathResource("ChangeSet(12).xml"));
return kagent.getKnowledgeBase();
}
}
But when i try to test it using junit i get the following exception.
java.lang.NullPointerException
at
org.drools.agent.impl.KnowledgeAgentImpl.processChangeSet(KnowledgeAgentImpl.java:223)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:189)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:174)
at com.test.Test.createKnowledgeBase(Test.java:34)
at com.test.Test.testDroolsWithGuvnor(Test.java:15)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Dont know how to deal with this
please help
--
View this message in context: http://drools.46999.n3.nabble.com/java-lang-NullPointerException-while-te...
Sent from the Drools: Developer (committer) mailing list mailing list archive at Nabble.com.
13 years
Job opening to work on Drools & jBPM in Argentina
by Mark Proctor
One of the largest healthcare organisations in Argentina is looking to
find two senior developers, full time, to work on Drools and jBPM. The
position is a long term contractual one and you must be based in Buenos
Aries, Argentina
The work is for R&D enhancements to Drools and jBPM, not for building
end user applications. It involves developing next generation authoring
environments for rules, workflow and the semantic web. The ideal
candidates would have a mixed set of skills including java, gwt and
javascript. Knowledge of Drools and jBPM is a plus, but not mandatory.
You will work day to day with the Drools and jBPM team, as part of their
community. All your work will be open source and you'll be able to
evangelise your work via community facilities, such as mailing lists and
blogs. This provides a unique opportunity to work on high profile
projects in a public manner and gain recognition for yourself and your work.
You can apply for the job here :
http://jobs.athico.com/job/senior-java-and-javascript-developer-to-work-o...
<http://jobs.athico.com/job/senior-java-and-javascript-developer-to-work-o...>
13 years
Regression with Drools 5.3.0-CR1
by Swindells, Thomas
I've just tried upgrading from Drools 5.3.0-CR1 from the beta and I've hit a regression.
JBoss seems to have been down for most of today so I haven't been able to raise a Jira for it.
In our model we have Facts which contain fields of java.lang.class, we then have a rule which checks that they aren't null.
Eg
Fact { Class<Object> classField}
Rule "xyz"
When
Fact(classField != null)
Then
...
End
This is giving the following exception
Caused by: java.lang.ClassCastException: org.drools.base.field.ObjectFieldImpl cannot be cast to org.drools.base.field.ClassFieldImpl
at org.drools.base.evaluators.EqualityEvaluatorsDefinition$ClassEqualEvaluator.evaluate(EqualityEvaluatorsDefinition.java:1772)
at org.drools.rule.LiteralRestriction.isAllowed(LiteralRestriction.java:87)
at org.drools.rule.LiteralConstraint.isAllowed(LiteralConstraint.java:109)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:130)
at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:451)
at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:369)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:134)
at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:451)
at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:379)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:204)
at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:244)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:330)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:291)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:882)
at org.drools.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:180)
... 149 more
Wrapping the classField != null within an eval appears to be a work around.
This is in the suspect method:
public boolean evaluate(InternalWorkingMemory workingMemory,
final InternalReadAccessor extractor,
final Object object1, final FieldValue object2) {
Object value1 = extractor.getValue( workingMemory, object1 );
Object value2 = object2.getValue();
if ( value2 == null ) {
ClassFieldImpl classField = (ClassFieldImpl) object2;
value2 = classField.resolve( workingMemory );
}
return comparator.equals( value1, value2 );
}
I think the if statement just needs an instanceof check as well or some other way to track the fact that null may be a valid value to be comparing with!
Thomas
________________________________
**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster(a)nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00
**************************************************************************************
13 years
docbook chunking
by Mark Proctor
Currently the chunked, multi-page, docbook uses indexed numbers for
pages. These numbers can change from build to build as the content
changes. It seems that chunking can accept various attributes for the
url name. This means if someone takes the time to update the docbook we
can get something close to permanlinks. If we have links that don't
change too often people can then use those web annotation systems, to
allow live annotations and comments.
http://www.sagehill.net/docbookxsl/Chunking.html
Mark
13 years
Optimizing working memory
by Mario Fusco
Hi,
as suggested by Mark, last Thursday I pushed some optimization to the
working memory.
https://github.com/droolsjbpm/drools/commit/763ebf8d23d5f9ab0a47774c23aa7...
As you can see I basically lazy initialized all the non-strictly necessary
data structures and rewrote the updateEntryPointsCache method. Now I also
had time to benchmark these improvements in terms of both memory occupation
and speed. I did this by just creating a StatefulKnowledgeSession starting
from a KnowledgeBase with a single simple rule.
Before my optimization, each StatefulKnowledgeSession occupied 11,336 bytes
and I can create (on my machine) 4,668 of them in one second.
After it, each StatefulKnowledgeSession is now 8,610 bytes and in one second
I can create 12,304 of them.
I guess those results are truly positive and interesting especially if
compared with the time (just a few hours) I needed to implement them.
Would be great If you think there are other parts of the project where it
could be possible to achieve similar results and then you could signal them.
Mario Fusco
twitter: http://twitter.com/#!/mariofusco
13 years