[rules-users] Why no rule will be fired if class name and attribute name is same

richie haoruiqian at gmail.com
Tue Oct 22 20:45:22 EDT 2013


Why no rule will be fired if class name and attribute name is same?

Following is my drl file content:
package test

declare input
input : String
end

declare output
taskname : String
end

rule "Rule A"
dialect "mvel"
salience 0
no-loop
when
$input:input(input == "a")
$output:output()
then
modify ($output) {taskname = "Hello"};
end

But if I created a fact object of input and set attribute input to "a", it
did not fire any rules.



--
View this message in context: http://drools.46999.n3.nabble.com/Why-no-rule-will-be-fired-if-class-name-and-attribute-name-is-same-tp4026466.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list