Hey there!
If you're running SAP Commerce Cloud and starting to think about your JDK 21 migration, there's one topic you definitely don't want to skip: Promotions and the Drools Rule Engine.
Let's have a straight, no-nonsense conversation about what changed, why it matters, and what you actually need to do.
So… What's the Big Deal?
The most critical change for the Promotion Engine in the JDK 21 context is the mandatory upgrade from Drools 8.44.x to Drools 10.1.x, available starting from release 2211-jdk21.1 (September 2025).
And yes — this is not optional. But don't worry, we'll walk you through it!
You can check everything we're covering here in the official documentation: Drools Update.
Why Did This Change Happen?
The motivation is pretty straightforward:
- Drools 8.44.0.Final is not compatible with Spring 6 — Spring 6 migrated from Java EE to Jakarta EE APIs, which broke the integration with older Drools versions
- Both Drools 8 and Drools 9 were approaching end of maintenance, representing security and stability risks in the long run
Here's a quick comparison to put things in perspective:
Component JDK 17 JDK 21 Drools 8.44.* 10.1.*
Spring Framework Spring 5.x Spring Framework 6.2
Okay, But What Does This Actually Mean for My Commerce Cloud?
Great question! Here's what you need to keep in mind:
KIE Session usage patterns are changing. The KIE Session usage patterns in Drools 10 have changed compared to Drools 8 — any customizations that interact directly with the Rule Engine will need to be reviewed and updated.
RRD Objects and RAO Simplifications. The RAO model has been simplified in recent versions — ProductRAO, CategoryRAO, and ProductConsumedRAO have been removed, with their attributes moved to OrderEntryRAO. Any customizations referencing these classes directly will break after the migration.
Not All Drools 10 Builds Are the Same — Check Your Library Version
This is a detail that's easy to miss but matters a lot: which exact Drools 10 build you land on depends on which 2211-jdk21.x release you're on.
- Before 2211.JDK21.9, the Drools library used is drools-base-10.0.0.jar.
- From 2211.JDK21.9 onward, the Drools library used is drools-base-10.1.0.jar.
Why does this matter? drools-base-10.0.0.jar does not yet include the fix for DROOLS–7629. drools-base-10.1.0.jar does.
If this sounds familiar, it should, it's the same class of issue behind the “DOES NOT CONTAIN” regression described below, and behind KBA 3515578 and the related fix delivered for Drools 8 via SAP's own patched Drools library, documented in SAP Note 3520729. The Drools 8 fix actually has two parts: a change to the DRL generation logic, and the patched Drools library itself. Both parts need to be in place for the fix to work.
Why this matters for customizations: if you have a customization that overrides the out-of-thebox DRL generation logic and produces DRL similar to the pattern described in KBA 3515578, and you upgraded to a release before 2211.JDK21.9 (i.e., you're still on drools-base-10.0.0.jar), you could hit the same underlying issue again on Drools 10 — because the library-side fix for it (DROOLS-7629) simply isn't there yet in that build.
To be clear, this isn't a reason to panic, most customers won't have a custom DRL generation path that reproduces this specific pattern. But if your team does have custom DRL generation logic, it's worth a quick check against the KBA before you finalize your migration plan.
Our recommendation: target the latest available 2211-jdk21.x release (2211.JDK21.9 or later) so you land on drools-base-10.1.0.jar with the DROOLS-7629 fix already included, rather than an earlier build that still carries the gap.
Watch Out: The “DOES NOT CONTAIN” Operator Regression
This is one you'll want to add to your regression test checklist specifically.
SAP has previously documented an issue (KBA 3515578) where, after a Drools engine upgrade, the Qualifying product/category condition using the “DOES NOT CONTAIN” operator stops working correctly for order-entry-related conditions. The rule evaluation fails with a NullPointerException (Cannot invoke
“org.kie.api.runtime.rule.FactHandle.getObject()” because “fh” is null”), and as a result, the promotion simply doesn't fire — often with no obvious error visible to the business user.
This was originally reported against the Drools 8 upgrade, but it's exactly the kind of engineinternal regression class that tends to resurface across major Drools version jumps — including Drools 8 → 10, and specifically on drools-base-10.0.0.jar builds prior to the DROOLS-7629 fix (see above). If your promotions rely on “does not contain” conditions against order entries (a very common pattern for exclusion rules, e.g., “give 10% off unless the cart contains product X”), treat this as a specific, named test case in your Drools 10 regression suite, not just a general “retest promotions” checklist item.
What's the Deadline?
Here's the important part: mark your calendar!
The Drools update is classified as Required / Automatically on starting from version 2211-jdk21.1, with an adoption deadline of August 31, 2026.
What Happens If You Don't Update?
This isn't a “nice to have someday” item — it's tied to a hard deadline, and skipping it has real consequences for the business:
- You lose security and stability coverage. Drools 8 and 9 are approaching end of maintenance. Running an unsupported rule engine version means no more fixes for security vulnerabilities or stability issues in the component that decides how much money comes off every order.
- The risk compounds the longer you wait. Every rule that isn't retested against Drools 10 behavior — and every build that stays on an early drools-base-10.0.0.jar release instead of moving to 10.1.0.jar — is a rule that can misfire, throw errors, or silently not apply at checkout (see the “DOES NOT CONTAIN” issue above) right at the moment a customer expects a discount. That's lost conversions, support tickets, and manual discount corrections, not just an engineering backlog item.
Wrapping Up
Migrating to JDK 21 brings a lot of great improvements, but the Drools upgrade is the key piece you can't ignore when it comes to Promotions. The good news? SAP has provided clear documentation and a reasonable timeline to make this transition as smooth as possible.
Take the time to review your customizations (especially anything touching DRL generation or the KIE Session directly), target 2211.JDK21.9 or later, and retest your promotion flows — and you'll be in great shape!
Source link