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
Kie: pluggable builders
by Michael Anstis
I was thinking over the weekend.
Guvnor has many different file types it uses to store rule definitions.
Currently Guvnor builds DRL before passing this to KieBuilder via
KieStorage (erm, will do this).
Any thoughts on moving the conversion to DRL from Guvnor to pluggable
builders within Kie that accept defined file-types (you have DRL and XLS at
the moment).
This further makes Guvnor just the "rule management" component having
knowledge base building (from any resource type) within Expert.
Guvnor would obviously provide all the pluggable builders it needs for 6.0.
Just a thought...
sent on the move
11 years, 6 months
Bug: package visibility - getter not recognized at fact insertion time (!)
by Wolfgang Laun
PLEASE READ CAREFULLY, AND UNTIL THE END.
These two files (foo/Foo.java, foo/foo.drl) are sufficient to
reproduce the bug, i.e., a diagnostic
Exception in thread "main" [Error: could not access field: named.NamedEntity.x]
[Near : {... x == 1 ....}]
^
followed by a hefty stack dump due to an insert of a Foo.
package foo;
/*** not public ***/ class Foo {
private int x = 1;
public int getX(){ return x; }
}
package foo;
rule "foo getX"
when
Foo( x == 1 )
then
System.out.println( "some Foo.x == 1" );
end
But note that the problem goes a little deeper. Remove the constraint,
and the rule fires:
rule "some Foo"
when
$foo: Foo()
then
System.out.println( "some Foo..." ); // works perfectly
end
But now try to print the matched Foo:
rule "show all Foo factss"
when
$foo: Foo()
then
System.out.println( "Foo: " + $foo );
end
Another dump:
Exception in thread "main" java.lang.IllegalAccessError: tried to
access class named.NamedEntity from class
named.Rule_xxx_fd3f0f5f764b415691fbf49ce4def6d7DefaultConsequenceInvokerGenerated
at named.Rule_xxx_fd3f0f5f764b415691fbf49ce4def6d7DefaultConsequenceInvokerGenerated.evaluate(Unknown
Source)
at named.Rule_xxx_fd3f0f5f764b415691fbf49ce4def6d7DefaultConsequenceInvoker.evaluate(Unknown
Source)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1287)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1221)
at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1456)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:710)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:674)
at org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:230)
at named.Main.execute(Main.java:83)
I DO understand why this happens (so please DON'T explain it to me).
HOWEVER, IF PACKAGE VISIBILITY CANNOT BE HANDLED (and I don't think it
can), IT SHOULD BE REFUTED WITH A PROPER DIAGNOSTIC.
-W
11 years, 7 months
Re: [rules-dev] [rules-users] How to pass variables to a drools rule file?
by Wolfgang Laun
This is yet another MVEL bug, as it appears to fail to handle package
visibility correctly.
Put Qos into a .java file of its own in any package, precede class by
"public" and use a proper import in the .drl.
You can omit the import if the package of the Java class and the .drl
is the same.
-W
On 27/02/2013, FrankVhh <frank.vanhoenshoven(a)agserv.eu> wrote:
> It is looking for com.sample.Qos. Try to add the import statement
> test.java.Qos somewhere on top of your file.
>
> Regards,
> Frank
>
>
> penny wrote
>> Hi,there.I have a class in test.java file.It looks like:
>> class Qos{
>> boolean S;
>> boolean W;
>> Qos(){
>> S = true;
>> W = false;
>> }
>> public boolean getS(){
>> return S;
>> }
>> public boolean getW(){
>> return W;
>> }
>> }
>>
>> Now I want to use the Qos class in my rule file like this:
>> rule "rule1"
>> ruleflow-group "myRules"
>> salience 4
>> when
>> //conditions
>> $qos:Qos(S==true && W==true);
>> then
>> System.out.println("rule1");
>> end
>>
>> But here is an error.
>> [Error: could not access field: com.sample.Qos.S]
>> [Near : {... S == true ....}]
>> ^
>> [Line: 1, Column: 1]
>>
>> How can I do?
>
>
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/How-to-pass-variables-to-a-drools-rule-...
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
11 years, 7 months
Fwd: Drools-97 :
by Charles Moulliard
Hi,
I have finished the project to deploy drools top of apache-karaf (
https://issues.jboss.org/browse/DROOLS-49).
Before to commit the project, I would like to ask you where you would like
that I commit what is specific to karaf :
(A) Into a GitHub repository (drools-karaf) or
(B) Move my drools-karaf project under droolsjbpm-integration ?
Regards,
--
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
--
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
11 years, 7 months
Reminder [was: Inconsistent option property naming]
by Wolfgang Laun
After a period of more than 24 hours, this point is still open, and
the question of adding or not adding the dot leaves me in a tight
spot.
-W
On 20/02/2013, Wolfgang Laun <wolfgang.laun(a)gmail.com> wrote:
> Looking at
>
> WorkItemHandlerOption implements MultiValueKnowledgeSessionOption
>
> contains
>
> public static final String PROPERTY_NAME = "drools.workItemHandlers";
>
> which is used as
>
> public String getPropertyName() {
> return PROPERTY_NAME+name;
> }
>
> so that some actual property setting would have to be the ugly
> concatenation
>
> drools.workItemHandlerstheName = theHandler
>
> All (!) other multi-valued options use a period to separate the fixed
> part from the user-defined tag, i.e.,
>
> public static final String PROPERTY_NAME = "drools.workItemHandlers.";
>
> -W
>
11 years, 7 months
Fixing an utterly broken Javadoc
by Wolfgang Laun
Before I can fix the sub-standard javadoc of
KnowledgeSessionConfiguration, I need a decision whether to leave the
PROPERTY_NAME of WorkItemHandlerOption as it is or fix it according to
other multi-valued options.
If it remains as it is, I really don't know how to explain the strange
way this option needs to be written in a property file...
-W
11 years, 7 months