@PropertyReactive optimizations broken when using 'this' keyword
by mikegai
I'm getting activations that I shouldn't when using the 'this' keyword on
@propertyReactive objects. Here's a simplified example:
package bug
dialect "mvel"
declare Monkey
@propertyReactive
name:String
emotion:String
hot : boolean
end
declare Barrel
@propertyReactive
topMonkey:Monkey
end
rule "Initial Facts" when
then
monkey =new Monkey("Thomas","sad", false)
insert (monkey)
insert (new Barrel(monkey))
insert (new MonkeySuit(monkey, false))
end
//This will loop forever even it shouldn't (it's not modifying any of the
properties in the constraint)
//To fix, reinstate the watch annotation below to correct the watched
property list
rule "When a monkey is on top and his name is Thomas he should be made
happy" when
Barrel($monkey: topMonkey)
Monkey(this==$monkey, name=="Thomas" ) //@watch(!*,name)
then
System.out.println($monkey.getName() + " should be happy!")
modify ($monkey) {
setEmotion("happy")
}
end
It's only when using the "this" keyword. Apparently it is including the
"this" in the inferred property watch list since when I clear the watch list
and rebuild it correctly using the @watch annotation, all works fine.
Has the "this" keyword been deprecated? I can't see any sign that it has so
this appears to be a bug. For now I'm getting it to work by matching my
facts on unique Ids instead of "this" but "this" is handier when an Id
property is unavailable.
--
View this message in context: http://drools.46999.n3.nabble.com/PropertyReactive-optimizations-broken-w...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 9 months
modify keyword cancels activation unexpectedly
by gboro54
I am using drools 5.4 and am running into a weird issue with using modify
keyword. I have have two rules, both are similar in conditions(one rule
catches 2 additional cases to modify the object with a generic message).
Weather I add the checks for each rule into the into the generic rule or
have a condition checking the object for the more specific messages to be
added, the modify keyword seems to ignore this. In the case where the
conditions are added to the generic rule independent the activation is
cancelled. Any thoughts? I do have property reactive on...
--
View this message in context: http://drools.46999.n3.nabble.com/modify-keyword-cancels-activation-unexp...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 9 months
Guvnor 5.4 CR1 role based authentication with JBossAS 7
by bhochhi
Hello,
Has anybody successfully set up the role based authentication on Guvnor 5.4
CR1 hosted on Jboss AS7? I tried all possible way I could think of but in
vain. I modified bean.xml(commented <security:IdentityImpl> in whole and
uncommented <security:jaas.JaasAuthenticator> and
<guvnorSecurity:RoleBasedPermissionResolver> ). I also replaced
code="UsersRoles" for <security-domain name="other" cache-type="default">
under <login-module> in standalone.xml. Could anyone please help me how to
configure role-based authentication for guvnor based on properties files? Is
was so obvious on 5.3 or former. But this new 5.4 looks so different.
Thanks
--
View this message in context: http://drools.46999.n3.nabble.com/Guvnor-5-4-CR1-role-based-authenticatio...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 9 months
Guvnor WS Constraints not getting activated
by Kannan Murali
Hi,
I tried to add field constraints to the condition and action columns in my
rules. I am using a Decision table (Web guided editor) to input my rules.
Even after adding the constraints I was able to save rules that violated
them. I read in another post that working sets have to be activated
manually. I dont see any option to do that. I am using Guvnor version
5.4.0.Final. Attaching the screenshots of the constraint and the new rule.
Thanks
Kannan
13 years, 9 months
Drools Decision Table, multiple actions accumulation
by chsekhar
I am doing a similar example as described in this example in the link from
jboss website and go the section "6.1.3. How Decision Tables Work". (I have
attached the image as well)
http://drools.46999.n3.nabble.com/file/n4017733/example_decision_table.png
http://docs.jboss.org/drools/release/5.2.0.Final/drools-expert-docs/html/...
Drools documentation
In the example they are populating a "list" in the ACTION. So if a fact
matches couple of rows in the decision table, the list would contain those
two items.
My requirement is I need to have key value pair(Map) as my rule
consequence(ACTION). I was able to do one action which has "key,value" in a
single column and I was able to work with that. I am trying to find out if i
can have these values in two columns separately in the excel. (My key
actually contains 3 values and combining this with value looks messy. ex:
k1,k2,k3,value. So if can put the value in a separate column it would be
great)
I tried to create a global variable and called setter methods on separate
columns, but the problem is the setters in both the columns(ACTION) run
independently whereas I had to put both of them in a map which would mean I
should be able to pass the value present in both the columns in one method
call.
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-Decision-Table-multiple-actions-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 9 months
drools.packagebuilder.conf
by Matteo Cusmai
Hi all,
i have developed some custom evaluators, and all worked fine with drools
5.3.
I put the file in object under my home folder.
I would like to pass to 5.4 final, but it doesn't read that file.
Where does it find the file?
Thanks a lot,
Matteo.
13 years, 9 months
need help or any links customizing guvnor
by Abdullah Shaikh
Hi,
I am new to drools & guvnor. I was able to create simple drl file and
run from classpath and from guvnor too using url.
I saw that we can create rules in guvnor but I want to know if we can
provide UI for creating rules ? I am not sure but I think what I want
is guided editor ?
Thanks,
Abdullah
13 years, 9 months