Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Since version 9.0

On the Compensation Plan detail page, 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.

compensation recalculation.drawio

The process involves the following actions

  1. 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)

  2. for every item,

    1. the system executes the compensation logic (only elements from group compensation) in normal mode - This logic will calculate and provide the results.

    2. The system will store those results to the line item.

  3. the system executes the header logic again, but in post-phase mode - such code can calculate summarized results of the whole document and store the results to the header (or to line items)

  • No labels