The purpose of this logic is the same as of the Model Calculation Logic. This article describes only logic API differences in Logic API between this logic and the simple and parallel model calculation logicone.
The parallel calculation is executed in 3 steps and which are mainly used to implement use cases , where it is required to calculate many independent items in parallel. In practice, those items are calculated in a distributed manner (see also Distributed Calculation).
...
Logic Nature:
model_parallel_calculation
Logic Type: Calculation/Pricing
Execution Types (Calculation Contexts):
Init – Prepares the list of items to be calculated in parallel. Only logic elements with element context “Init” in element group “calculation-init” will be executed during this time.
Item – Executed for each item prepared in the previous execution. Only logic elements with element context “Item” in element group “calculation-item” will be executed during this time.
Summary – Post-processes the calculated items. Only logic elements with element context “Item” in element group “calculation-summary” will be executed during this time.
Information provided to the logic for executions:
Init
binding Binding variable
model
(of type ModelParallelCalculationFormulaInitContext) - includes Model Tables, inputs from previous steps and outputs from previous calculations, as with a simple calculation. The model is augmented with methods to create items to be calculated.
Item
binding Binding variable
model
(of another type ModelParallelCalculationFormulaItemContext) - includes Model Tables, inputs from previous steps and outputs from previous calculations, as with an evaluation (as it is a read-only context). The model is augmented with methods to access the item inputs.
Summary
binding Binding variable
model
(of yet another type ModelParallelCalculationFormulaSummaryContext) includes Model Tables, inputs from previous steps and outputs from previous calculations, as with a simple calculation. The model is augmented with methods to access the calculated items inputs and outputs.
Common actions done by the logic:
Init
Can also do everything a simple calculation can do, except for starting Job Trigger Calculations.
A failure of If this step means a failure of fails, the whole calculation fails.
Item
Can do everything an evaluation can do, i.e. , everything is executed in read-only mode.
A failure of one item will NOT prevent other items to run nor or the summary to runfrom running, but the whole calculation will still be considered as failed.
See also https://pricefx.atlassian.net/wiki/spaces/KB/pages/3862691915/Model+Object+MO#Calculation-Items.
Summary
Can also do everything a simple calculation can do.
A failure of If this step means a failure of fails, the whole calculation fails.
Expected logic execution outcome:
specific Specific goals per execution type:
Init - creates – Creates items to be attached to the calculation of parallel calculation.
Item - calculates – Calculates values for the item and provides them via the output value of an element.
Summary - calculates – Calculates summary of the items and provides them via the output value of an element.