[rules-users] rule condition problem in drools 5.5.0 Final

Wolfgang Laun wolfgang.laun at gmail.com
Fri Dec 27 07:48:51 EST 2013


Looks like a bug, try 5.6.0.

But I wonder about the strange way of writing this rule. A much
simpler way would be
    when
	todo: ToDoItemTO(status in ('DELAY'))
        not ToDoItemTO( this != todo )
    then

-W


On 27/12/2013, scarlettxu <xu_han_zi at 163.com> wrote:
> Hi expert,
>
> expect you can have a look of our problem and give any suggestions
>
> we are using drools 5.2.0 Final now, but we want to change to 5.5.0 Final
> in
> order to use some new features.
>
> while in the testing of 5.5.0 Final version, we find a problem below
>
> we have a simple testing rule as below
> rule "single todoitem_31"
> 	salience 65503
> 	activation-group "filter"
> 	when 		
> 		$list : List(size==1) from collect(ToDoItemTO() over window : length(2))
> 		todo:ToDoItemTO(status in ('DELAY'))
> 	then
> 		transToDoItems.add($list.get(0));
> 		logger.debug('rule1, size is '+$list.size()+', '+$list.get(0));
> end
>
> when we insert 1 fact into working memory, this rule can be fired. it is
> correct
> when we insert 2 facts into working memory, this rule cannot be fired. as
> the size in sliding window is 2 now. it is correct.
> then we test insert 3 facts, while this rule is fired. This is the problem,
> currently there should be 2 facts in the sliding window, we can print the
> size, the size is indeed 2. but why this rule will be fired?
>
> we test the same case in version 5.2.0 Final, there is no problem.
>
> Anyone know if this is a bug of 5.5.0 Final or we have wrong practice in
> writing the condition?
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/rule-condition-problem-in-drools-5-5-0-Final-tp4027434.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>


More information about the rules-users mailing list