I have the same problem with BRL editor under eclipse. Also the action
part dialog box does not show DSL phrases ...
The plugin is incomplete/buggy and shows errors but rules are correct
(you can compile and run them).
This problem is the same since version 5.0. There is a JIRA for that
since then ...
I don't know when a fix is planned, but my feeling is that nobody uses
the guided editor under eclipse (dsrl editor works well and provide
completions on facts and DSL sentences). But it is not easy when you
have rules that comes from Guvnor ...
Le 15/03/2011 20:47, John Peterson a écrit :
I am experimenting with the Guided Rule Editor in Eclipse, but I am
unable to get a Guided Rule to parse.
I have created a Drools Project using the basic "Hello World" example
for starters. I've created a class called "Item" with 3 attributes --
itemPrice (float), ItemNumber (int), and itemDescription (String) with
getters/setters. I do a "New-Drools-Guided Rule" to create a .brl
file called "GuidedRule.brl" and get the "drools.package" created
automatically. In drools.package, I add "package com.sample;" and
"import com.sample.Item;" and save it.
Then I go over to GuidedRule.brl and create a simple rule in the
guided editor (this is the DRL view of it):
rule "GuidedRule"
dialect "mvel"
when
item : Item()
then
item.setItemDescription("New Description");
end
When I click "save" I get errors.
On the Generated drl (read only), I get two problems ->
BuildError: Unable to build expression for 'consequence': Failed to
compile: 2 compilation error(s):
- (1,4) unqualified type in strict mode for: item
- (1,44) unable to resolve method using strict-mode:
java.lang.Object.setItemDescription(java.lang.String) '
item.setItemDescription( "New Description" );'
On the brl source view, I get an error at the <attributes> ->
BuildError: Unable to resolve ObjectType 'Item'
It seems to not be able to see my class, which is public, belonging to
the same package, and included as an import in drools.package. I can
get the rule to work if I don't reference Item (simple "eval(true)" in
the LHS, for example)....
I am running Drools 5.1.1 on Eclipse 3.5.
Am I overlooking something simple here?
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Vincent LEGENDRE
/Consultant Sénior/
EURODECISION
9A rue de la Porte de Buc 78000 VERSAILLES
Tél. : +33 (0)1 39 07 12 40
Direct : +33 (0)1 39 07 26 16
www.eurodecision.com
EURODECISION <
http://www.eurodecision.com/><http://www.eurodecision.com/>