Is it possible to use Excel formula and Drools functions in Excel based Decision Table rules ?
Environment
- Red Hat JBoss BRMS (BRMS)
- 6.0.0
Issue
- Is there a feature to use
Excel(spread sheet) based formulas inExcelbasedDecision Tablesso that the rule engine will be able to usedatediffor otherExcelbased functions in it's rules? - Is it possible to use
Drools functionsor customJava functionswritten in theDrools Model(e.g.) inside a cell ofExcelbasedDecision Tablerule ? So, it might look like the following to write this value in a cell of theExcelsheet.
calculateMyPayable(2,125)
Resolution
Excel Sheets(XLSfiles) areDecision Tablesand they are not extensions toDrools.- The scenario described above can draw multiple use cases as shown below.
1) Using a formula inExcel SheetsandDroolsuses the value generated by the formula. This option might work and might behave differently based on theExcelfile version. If it does not work a simpleExcelsheet copy , and paste as values, should generate a workingExcelsheet.
2) Using a formula inExceland Drools uses the value generated by the formula. This will not work, since Drools is not aware ofExcelformulas , 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.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
