expert mailing list
by Mark Proctor
As the user list is now high volume, i'm contemplating an "invite only" expert list. I'm not sure who this would work, or if it's practical. But the idea is to have a lower volume list, with a higher quality of technical questions and discussions. This might make it easier for people to be engaged.
I'm thinking of doing it as a google group "drools-expert-group" or something.
I'm not entirely sure how to decide who gets an invite or not…. as it's very arbitrary. I guess in general anyone who gets a recommendation for someone on the list, gets an invite. But I'm open to other ideas to run this.
Ideally we should be able to setup a number of moderators, that can handle this invite list, including people from the community. Although not sure if google groups supports this, need to find out.
Anyway would like to here what people think, and would be interest to see alternative ways to do this. Maybe you can point to existing setups, that manage this sort of situation, that we can copy?
Mark
13 years, 8 months
trouble getting rule debugging to work in eclipse
by Frank Wilson
Hi droolers!
I installed the Drool Eclipse 5.4.0 Final plugin into an Indigo SR2 installation of eclipse and found I could not get the rule debugger to work.
I created a standard rules runtime for my workspace. Then I created a drools project with the HelloWorld rule and the sample loader java class. I then set some break points in the consequent parts of both the "Hello World" and "Goodbye" rules. I then right-clicked on DroolTest.java->Debug As->Drool Application. However, the debugger did not pause on the break points as I expected. This was despite the fact the program gave the expected output:
Hello World
Goodbye cruel world
If I put breakpoints in java code the debugger pauses there as expected.
Any idea where I might be going wrong here?
Thanks,
Frank
13 years, 8 months
How to use reference guided table cell value in BRL fragment using DSL
by jasonxzhong
I am trying to figure out how to use DSL terms in BRL fragment to construct a
column in a guided decision table.
I have the following definition in DSL
[condition][] Registration data has properties = RuleData()
[condition][] - {expression}{value} = {expression}{value}
In a guided decision table I'd like to add a condition column and I want to
use the DSL terms to do this. So I chose to add a condition BRL fragment:
Registration data has properties
- flagChange == [value]
I want the [value] to be the value from the condition column. Can this be
done and if so what do I use to indicate that the [value] should be the
condition column value instead of a literal value?
Thanks,
- Jason
--
View this message in context: http://drools.46999.n3.nabble.com/How-to-use-reference-guided-table-cell-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 8 months
Handling maps in Drools
by Manav
Hi,
I am facing an issue with handling maps in LHS of drools. Appreciate your help with the same.
I am using Drools version 5.1.
I have two maps where one is a reference map that contains certifications (key) and scores(value) required and other is map of user's actual certifications and scores. Objective is to find the certifications from users map based on keys in the reference map . Then for these certifications sum the score values and check if they cross the threshold.
While trying to do the first step i am facing an issue . My rule looks like this :-
rule "Map test"
when
$rb : Certifications($reqCertificationKeys : requiredCertifications.keySet)
$user : User($userCertifications : userCertifications)
$arg : String() from $reqCertificationKeys
HashMap ($value : this[$arg] != null) from $userCertifications // Does not work
then
System.out.println ("Hash Map" + $arg);
end
However if i change the above line that has issues with below
HashMap ($value : this["Java"] != null) from $userCertifications // Works
Is there a way to replace the key with a variable than with a fixed value ? Is it possible to iterate the second map with the key values that we get from the reference map ?
Regards,
Manav
13 years, 8 months
Designer: How to assign/map attributes inside complex objects?
by xmithj
The *Editor for Data Assignments* allows to map a *From Object* to *To
Object*. Very nice! However attributes inside complex objects are not shown
preventing me from map to them. Let me clarify:
My *To Object* represents a *Person* object and has two attributes: *name*
and *surname*.
These 2 attributes are of type String and public (exposed through getters
and setters). But the* Editor for Data Assignments* only shows the *Person*
object (doesn't show its attributes), preventing me from map my * From
Object* to Person.surname.
I also tried to bypass the *Editor for Data Assignments* by writing directly
into the *Assignments* property something similar to this:
recordedName -> Person.surname
but I get an exception when building the package.
Is there any work around to achieve these type of assignment? Will this
functionality be built in Designer's *Editor for Data Assignments* future
release?
Thanks for help.
--
View this message in context: http://drools.46999.n3.nabble.com/Designer-How-to-assign-map-attributes-i...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 8 months
Trouble using || operator and after evaluator in constraints in 5.4.0.Final
by abr
Hi everyone,
I've tried to go from Drools 5.3.0.Final to 5.4.0.Final and some strange
errors appeared on constraints using the after evaluator and the ||
operator.
For instance, considering these 2 objects :
public class MyObject {
private Date myDate;
public MyObject(Date myDate) {
super();
this.myDate = myDate;
}
public Date getMyDate() {
return myDate;
}
public void setMyDate(Date myDate) {
this.myDate = myDate;
}
}
public class MyObjectList {
private List<MyObject> myObjectList;
public MyObjectList() {
super();
this.myObjectList = new ArrayList<MyObject>();
}
public List<MyObject> getMyObjectList() {
return myObjectList;
}
public void setMyObjectList(List<MyObject> myObjectList) {
this.myObjectList = myObjectList;
}
public void addObject(MyObject myObject) {
this.myObjectList.add(myObject);
}
}
This rule:
rule "Sample rule"
when
CurrentDate( $now: now )
$list: MyObjectList()
$obj: MyObject(
this memberOf $list,
( myDate == null ||
myDate after[ 5d ] $now ) )
then
System.out.println( "Sample rule activated" );
end
Provokes the following error:
Unable to Analyse Expression $list contains this && ( myDate == null ||
after0.evaluate( myDate, $now ) ):
[Error: unable to resolve method using strict-mode:
com.sample.MyObject.after0()]
[Near : {... ( myDate == null || after0.evaluate( myDate, $now ....}]
^ : [Rule name='Sample rule']
This worked very well in Drools 5.3.0.Final.
The strangest thing about this issue is that, if I change the || into a &&,
compilation works correctly!
Is there some configuration specific to Drools 5.4.0.Final that I've missed
in the release notes?
Thanks in advance for your help.
Best,
Alexis
--
View this message in context: http://drools.46999.n3.nabble.com/Trouble-using-operator-and-after-evalua...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 8 months
How to trigger update when modifying a list attribute?
by Paulo Reis
Hi guys,
I'm having the follow issue: I have an object that contains a list. The object is inserted on the memory but not the list, so I want to do something like this:
when
$obj: Object()
eval($obj.hasInList("item"))
then
$obj.replaceInList("item", "replacement");
end
How do I trigger the update for $obj? I've tried to add Java Beans support but that didn't help, neither @watch nor @PropertyChangeSupport on java class.
Im watching the debug but don't see the object being modified and I've rules that were triggered that shouldn't be because the value was already changed.
Inserting the list on the working memory won't help me, as I need to search like this:
when
$obj: Object()
eval($obj.hasInList("item item1 item2 item3"))
then
$obj.replaceInList("item item1 item2 item3", "singleItem")
end
The example above search for several items (each one is a list element), so I need to replace them all for a single element.
Any thoughts?
Thanks in advance.
Paulo Reis
casmeiron(a)gmail.com
13 years, 8 months