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, 10 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.
12 years, 2 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, 9 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, 11 months
On the validity of drools-5.2.xsd.
by Mats Erik Andersson
Dear all,
below "drools-compiler/src/../META-INF/" lies the XML Schema
"drools-5.2.xsd". After a removing the namespace "drools",
which makes it an invalid schema, and the trivial update
of some XML rule files to rerer to "5.2" instead of "5.0",
there is a persistent problem that the logical model presently
encoded in "drools-5.2.xsd" still fails to validate
test_ParseAccumulate.xml
test_ParseLhs.xml
test_ParseRule.xml
test_SimpleRule1.xml
All of which are found in
drools-compiler/src/test/resources/org/drools/compiler/xml/rules/
QUESTION: Are all XML rule files stored in that directory
supposed to correct, and are as such supposed to
be valid by whatever XML Schema is developed?
The answer to this question is instrumental for my prospects of
reformulating the schema into something usable and valid! If the
answer is "Yes", then the schema needs several changes, otherwise
any intended invalid ingredient in an XML rule file must be properly
documented, not tacitly be maintained in a status quo.
I can in passing pin-point one issue of the present schema, which
in itself does not resolve all problems, but might convince you that
not all matters are well with the present formulation.
The available schema prefers to use <xs:choice> whenever the human
logic indicates so. However, it also combines this with <xs:extension>
to construct composite types. This technique has a pitfall:
* Extending a sequence by a second sequence, results in
a combined sequence. (Expected by a layman.)
* Extending a choice by a second choice, results in a (short)
sequence of independent choices, choices which both have to be made!
(Beware of unwanted consequences!)
The expectation that an extension of choices should produce a (larger)
combined choice is not the way the XML Schema implementation has
been done. This must be taken into account.
Please, do give me feed-back on my question, should you consider
yourself authoritative enough.
Best regards,
Mats Andersson
13 years, 3 months
Cast-away bug
by Wolfgang Laun
This rule
rule "test"
when
$l : ArrayList() from collect (MyClass (attribute == false));
then
for(Object o : new ArrayList( $l )) {
MyClass o2 = (MyClass) o;
modify(o2) { setAttribute(true) }
}
end
does not compile: The method setAttribute(boolean) is undefined for the
type Object
This, however, works:
modify( (MyClass)o) { setAttribute(true) }
Explanation?
-W
13 years, 3 months
Re: [rules-dev] rules-dev Digest, Vol 56, Issue 24
by Pierre
Mats,
Thx for looking into this! I wonder if it wouldn't make more sense to have an automated way of marshaling the object model rather than have a dedicated compiler. Couldn't we find a nice and clean way to use a library like XStream on org.drools.rule.Rule and its like for instance?
Also, in Guvnor it's possible to export in XML so it might be relevant to see how it's done there (I still need to have a look at that myself).
All the best,
Pierre
On 8/25/2011 10:02 AM, rules-dev-request(a)lists.jboss.org wrote:
> Date: Wed, 24 Aug 2011 18:50:55 +0200
> From: Mats Erik Andersson<mats.andersson(a)gisladisker.se>
> Subject: [rules-dev] drools-compiler: Inconsistent test rules in DRL
> and in XML.
> To:rules-dev@lists.jboss.org
> Message-ID:<20110824165055.GB3443(a)mea.homelinux.org>
> Content-Type: text/plain; charset=us-ascii
>
> Dear all,
>
> I am working on the XML Schema (which needs repairing)
> and the XML formulated rules. In doing so I have stumbled
> across a discrepancy between the two rule formulations
>
> drools-compiler/src/test/resources/org/drools/compiler/xml/\
> rules/test_ParseRule.{drl,xml}
>
> which I dare claim to be in error, unless they are ment to
> express different rules!
>
>
> The left-hand side in "test_ParseRule.drl" expresses the logic
>
> foo2 : Bar( ... )
>
> # implicit AND
>
> not( ... )
>
> # implicit AND
>
> foo3 : Bar( ... )
>
> or
>
> foo4 : Bar( ... )
>
> or
>
> foo5 : Bar( ... )
>
> or
>
> foo6 : Bar( ... )
>
> or
>
> Baz()
>
> Observe that foo3 up to foo6 and Baz are connected using OR connectives
> of constant precedence. Still, observing this, the expected counterpart
> test_ParseRule.xml of XML form expresses
>
> <pattern identifier="foo2" ...> ...</pattern>
>
> <!-- implicit AND -->
>
> <not> ...</not>
>
> <!-- implicit AND -->
>
> <or-conditional-element>
> <pattern identifier="foo3" ...> ...</pattern>
> <pattern identifier="foo4" ...> ...</pattern>
> </or-conditional.element>
>
> <!-- implicit AND -->
>
> <pattern identifier="foo5" ...> ...</pattern>
>
> <!-- implicit AND -->
>
> <pattern identifier="foo6" ...> ...</pattern>
>
> <!-- implicit AND -->
>
> <pattern identifier="foo7" ...> ...</pattern>
>
> <!-- implicit AND -->
>
> <pattern object-type="Baz" />
>
> Hence foo5, foo6, foo6 and Baz have been ejected from the
> OR-clause stipulated in the DRL file, instead being part
> of the outer AND-clause.
>
> My expectation is that either DRL or XML file be generated
> after parsing from the other one, but the logical models
> being different, I conclude one of the files to be in error.
>
> Depending on hard-coded precedence model between AND and OR,
> the "or-conditional-element" should encompass only foo3,
> or the (the generally expected) all of "foo#". To single
> out only foo3 and foo4 contradicts the mathematical logic
> behind the contructs.
>
>
> Best regards,
> Mats Andersson
13 years, 4 months
PackageBuilder Warnings question
by Mikael Lönneberg
Hi I'm currently working on an implementation of a new type of problem type
namely Warnings, to solve the following JIRA's:
JBRULES-3124, JBRULES-3063, JBRULES-2730
One of the JIRA's deal with the detection of duplicate rules and another
with detection of duplicate functions.
The question I have is in regards to this is, the current implementation
allows for rules and functions to be overridden by functions and rules
defined in different .drl files.
In order to not break backwards compatibility and allow people to continue
with this behavior we could just create a warning for these types of issues
which is reported through a new getProblems(ProblemType... problemTypes) to
get the problem types you are interested in, we will leave the legacy method
getErrors() for backward compatibility. Another approach or complementary
approach is to for certain types of these Warnings configure the compiler to
be more or less strict, which in turn would switch the Type of these issues
from Warning to Error. Is this something that's desirable or would it be
sufficient to just report these issues as warnings and leave the
responsibility to the user to halt execution if certain Warnings exists?
Kind Regards
Mikael (gwendo)
13 years, 4 months
drools-compiler: Inconsistent test rules in DRL and in XML.
by Mats Erik Andersson
Dear all,
I am working on the XML Schema (which needs repairing)
and the XML formulated rules. In doing so I have stumbled
across a discrepancy between the two rule formulations
drools-compiler/src/test/resources/org/drools/compiler/xml/\
rules/test_ParseRule.{drl,xml}
which I dare claim to be in error, unless they are ment to
express different rules!
The left-hand side in "test_ParseRule.drl" expresses the logic
foo2 : Bar( ... )
# implicit AND
not( ... )
# implicit AND
foo3 : Bar( ... )
or
foo4 : Bar( ... )
or
foo5 : Bar( ... )
or
foo6 : Bar( ... )
or
Baz()
Observe that foo3 up to foo6 and Baz are connected using OR connectives
of constant precedence. Still, observing this, the expected counterpart
test_ParseRule.xml of XML form expresses
<pattern identifier="foo2" ...> ... </pattern>
<!-- implicit AND -->
<not> ... </not>
<!-- implicit AND -->
<or-conditional-element>
<pattern identifier="foo3" ...> ... </pattern>
<pattern identifier="foo4" ...> ... </pattern>
</or-conditional.element>
<!-- implicit AND -->
<pattern identifier="foo5" ...> ... </pattern>
<!-- implicit AND -->
<pattern identifier="foo6" ...> ... </pattern>
<!-- implicit AND -->
<pattern identifier="foo7" ...> ... </pattern>
<!-- implicit AND -->
<pattern object-type="Baz" />
Hence foo5, foo6, foo6 and Baz have been ejected from the
OR-clause stipulated in the DRL file, instead being part
of the outer AND-clause.
My expectation is that either DRL or XML file be generated
after parsing from the other one, but the logical models
being different, I conclude one of the files to be in error.
Depending on hard-coded precedence model between AND and OR,
the "or-conditional-element" should encompass only foo3,
or the (the generally expected) all of "foo#". To single
out only foo3 and foo4 contradicts the mathematical logic
behind the contructs.
Best regards,
Mats Andersson
13 years, 4 months