...
Logic API
Logic Nature: distPACalc
Logic Type: Calculation/Pricing
Execution Types - each logic element can belong (and be executed) to the following element contexts (which are executed in 3 stages of the distributed calculation dataload process:
calculation-init - prepares the list of Calculation Items. The system then stores them in company parameter DistributedCalculation [xxx]
calculation - process one Calculation Item. These calculation elements will be executed once for each Calculation Item. It is likely, that more Calculation Items will be processed in parallel, likely on different machines.
calculation-summary - summarize some stats about the process
element context | init | init | calculation | calculation | summary | summary |
---|---|---|---|---|---|---|
Execution Type | Syntax Check | Normal | Syntax Check | Normal | Syntax Check | Normal |
dist : DistFormulaContext | yes | yes | yes | yes | yes | yes |
build input field definitions | yes | yes | yes | |||
input : Map | yes | yes | yes | |||
api.currentItem() | yes | yes | yes | |||
generate rows for target table | yes | yes | yes | |||
generate list of Calculation Items | yes | |||||
process a Calculation Item | yes | |||||
calculate summary of the process | yes |
Information provided to the logic
binding variable dist : DistFormulaContext
binding variable input : Map - with values of all input fields created by the logic and set by the user
api.currentItem() : Map - definition of the Dataload. Not available during testing of the logic.
Allow object modification - true. This process can update data in tables (e.g., via
api.update()
).
Expected logic outcome
Input fields - during configuration of the Dataload, each element will be executed in Syntax Check mode, to be able to build input fields it needs.
in each execution stage, the logic can generate rows for target table
generate list of Calculation Items - the init stage can generate the Calculation Items. The system will store them in the company parameter DistributedCalculation [xxx] (where xxx is an ID of the Dataload)
process a Calculation Item - in the calculation stage, the system will execute the calculation elements for each Calculation Item found
calculate summary of the process (e.g. some stats of the data rows generated)
summary values returned via elements with Display Mode Everywhere. Those will be stored in the Dataload definition.
...