The new rules module
LF‑ET generates a rules module with the following adjustments from the decision table:
-
The rules module now operates stateless and generic, i.e. the type is an additional parameter in all methods
-
Method names for enums are more descriptive
-
no longer isEnum or doEnum
-
but e.g. isPurchaseOrdervalue
-
-
The names of enum values are derived from symbols
-
no longer $001, $002, $003, …
-
but e.g. $LESS2000, $20007500, …
-
-
An additional Trace code that is called AFTER each rule execution
// *** WARNING: DO NOT MODIFY *** This is a generated Java source code!
//
// Generated by LF-ET 2.4.1 (260219a), https://www.lohrfink.de/lfet
// From decision table
// "/src/main/resources/lfet/demo/InvoiceTotal.lfet"
// 24.02.2026 15:42
//
// Prolog Standard ---->
// profile LFET.Java.Prolog.Standard.Interface.Dt.ini not found
// used LF-ET 2.4.1 (260219a) build in default
package lfet.demo;
import javax.annotation.processing.Generated;
@Generated("LF-ET")
public class InvoiceTotal_rulesEngine
{
public <T> void execute(InvoiceTotal_iFace<T> iface, T model)
{
// Prolog Standard <----
if (iface.isPurchaseOrderValue(InvoiceTotal_iFace.PurchaseOrderValue.$LESS2000, model) /* < 20.00 - low */)
{
// Rule R01 ---->
iface.doTrace("InvoiceTotal", " 20260224.154217", 7, 1, model);
iface.doCalculateShippingCosts(model);
iface.doInvoiceTotal_Upd(model);
iface.doTraceAfterRule("InvoiceTotal", " 20260224.154217", 7, 1, model);
// Rule R01 <----
}
else if (iface.isPurchaseOrderValue(InvoiceTotal_iFace.PurchaseOrderValue.$20007500, model) /* 20.00 - 75.00 - normal */)
{
if (iface.isDiscount_Greater0(model))
{
if (iface.isDiscountType_PercentageDiscountOnThePurchaseOrderValue(model))
{
// Rule R02 ---->
iface.doTrace("InvoiceTotal", " 20260224.154217", 7, 2, model);
iface.doApplyDiscount(model);
iface.doCalculateShippingCosts(model);
iface.doInvoiceTotal_Upd(model);
iface.doTraceAfterRule("InvoiceTotal", " 20260224.154217", 7, 2, model);
// Rule R02 <----
}
else // Discount type EUR - fixed amount, will be deducted from the purchase order value
{
if (iface.isDiscountLessPurchaseOrderValue(model))
{
// Rule R03 ---->
iface.doTrace("InvoiceTotal", " 20260224.154217", 7, 3, model);
iface.doApplyDiscount(model);
iface.doCalculateShippingCosts(model);
iface.doInvoiceTotal_Upd(model);
iface.doTraceAfterRule("InvoiceTotal", " 20260224.154217", 7, 3, model);
// Rule R03 <----
}
else // Discount < Purchase order value N - No
{
// Rule R04 ---->
iface.doTrace("InvoiceTotal", " 20260224.154217", 7, 4, model);
iface.doCalculateShippingCosts(model);
iface.doInvoiceTotal_Upd(model);
iface.doTraceAfterRule("InvoiceTotal", " 20260224.154217", 7, 4, model);
// Rule R04 <----
}
}
}
else // Discount none - no discount given
{
// Rule R05 ---->
iface.doTrace("InvoiceTotal", " 20260224.154217", 7, 5, model);
iface.doCalculateShippingCosts(model);
iface.doInvoiceTotal_Upd(model);
iface.doTraceAfterRule("InvoiceTotal", " 20260224.154217", 7, 5, model);
// Rule R05 <----
}
}
else // Purchase order value > 75.00 - high
{
if (iface.isDiscount_Greater0(model))
{
// Rule R06 ---->
iface.doTrace("InvoiceTotal", " 20260224.154217", 7, 6, model);
iface.doApplyDiscount(model);
iface.doInvoiceTotal_Upd(model);
iface.doTraceAfterRule("InvoiceTotal", " 20260224.154217", 7, 6, model);
// Rule R06 <----
}
else // Discount none - no discount given
{
// Rule R07 ---->
iface.doTrace("InvoiceTotal", " 20260224.154217", 7, 7, model);
iface.doInvoiceTotal_Pov(model);
iface.doTraceAfterRule("InvoiceTotal", " 20260224.154217", 7, 7, model);
// Rule R07 <----
}
}
// Epilog Standard ---->
// profile LFET.Java.Epilog.Standard.Interface.Dt.ini not found
// used LF-ET 2.4.1 (260219a) build in default
}
}
// Epilog Standard <----
// End of generated Java source code
// Generated by LF-ET 2.4.1 (260219a), https://www.lohrfink.de/lfet