Is it possible to use Excel formula and Drools functions in Excel based Decision Table rules ?

Solution Unverified - Updated -

Environment

  • Red Hat JBoss BRMS (BRMS)
    • 6.0.0

Issue

  • Is there a feature to use Excel (spread sheet) based formulas in Excel based Decision Tables so that the rule engine will be able to use datediff or other Excel based functions in it's rules?
  • Is it possible to use Drools functions or custom Java functions written in the Drools Model (e.g.) inside a cell of Excel based Decision Table rule ? So, it might look like the following to write this value in a cell of the Excel sheet.
calculateMyPayable(2,125)

Resolution

  • Excel Sheets(XLS files) are Decision Tables and they are not extensions to Drools.
  • The scenario described above can draw multiple use cases as shown below.
    1) Using a formula in Excel Sheets and Drools uses the value generated by the formula. This option might work and might behave differently based on the Excel file version. If it does not work a simple Excel sheet copy , and paste as values, should generate a working Excel sheet.
    2) Using a formula in Excel and Drools uses the value generated by the formula. This will not work, since Drools is not aware of Excel formulas , and having a formula contradicts the concept of a decision table.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.