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, 7 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, 6 months
Re: [rules-dev] Fine Grained Property Change Listeners (Slot Specific)
by Swindells, Thomas
The change is reducing the coarseness of the system and so making it more sensitive to the scope of the change so I'd say high fidelity is the correct term.
I agree with you I'm concerned how this works with non-pure java beans where some of the setters may update multiple fields, or there may be none bean methods like a reset() method - I don't understand how these would interact in the system, is there a mechanism to explicitly invalidate a property or mark the whole lot as dirty.
Thomas
From: rules-dev-bounces(a)lists.jboss.org [mailto:rules-dev-bounces@lists.jboss.org] On Behalf Of Wolfgang Laun
Sent: 14 January 2012 08:59
To: Rules Dev List
Subject: Re: [rules-dev] Fine Grained Property Change Listeners (Slot Specific)
You really should follow naming conventions Java programmers are familiar
with. javax.xml.bind.annotation.XmlAccessType, for instance, uses the
term "member" for referring to "public getter/setter pairs", and this comes
close to what Drools does. Alternatively, there's "field" and "property",
and I wouldn't worry about the extra lip mileage - you can always abbreviate
to "prop-specific".
Is this new feature in some way configurable for the KnowledgeBase?
There are fact types where modifying one member results in the change
of more than one member. Consider the very plausible case:
$f: Fact(...)
then
modify( $f ){ getList().add( $x ) }
end
when
Fact( size > 10 ) # size implemented as getList().size()
then
Wolfgang
PS: The new feature is actually restricting the sensitivity of the system.
Therefore, I feel that "high-fidelity" is actually counter-intuitive!
On 13 January 2012 23:30, Mark Proctor <mproctor(a)codehaus.org<mailto:mproctor@codehaus.org>> wrote:
Mario just got a first cut working for fine grained property change
listeners. Previously when you call update() it will trigger revaluation
of all Patterns of the matching object type in the knowledeg base.
As some have found this can be a problem, forcing you to split up your
objects into smaller 1 to 1 objects, to avoid unwanted evaluation of
objects - i.e. recursion or excessive evaluation problems.
The new approach now means the pattern's will only react to fields
constrained or bound inside of the pattern. This will help with
performance and recursion and avoid artificial object splitting. We
previously discussed this here:
http://blog.athico.com/2010/07/slot-specific-and-refraction.html
You can see the unit test here:
https://github.com/droolsjbpm/drools/blob/ca55c78429cbc0f14167c604c413cdc...
The implementation is bit mask based, so very efficient. When the engine
executes a modify statement it uses a bit mask of fields being changed,
the pattern will only respond if it has an overlapping bit mask. This
does not work for update(), and is one of the reason why we promote
modify() as it encapsulates the field changes within the statement. You
can follow Mario's chain of work on this at his github activity feed:
https://github.com/mariofusco.atom
The adventerous amoung you can pick this up from hudson, or from maven,
and start playing now. My hope is that this will make drools much easier
to use:
https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/d...
Btw we are after a name. Drools is not a frame based system, so "slot
specific" doesn't seem appropropriate. Property Specific seems a bit of
a mouth full. I'm quite liking High Fidelity Change Listeners :) any
other suggestions?
slot-specific is the name used by Jess for this feature,
http://www.jessrules.com/docs/71/constructs.html. It's also the standard
way that Clips COOL works, which is the Clips OO module. Although that's
partly a side effect of the triple representation of properties used in
COOL, and the modifications are triple based. I don't know what
mechanism Jess is using to enable this.
Mark
_______________________________________________
rules-dev mailing list
rules-dev(a)lists.jboss.org<mailto:rules-dev@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-dev
________________________________
**************************************************************************************
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
**************************************************************************************
12 years, 8 months
MapBackedClassLoader initialization error
by Michael Anstis
Hi,
We see the below in Guvnor from to time thrown from MapBackedClassLoader's
static initialization block:-
Any ideas or thoughts? We haven't had any users report the problem but it
does make a mess of our Hudson build ;)
Cheers,
Mike
java.lang.ExceptionInInitializerError
at org.drools.guvnor.server.builder.ClassLoaderBuilder$1.run(ClassLoaderBuilder.java:104)
at org.drools.guvnor.server.builder.ClassLoaderBuilder$1.run(ClassLoaderBuilder.java:102)
at java.security.AccessController.doPrivileged(Native Method)
at org.drools.guvnor.server.builder.ClassLoaderBuilder.getMapBackedClassLoader(ClassLoaderBuilder.java:102)
at org.drools.guvnor.server.builder.ClassLoaderBuilder.buildClassLoader(ClassLoaderBuilder.java:74)
at org.drools.guvnor.server.builder.BRMSPackageBuilder.<init>(BRMSPackageBuilder.java:67)
at org.drools.guvnor.server.builder.PackageAssemblerBase.createBuilder(PackageAssemblerBase.java:44)
at org.drools.guvnor.server.builder.AssetItemValidator$BuilderValidator.init(AssetItemValidator.java:52)
at org.drools.guvnor.server.builder.AssetItemValidator.validate(AssetItemValidator.java:43)
at org.drools.guvnor.server.builder.drools.AssetItemValidatorTest.runValidate(AssetItemValidatorTest.java:185)
at org.drools.guvnor.server.builder.drools.AssetItemValidatorTest.verifyValidate(AssetItemValidatorTest.java:176)
at org.drools.guvnor.server.builder.drools.AssetItemValidatorTest.testValidate(AssetItemValidatorTest.java:159)
at org.drools.guvnor.server.builder.drools.AssetItemValidatorTest.testValidateBRL(AssetItemValidatorTest.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:59)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:120)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:103)
at org.apache.maven.surefire.Surefire.run(Surefire.java:169)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021)
Caused by: java.lang.NullPointerException
at java.util.jar.Manifest$FastInputStream.fill(Manifest.java:422)
at java.util.jar.Manifest$FastInputStream.readLine(Manifest.java:358)
at java.util.jar.Manifest$FastInputStream.readLine(Manifest.java:390)
at java.util.jar.Attributes.read(Attributes.java:359)
at java.util.jar.Manifest.read(Manifest.java:182)
at java.util.jar.Manifest.<init>(Manifest.java:52)
at java.util.jar.JarFile.getManifestFromReference(JarFile.java:167)
at java.util.jar.JarFile.getManifest(JarFile.java:148)
at sun.misc.URLClassPath$JarLoader$2.getManifest(URLClassPath.java:696)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:228)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at org.drools.rule.MapBackedClassLoader.<clinit>(MapBackedClassLoader.java:38)
12 years, 8 months
5.4 beta 2
by Mark Proctor
We will try for a 5.4 beta2 end of this week. After 5.2 we'll focus on
bug fixing and finishing off existing 5.4 features, before we CR.
Mark
12 years, 8 months
org.drools.core.util.asm.ClassFieldInspector
by Michael Anstis
Hi,
I was working on a Guvnor related JIRA,
https://issues.jboss.org/browse/GUVNOR-1573, and found that the above does
not work well for "delegated properties".
Consider the following:-
public class MotherClass {
private Status status;
public Status getStatus() {
return status;
}
public void setStatus(Status status) {
this.status = status;
}
}
public class DelegationClass {
private MotherClass delegated;
public Status getStatus() {
return delegated.getStatus();
}
public void setStatus(Status status) {
delegated.setStatus( status );
}
}
Method "storeGetterSetter" attempts to align a method getter\setter with a
Field.
When the class being inspected is a regular class (or subclass)
getters\setters normally relate to a member Field, however in the case of a
delegated property (DelegationClass.getStatus, in the example) no field
obviously exists and hence the stored Field is null. I've worked around
this in Guvnor by using the method's return type when the
ClassFieldInspector.getFieldTypesField() returns null however this should,
IMO, ideally be moved to ClassFieldInspector. I haven't been so bold as to
change ClassFieldInspector as it means moving from storing "Fields" in the
"fieldTypesField" Map to something more generic (that can handle Method
return types too) that'll probably impact alot elsewhere.
Is this a known limitation, with perhaps an existing JIRA, or shall I raise
a new one?
Thanks,
Mike
12 years, 8 months
Change-set schema
by Michael Anstis
Hi,
Does anybody know why we have two schema?
- knowledge-api\src\main\resources\change-set-1.0.0.xsd
- knowledge-api\src\main\resources\change-set.xsd
They only differ by this (the bold text being in change-set-1.0.0.xsd):-
...
<xsd:element name="resource">
<xsd:complexType>
<xsd:sequence>
<xsd:any *minOccurs="0"* />
<xsd:element minOccurs="0" ref="change-set:decisiontable-conf"/>
</xsd:sequence>
...
We also (historically) quote the schema location as
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/...
.
Does anybody object if I remove change-set.xsd and update schemaLocation
references to our github equivalent?
Cheers,
Mike
12 years, 8 months
Session from an empty knowledge base
by Wolfgang Laun
Strange error messages (including funny NPEs) can be observed by
running a session with an empty (uninitialized) knowledge base.
Kindly consider refusing to create sessions from a void KBase.
Thanks
Wolfgang
12 years, 8 months