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.

  • DatamartContext queries and loads Analytics data. Obtain it with api.getDatamartContext().
  • DatamartQueryResult gives access to the result of such a query.
  • DatamartRowSet represents the data of an Analytics field collection, such as a Data Feed, Data Source or Datamart. Obtain it with api.getDatamartRowSet().
  • TableContext is the starting point for in memory data table operations. Obtain it with api.getTableContext().
  • DistFormulaContext is the dist binding when Pricefx evaluates the logic of a Distributed Calculation Data Load.
  • DistCalcFormulaContext is the dist binding when that Data Load runs.
  • ModelFormulaContext is the model binding in a model logic.
  • ModelCalcFormulaContext is the model binding when Pricefx calculates a model.
  • ModelEvaluator exposes a trained model to modules outside price optimization. Obtain it with api.modelEvaluator(name).
  • IRebateRecordManager is the rebateRecords binding. It is available in Rebate Agreement and Compensation calculations, in their read only evaluations, and in Rebate Record Set and Compensation Record Set calculations.
  • IRebateRecordGroupManager is the rebateRecordGroup binding. It manipulates a Rebate Record Group.
  • PayoutRecordManager is the payoutRecords binding in a Rebate Record calculation, and the accrualRecords binding in a Compensation Record calculation.
  • XExpression is 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.

  • Class
    Description
    Provides 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 DMDataFeed or DMTable from 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.
    Use PublicGroovyAPI.queryApi() to query PA data instead
     
    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 the rebateRecords Groovy binding variable.
    The ModelCalcFormulaContext is exposed to model logics through the model binding, 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 the model binding.
    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.