All my conditions in one rule are true but the “then” statement does not execute

I have two rules:

// rule values at B31, header at B7
rule "Regular Cms Recalc Hierarchy Table_31"
    salience 65516
    when
        $rcri: RegularCmsRecalcInfo(myIsHandled(false), myGetCommissionModelId(9318), myGetProductTypeId(3073), eval(RuleDateParser.isAfterOrEqual($rcri.myGetPolicyStartDate("1.1.1800"), "1.1.1800")), eval(RuleDateParser.isBeforeOrEqual($rcri.myGetPolicyStartDate("31.12.2999"), "31.12.2999")), eval(RuleDateParser.isAfterOrEqual($rcri.myGetContractDate("1.1.1800"), "1.1.1800")), eval(RuleDateParser.isBeforeOrEqual($rcri.myGetContractDate("31.12.2999"), "31.12.2999")))
    then
        $rcri.mySetCmsFullWithdrawalCutoffPastMonths(6);
        $rcri.mySetCmsNoWithdrawalCutoffPastMonths(30);
        $rcri.mySetLevelingType("PAID_MONTHS");
        $rcri.setHandled(true);update($rcri);
end

// rule values at B37, header at B7
rule "Regular Cms Recalc Hierarchy Table_37"
    salience 65510
    when
        $rcri: RegularCmsRecalcInfo(myIsHandled(false), myGetCommissionModelId(9318), eval(RuleDateParser.isAfterOrEqual($rcri.myGetPolicyStartDate("1.1.1800"), "1.1.1800")), eval(RuleDateParser.isBeforeOrEqual($rcri.myGetPolicyStartDate("31.12.2999"), "31.12.2999")), eval(RuleDateParser.isAfterOrEqual($rcri.myGetContractDate("1.1.1800"), "1.1.1800")), eval(RuleDateParser.isBeforeOrEqual($rcri.myGetContractDate("31.12.2999"), "31.12.2999")))
    then
        $rcri.mySetCmsFullWithdrawalCutoffPastMonths(6);
        $rcri.mySetCmsNoWithdrawalCutoffPastMonths(24);
        $rcri.mySetLevelingType("PAID_MONTHS");
        $rcri.setHandled(true);update($rcri);
end

The first rule has the priority over the second one and the condition is basically the same. The first rule has one more check that the second one: myGetProductTypeId(3073). The first rule does not execute code in the “then” statement but the second one does. That would make sense if the object sent trough would fail on myGetProductTypeId(3073), but that condition also passes for that object. So I’m just confused why it does not execute the first one. Am I missing something?

To get more insight into this issue I created this “my” methods. So all the methods called in the rules that have “my” in the name are methods that I wrote to debug/log the issue. With that I figured out what I described above.
First I thought that I had a problem with myIsHandled() method because it used to be at the end of the condition and all previous conditions passed, but now that I moved it to the front nothing changes. It passes normally and so do all other conditions after in the rule.

Edit: After an even more in depth review I noticed that the “then” statement of the first rule actually gets executed but not before other rules are checked.
So first the rule B31 is checked and every condition is true, the “then” statement does not execute even though it should. Then all the rules from B32 to B36 are checked and they fail on condition which is right behavior. Then rule B37 is checked and every condition is true, and B31 “then” statement is executed.

This is even more confusing to me. Why check other rules before executing the one that was already right? If the statement would execute at the right time, the second rule would already fail on myIsHandled(false).

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật