Info |
---|
Since version 9.0 |
When On the user is on the Compensation Plan detail page, and clicks on Recalculate, the system will perform full recalculation of the Compensation Plan, which involves several actions.
...
, there are 2 buttons, which cause document recalculation. The difference is in how many lines are calculated.
Recalculate - all line items are recalculated
Recalculate Changes - recalculate only the line items, which have some changes against the previously calculated version. (Note, that the button is on the line item’s panel with input parameters.)
A change of the line is, for example:
change of item’s input field
change of item’s label
change of item’s result override
change of header input field
A line item has field dirty
, which is set by system to true for each line, which should be recalculated.
So for "full" recalculation, all items will be marked dirty.
For Recalculate Changes, only lines with some changes
If you want, you can read the value of the item’s dirty
field in the header logic’s post-phase, and do only processing of the recalculated items.
...
The process involves the following actions
the system executes the header logic in pre-phase mode . - Such code can create input fields on header and modify the structure of the document (e.g. create/delete/update the line items and folder)
for every item, it
.the system executes the compensation logic (only elements from group compensation) in normal mode
- This logic will calculate and provide the results.
The system will store those results to the line item.
it the system executes the header logic again, but in post-phase mode . Such - such code can calculate summarized results of the whole document and store the results to the header (or to line items)