Drools 8.33 Decision Table Need Empty Constraint

20 views
Skip to first unread message

Michael C. Starkie

unread,
Feb 17, 2023, 1:52:45 PM2/17/23
to Drools Usage
RSXTW.png
Hi,
I have been tasked with porting an old application that relies on Drools 2.5 to Java 11+
for which I decided you use the latest version of Drools (8.33).  I have a decision table in the form of an .xls file in production that will not compile in 8.33 without a re-write.  I have attached what I have re-written so far with much left to go but at this point it breaks.

The failure is at Rule #06 and the output at runtime is:

Rule Compilation error : [Rule name='O6'] 
fill cannot be resolved

Below is the LHS output for rule #06:

    when
        leg: Leg(securityType == "OPT")
        order: OrderMaster(capacity == "C")
    then
      
But what I need is a fill() with an empty constraint so that  the RHS can set values on it:

     when 
         leg: Leg( securityType == "OPT" ) 
         fill: Fill( )  // <-- I need this
         order: OrderMaster(capacity == "C")
     then
          fill.setFeeDetail(fill.getFeeDetail() + "," + "R3");
          ....

What am I missing in the table?

Thanks

Matteo Mortari

unread,
Feb 19, 2023, 9:04:34 AM2/19/23
to drools...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "Drools Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/91d9f242-2c2a-49bd-8d22-350d8336d379n%40googlegroups.com.


--
Reply all
Reply to author
Forward
0 new messages