Logic Documentation (Agreements)
See also the architecture documentation here: https://pricefx.atlassian.net/wiki/display/ACCDEV/Architecture+Diagram+(Agreements)
Most of the logic used in Agreements Accelerator includes GroovyDoc, which provides additional valuable information.
Agreement Logics
AGR_FormulaBasedPricing
The core logic for Line Item calculations. The logic works in two contexts:
Line Item Calculation context, which runs on each line item, calculates it and produces outputs
The agreement is calculated every time a Scenario is added. This is enabled by default – the accScenarioRecalc
property within the Configuration section of the AGR_FormulaBasedPricing Agreement & Promotion Type (Agreements & Promotions > Agreement & Promotion Types) is set to true
.
Agreement Recalculation context, which runs during scheduled Calculation, that is used to gather data for Condition Records
The main premise of the line item logic is to run Calculation Engine (optionally run Forecast Engine) for each SKU and produce an output so the results can be saved to Condition Records.
The logic also generates various Result Matrices that allow to see the calculation results in a user-friendly way.
See the How to Add New Outputs to Line Item article for more details.
This logic – due to its size – has “separators” which group elements. The separators are empty elements with the following name pattern: ___SOME_NAME___.
AGR_FormulaBasedPricing_FormulaConfigurator
This is the Configurator logic for the Line Item that allows the selection of Formula. It also displays any Broadcasted inputs if the Formula defines them.
AGR_FormulaBasedPricing_ProductConfigurator
This is the Configurator logic for the Line Item that displays the Product Group input that allows the SKU selection to be calculated.
AGR_FormulaBasedPricingHeader
This is the Header logic that defines the Header behavior for the Agreement. It defines inputs to be shown as well as outputs to be produced once calculation finishes. It also controls the default structure of the Agreement and Error Handling.
AGR_FormulaBasedPricingHeader_AdditionalCalculationOutputTypesConfigurator
This is the Configurator logic for the Header that displays the Additional Calculation Output Types Result Matrix Configurator Table input.
AGR_FormulaBasedPricingHeader_BoundsConfigurator
This is the Configurator logic for the Header that displays the Lower and Upper Bound inputs.
AGR_FormulaBasedPricingHeader_ForecastConfigurator
This is the Configurator logic for the Header that displays the Forecast Engine input as well as any inputs defined by the selected Forecast Engine.
Recalculation Logics
AGR_ConditionRecordCreation
This is a Condition Record Creation Logic that reads the Condition Record output produced by the Line Item and creates a Condition Record out of it. It is run only in the Agreement Recalculation context via Scheduled Calculation.
AGR_AgreementFeeder
This is a Feeder logic for the Scheduled Calculation. It is used to provide the Calculation with Agreements that need calculation. They need to fulfill certain criteria to be picked up by the Feeder.
General Library Logics
AGR_DashboardsLib
This library logic stores utility functions that are used by the Dashboards present in the Agreements Package.
AGR_ForecastEnginesLib
This library logic stores definitions of Forecast Engines that are used to calculation Forecast revenue in the Line Item calculation. The elements here should reflect the entries in AGR_ForecastTypes Company Parameter.
AGR_FormulaLib
This library contains various utility functions that are used for management of anything Formula related, be it Formula Designer Formulas or Input Based Formulas. It also contains the Const Config for all Formula based operations.
AGR_InputBasedFormulaEnginesLib
This library stores definitions of Input Based Formulas Calculation Engines that are used to calculate the revenue in the Line Item calculation. The elements here should reflect the entries in AGR_InputBasedFormulaTypes Company Parameter.
AGR_ProcessingLib
Main library of the Package. Contains various utility methods, for almost everything else that is not in AGR_FormulaLib or AGR_DashboardsLib. Also stores the main Const Config of the solution.
AGR_InputLib
This logic stores the InputManager, which is the solution that handles most input generation present in the Package (Input Library Logics below are used by it). It also contains any common input generation functions/utilities.
Input Library Logics
AGR_DashboardInputsLib
Input Generation library containing definitions for inputs used by package Dashboards. The elements in this library should reflect the entries from any Company Parameter that’s connected to Dashboard Input Generation.
AGR_ForecastInputsLib
Input Generation library containing definitions for inputs used by package Forecast Engines. The elements in this library should reflect the entries from any Company Parameter that’s connected to Forecast Input Generation.
AGR_FormulaInputsLib
Input Generation library containing definitions for inputs used by package Formulas. The elements in this library should reflect the entries from any Company Parameter that’s connected to Formula Input Generation.
AGR_InputGeneratorLib
Input Generation library containing definitions for inputs used by package Forecast Engines. The elements in this library should reflect the entries from any Company Parameter that’s connected to Agreement Input Generation.
Formula Designer Logics
AGR_FormulaDesigner_CustomBlocks
This logic contains the definitions of Function blocks for Formula Designer. This article describes both the structure and behavior of this logic <link>.
AGR_FormulaDesigner_CustomInputs
This logic contains the definitions of Input blocks for Formula Designer. This article describes both the structure and behavior of this logic <link>.
AGR_FormulaDesigner_Deployment
This logic defines the deployment process for Formula Designer - aka what happens after “Activate” button is pressed on a Formula Type.
Formula Logics
AGR_FormulaHeader
This logic defines the Header behaviour (“Details” tab) on Formula CFO. It generates the Inputs for the Formula Type in the Definition Section and “descriptor” inputs in Attributes Section.
AGR_FormulaHeaderAttributesConfigurator
This is Configurator logic for the Attributes Section of the Formula.
AGR_FormulaHeaderDefinitionConfigurator
This is Configurator logic for the Definition Section of the Formula. It generates any Inputs that have been defined on the Formula Type.
Input Based Formula Logics
AGR_InputBasedFormulaHeader
This is the Header logic for the Input Based Formula CFO. It generates the Formula Type selection and displays the Configurator that handles the Inputs defined by the selected Formula Type.
AGR_InputBasedFormulaHeaderConfigurator
This is the Configurator for the Header logic of Input Based Formula CFO. It generates the Inputs defined by the selected Formula Type.
AGR_Formula_ExceptionsConfigurator
This is the Configurator logic for the Product Exceptions Configurator Table for the Cost Plus Input Based Formula Type that is shipped together with the Package.
Dashboard Logics
AGR_DashboardScenarioComparison
This is the Dashboard logic for the Scenario Comparison Dashboard that is displayed as Tab on the Agreement. It contains the Comparison Result Matrix.
AGR_DashboardScenarioComparison_Configurator
This is the Configurator logic for the Scenario Comparison Dashboard that displays the Scenario selection.
Filter Logics
AGR_FormulaBasedTypeFilter
This is the Filter Logic for the Agreement Line Items that filters out any non-Accelerator Condition Types.