[JBoss JIRA] (DROOLS-5019) Unexpected rule match with forall pattern
by Mario Fusco (Jira)
[ https://issues.redhat.com/browse/DROOLS-5019?page=com.atlassian.jira.plug... ]
Mario Fusco resolved DROOLS-5019.
---------------------------------
Resolution: Done
Fixed by https://github.com/kiegroup/drools/commit/d8adda09763b0f61048a09b45824f51...
> Unexpected rule match with forall pattern
> -----------------------------------------
>
> Key: DROOLS-5019
> URL: https://issues.redhat.com/browse/DROOLS-5019
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 7.29.0.Final, 7.30.0.Final, 7.31.0.Final, 7.32.0.Final
> Reporter: Matteo Casalino
> Assignee: Mario Fusco
> Priority: Major
> Attachments: forall-unwanted-match.tgz
>
>
> As of Drools 7.29.0.Final, rules with a forall pattern sometimes won't match as expected.
> In particular we notice that adding an extra (apparently unrelated) rule causes the rule containing forall to fire when it is not expected to. No inference is involved.
> Example of DRL behaving as expected:
> {noformat}
> package org.drools.reproducer
> declare Request
> skippne : boolean
> pneeligid : String
> applicableAirlines : java.util.List
> officeid : String
> end
> declare Flight
> id : int
> marketingairlinecode : String
> cabin : String
> end
> declare Offer
> id : int
> flightIds : java.util.List
> boundIds : java.util.List
> passengerId : int
> notificationFlightId : int
> stayDurationBeforeDeparture : int
> end
> declare Passenger
> id : int
> end
> rule "53_54_55_NotificationTestInterlineAllFlight"
> when
> Offer( $thisOfferId: id, $offerFlightIds : flightIds, $offerBoundIds : boundIds, $thisPassengerId: passengerId, $thisNotificationFlightId: notificationFlightId )
> Flight( id == $thisNotificationFlightId, $offerFlightIds contains id )
> Passenger( id == $thisPassengerId )
> Request( $skippne: skippne, pneeligid == "100000053" || skippne, $applicableAirlines: applicableAirlines )
> forall(
> $fact : Flight( $applicableAirlines contains marketingairlinecode )
> Flight( this == $fact, cabin == "Y" ) )
> then
> System.out.println("53_54_55_NotificationTestInterlineAllFlight");
> end
> rule "2_SmsNotificationCheckinTestFNDCall"
> when
> Offer( $thisOfferId: id, $thisPassengerId: passengerId, $thisNotificationFlightId: notificationFlightId, $offerFlightIds : flightIds, $offerBoundIds : boundIds, $stayDurationBeforeDeparture: stayDurationBeforeDeparture )
> Flight( id == $thisNotificationFlightId, $offerFlightIds contains id, $thisFlightId: id )
> Passenger( id == $thisPassengerId )
> Request( $skippne: skippne, pneeligid == "checkin" || skippne, $applicableAirlines: applicableAirlines )
> Flight( id == $thisNotificationFlightId, $offerFlightIds contains id, $applicableAirlines contains marketingairlinecode, cabin == "L" )
> then
> System.out.println("2_SmsNotificationCheckinTestFNDCall");
> end
> {noformat}
> Example of DRL not behaving as expected (the 53_54_55_NotificationTestInterlineAllFlight rule will now fire when the forall clause is not satisfied):
> {noformat}
> package org.drools.reproducer
> declare Request
> skippne : boolean
> pneeligid : String
> applicableAirlines : java.util.List
> officeid : String
> end
> declare Flight
> id : int
> marketingairlinecode : String
> cabin : String
> end
> declare Offer
> id : int
> flightIds : java.util.List
> boundIds : java.util.List
> passengerId : int
> notificationFlightId : int
> stayDurationBeforeDeparture : int
> end
> declare Passenger
> id : int
> end
> rule "53_54_55_NotificationTestInterlineAllFlight"
> when
> Offer( $thisOfferId: id, $offerFlightIds : flightIds, $offerBoundIds : boundIds, $thisPassengerId: passengerId, $thisNotificationFlightId: notificationFlightId )
> Flight( id == $thisNotificationFlightId, $offerFlightIds contains id )
> Passenger( id == $thisPassengerId )
> Request( $skippne: skippne, pneeligid == "100000053" || skippne, $applicableAirlines: applicableAirlines )
> forall(
> $fact : Flight( $applicableAirlines contains marketingairlinecode )
> Flight( this == $fact, cabin == "Y" ) )
> then
> System.out.println("53_54_55_NotificationTestInterlineAllFlight");
> end
> rule "2_SmsNotificationCheckinTestFNDCall"
> when
> Offer( $thisOfferId: id, $thisPassengerId: passengerId, $thisNotificationFlightId: notificationFlightId, $offerFlightIds : flightIds, $offerBoundIds : boundIds, $stayDurationBeforeDeparture: stayDurationBeforeDeparture )
> Flight( id == $thisNotificationFlightId, $offerFlightIds contains id, $thisFlightId: id )
> Passenger( id == $thisPassengerId )
> Request( $skippne: skippne, pneeligid == "checkin" || skippne, $applicableAirlines: applicableAirlines )
> Flight( id == $thisNotificationFlightId, $offerFlightIds contains id, $applicableAirlines contains marketingairlinecode, cabin == "L" )
> then
> System.out.println("2_SmsNotificationCheckinTestFNDCall");
> end
> rule "3_XmlNotificationCheckinTestFNDCall"
> when
> Offer( $thisOfferId: id, $thisPassengerId: passengerId, $thisNotificationFlightId: notificationFlightId, $offerFlightIds : flightIds, $offerBoundIds : boundIds, $stayDurationBeforeDeparture: stayDurationBeforeDeparture )
> Flight( id == $thisNotificationFlightId, $offerFlightIds contains id, $thisFlightId: id )
> Passenger( id == $thisPassengerId )
> Request( $skippne: skippne, pneeligid == "checkin" || skippne, $applicableAirlines: applicableAirlines )
> Flight( id == $thisNotificationFlightId, $offerFlightIds contains id, $applicableAirlines contains marketingairlinecode, cabin == "Q" )
> then
> System.out.println("3_XmlNotificationCheckinTestFNDCall");
> end
> {noformat}
> The issue does not occur when using Drools <= 7.28.0.Final.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 8 months
[JBoss JIRA] (DROOLS-5025) Wrong BitMask created by a complex setter argument in modify block
by Toshiya Kobayashi (Jira)
[ https://issues.redhat.com/browse/DROOLS-5025?page=com.atlassian.jira.plug... ]
Toshiya Kobayashi updated DROOLS-5025:
--------------------------------------
Summary: Wrong BitMask created by a complex setter argument in modify block (was: Wrong BitMask created by c)
> Wrong BitMask created by a complex setter argument in modify block
> ------------------------------------------------------------------
>
> Key: DROOLS-5025
> URL: https://issues.redhat.com/browse/DROOLS-5025
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Affects Versions: 7.32.0.Final
> Reporter: Toshiya Kobayashi
> Assignee: Luca Molteni
> Priority: Major
>
> With a complex setter argument in modify block like this:
> {noformat}
> import org.drools.modelcompiler.domain.Person;
> rule R
> when
> $p: Person(address.street == "street1")
> then
> modify($p) { setLikes( String.valueOf(($p.getAddress().getStreet() + $p.getAddress().getCity()))) };
> end
> {noformat}
> executable model creates BitMask for "likes" and "address" thus causes a wrong property reactivity behavior.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 8 months
[JBoss JIRA] (DROOLS-5026) Remove blinkinking in Test Tools pannel
by Anna Dupliak (Jira)
Anna Dupliak created DROOLS-5026:
------------------------------------
Summary: Remove blinkinking in Test Tools pannel
Key: DROOLS-5026
URL: https://issues.redhat.com/browse/DROOLS-5026
Project: Drools
Issue Type: Enhancement
Components: Scenario Simulation and Testing
Affects Versions: 7.30.0.Final
Reporter: Anna Dupliak
Assignee: Yeser Amer
Attachments: Screencast from 02-07-2020.webm
Change Test Tools behavior to stop blinking every time when
focus in *Grid* are moving through *Header*.
Now if you move focus in *Grid* particularly for *Header*
rows (by using keyboard arrows keys) then Test Tools icon blinks.
That is not happening with values in the Grid.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 8 months