Hi,
I am not sure if you are using Excel to write up the decision tables.. But I found that the Spreadsheet Compiler honours the values that the XLS formulas calculate.
For example:
If I have a table where the "Row values" start at A20. I can put into A20 .. =$X$1 & "some value" & $Y$2
or
in A21 .. =A20
Another example, use I made of this was to "=sumif(…)" in one cell (for example B30) , and use the "value" of that in an ACTION call ..
ACTION
$myobject.setTotal($param)
=B30
Of course the SpreadSheet Compiler is not reading the VBA formulas (Excel formulas), but rather just reading the cached calculated values when the XLS is saved.
Another example of how I used this was; the rules were executed in Stateless fashion, behind a JSON API. The version of the rules (i.e. the spreadsheet) were critical for our API.
So as part of the rule "initialisation" phase, I set the version of the rules (derived from a number on a "non" rules Worksheet in the same XLS) onto an Object.
(an aside : the version looked like:
The "400" is the number of times it has been saved. The other numbers are just UNIX timestamp with a fictional decimal point :-)
(this number is rewritten via a Macro every time the XLS is "saved") This value, sits in a sheet called "Introduction" at Cell C4. (see below)
AGENDA-GROUP |
CONDITION |
ACTION |
|
$obj : MyVersionObject( ) |
$obj |
|
$1 |
setRulesVersion("$1") |
|
Setting
the Version |
Set
The version |
Init |
/* yes */ |
=Introduction!C4 |
Probably far more info than you needed .. but there you go.
Ramon Buckland