Package net.pricefx.formulaengine
package net.pricefx.formulaengine
Formula engine interfaces exposed to Groovy logics.
A logic obtains some of these types from an api call. The context and manager
types are bound directly as logic variables, depending on the executing logic.
DatamartContextqueries and loads Analytics data. Obtain it withapi.getDatamartContext().DatamartQueryResultgives access to the result of such a query.DatamartRowSetrepresents the data of an Analytics field collection, such as a Data Feed, Data Source or Datamart. Obtain it withapi.getDatamartRowSet().TableContextis the starting point for in memory data table operations. Obtain it withapi.getTableContext().DistFormulaContextis thedistbinding when Pricefx evaluates the logic of a Distributed Calculation Data Load.DistCalcFormulaContextis thedistbinding when that Data Load runs.ModelFormulaContextis themodelbinding in a model logic.ModelCalcFormulaContextis themodelbinding when Pricefx calculates a model.ModelEvaluatorexposes a trained model to modules outside price optimization. Obtain it withapi.modelEvaluator(name).IRebateRecordManageris therebateRecordsbinding. It is available in Rebate Agreement and Compensation calculations, in their read only evaluations, and in Rebate Record Set and Compensation Record Set calculations.IRebateRecordGroupManageris therebateRecordGroupbinding. It manipulates a Rebate Record Group.PayoutRecordManageris thepayoutRecordsbinding in a Rebate Record calculation, and theaccrualRecordsbinding in a Compensation Record calculation.XExpressionis the standard exception of the expression layer.
A distributed calculation runs in three stages: initialization, calculation and summary. The stages run on separate nodes. Caches and in memory tables are not shared between stages, and not shared between calculation threads.
The newer read only and read write model context variants live in the
net.pricefx.formulaengine.optimization subpackage.
-
ClassDescriptionProvides an API to query and load PA data from a formula context.Helper class mainly for working with dates and time periods as used in the PriceAnalyzer module.API for loading data into a
DMDataFeedorDMTablefrom a formula context.A DataSlice defines a set of filters to be applied to a PA DataSet (Datamart, DataSource...).API for building a PA query in a formula context.Deprecated.Provides access to a QueryResult in a formula context.Represents the data of a PA field collection (Data Feed, Data Source, Datamart, etc.) and provides methods to work with it.DistCalcFormulaContext is a groovy api exposed through the 'dist' binding when running a DistributedCalculation DL (PA DataLoad job).DistFormulaContext is a groovy api exposed through the 'dist' binding when evaluating the logic for a DistributedCalculation DL through invocation of the datamart.formulaparams and datamart.distcalcexec endpoints.IRebateRecordGroupManager is the interface that allows you to manipulate a RebateRecordGroup (RRG type code) in a calculation logic.The RebateRecordManager API is exposed to Groovy logic elements in the following contexts: In a RebateAgreement/Compensation calculation (type codes 'RBA' / 'CO'), when the logic context's 'currentItem' is an individual line item (type codes 'RBALI' / 'COLI'). In a RebateAgreement/Compensation 'read-only' evaluation (when opening an uneditable Rebate Agreement or Compensation); currentItem is 'RBALI'. In a RebateRecordSet/CompensationRecordSet calculation, the formula context's 'currentItem' is an individual RebateRecord (type codes 'RR / COR'). The API can be accessed via therebateRecordsGroovy binding variable.The ModelCalcFormulaContext is exposed to model logics through themodelbinding, when calculating a model.A ModelEvaluator exposes a previously prepared/trained/calculated model to non-PO modules (Groovy logics).Deprecated.The ModelFormulaContext is exposed to model logics through themodelbinding.Representation of a node in a model tree (see for ex.API that can be accessed via the 'payoutRecords' binding (available in the RebateRecord calculation context — i.e., when calculating a RebateRecord in a RebateRecordCalculation task), or via the 'accrualRecords' binding (available in the CompensationRecord calculation context).This class is the central starting point for in-memory data table operations.This is the base class for all exceptions that can occurs using the Expression Class.
PublicGroovyAPI.queryApi()to query PA data instead