Class CalculationFlowActionBuilder

Object
CalculationFlowActionBuilder
All Implemented Interfaces:
Help

public class CalculationFlowActionBuilder extends Object implements Help
CalculationFlowActionBuilder is the starting point of an interface that allows you define actions within calculation flow logic.The calculation flow action builder is available in calculation flow by this call:
def builder = actionBuilder
Note that you will find full code snippets in the "Command Templates/Calculation Flow Examples" inside calculation flow formulas UI.
  • Constructor Details

    • CalculationFlowActionBuilder

      public CalculationFlowActionBuilder(Invocations<MethodInvocationRecord> invocations, CalculationFlowTimeUnit timeUnit, BigDecimal numberOfTimeUnits, String startingDate, Boolean periodic, CFTraitType traitType)
    • CalculationFlowActionBuilder

      public CalculationFlowActionBuilder(Invocations<MethodInvocationRecord> invocations)
  • Method Details

    • addCalculatedFieldSetAction

      public CFSAction<CalculationFlowActionBuilder> addCalculatedFieldSetAction(String cfsLabel)
      Adds CFS action to the list of actions that should be executed.

      Snippet:
      actionBuilder.addCalculatedFieldSetAction('cfsLabel').setCalculate(true)
      Parameters:
      cfsLabel - label of the CFS as seen in the CFS header level overview in the UI.
      Returns:
      CFS action object with further configuration options.
    • addPricelistAction

      public PricelistAction<CalculationFlowActionBuilder> addPricelistAction(String pricelistName)
      Adds pricelist action to the list of actions that should be executed.

      Snippet:
      actionBuilder.addPricelistAction('pricelistName').setCalculate(true)
      Parameters:
      pricelistName - name of pricelist as seen in the pricelists header level overview in the UI.
      Returns:
      pricelist action object with further configuration options.
    • addManualPricelistAction

      public ManualPricelistAction<CalculationFlowActionBuilder> addManualPricelistAction(String manualPricelistUniqueName)
      Adds manual pricelist action to the list of actions that should be executed.

      Snippet:
      actionBuilder.addManualPricelistAction('manualPricelistLabel').setCalculate(true)
      Parameters:
      manualPricelistUniqueName - name of manual pricelist as seen in the manual pricelists header level overview in the UI.
      Returns:
      manual pricelist action object with further configuration options.
    • addLivePriceGridAction

      public LivePriceGridAction<CalculationFlowActionBuilder> addLivePriceGridAction(String lpgLabel)
      Adds live price grid action to the list of actions that should be executed.

      Snippet:
      • Full recalculation: actionBuilder.addLivePriceGridAction('livePriceGridLabel').setCalculate(true)
      • Partial recalculation: actionBuilder.addLivePriceGridAction('livePriceGridLabel').restrictToSkus(['sku1', 'sku2', 'sku3']).withFormulaParameters([amount: 42, city: 'New York']).setCalculate(true)
      Parameters:
      lpgLabel - label of LPG as seen in the LPG header level overview in the UI.
      Returns:
      LPG action object with further configuration options.
    • addDataLoadAction

      public DataLoadAction<CalculationFlowActionBuilder> addDataLoadAction(String dataLoadLabel, String dataLoadType, String target)
      Adds the specified data load action to the list of actions to be executed.

      Example:

      
       actionBuilder.addDataLoadAction('dataLoadLabel', 'dataLoadType', 'target')
                    .setCalculate(true)
       

      Note that dataLoadLabel, dataLoadType, and target uniquely identify any data load available in the system.

      Valid dataLoadType values are:

      • AddTablePartitions
      • Calculation
      • Calendar
      • Customers
      • DistributedCalculation
      • Flush
      • IndexMaintenance
      • InternalCopy
      • ModelCalculation
      • ModelRecordCalculation
      • Products
      • PublishDataMart
      • Refresh
      • Simulation
      • Truncate
      Parameters:
      dataLoadLabel - the label of the data load as seen in the data loads overview in the UI
      dataLoadType - the type of the data load as seen in the data loads overview in the UI
      target - the target of the data load as seen in the data loads overview in the UI
      Returns:
      a data load action object with further configuration options.
    • addModelCalculationAction

      public ModelCalculationAction<CalculationFlowActionBuilder> addModelCalculationAction(String modelUniqueName)
      Adds a model calculation action to the list of actions that should be executed. See returned ModelCalculationAction for further configuration.

      Sample code:

      
           actionBuilder.addModelCalculationAction('myModelName')
               .fromStep('aStepOfTheModel')
               .toLastStep()
               .setCalculate(true)
       

      or:

      
           actionBuilder.addModelCalculationAction('myModelName')
               .action('anActionDeclaredInTheModel')
               .setCalculate(true)
       
      Parameters:
      modelUniqueName - unique name of the Model Object in the partition
      Returns:
      action object with further configuration options to specify which steps to calculate
      Since:
      10.1 Bee's Knees
    • addExportAction

      public ExportAction<CalculationFlowActionBuilder> addExportAction(String jobName)
      Adds export/archive action to the list of actions that should be executed.

      Snippet:
      • Export flavour: actionBuilder.addExportAction('jobName').doExport('templateName')
      • Archive flovour: actionBuilder.addExportAction('jobName').doArchive('templateName')
      Parameters:
      jobName - name of the job as seen in "Admin/Import-Export-Archiving" UI.
      Returns:
      export action object with further configuration options.
    • addSimulationAction

      public SimulationAction<CalculationFlowActionBuilder> addSimulationAction(String simulationLabel)
      Adds simulation action to the list of actions that should be executed.

      Snippet:
      actionBuilder.addSimulationAction('simulationLabel').setCalculate(true)
      Parameters:
      simulationLabel - name of simulation as seen in the simulations header level overview in the UI.
      Returns:
      simulation action object with further configuration options.
    • addRebateRecordAction

      public RebateRecordAction<CalculationFlowActionBuilder> addRebateRecordAction(String rrscLabel)
      Adds rebate record action to the list of actions that should be executed.

      Snippet:
      actionBuilder.addRebateRecordAction('rrscLabel').setCalculate(true)
      Parameters:
      rrscLabel - rebate record set label as seen in UI
      Returns:
      rebate record action object with further configuration options.
    • addQuoteMassUpdateAction

      public QuoteMassUpdateAction<CalculationFlowActionBuilder> addQuoteMassUpdateAction(String label)
      Adds quote mass update action to the list of actions that should be executed.

      Snippet:
      actionBuilder.addQuoteMassUpdateAction('label').setCalculate(true)
      Parameters:
      label -
      Returns:
      quote mass update action object with further configuration options.
    • addObjRefAction

      public ObjRefAction<CalculationFlowActionBuilder> addObjRefAction()
      Adds object references action to the list of actions that should be executed.

      Snippet:
      actionBuilder.addObjRefAction().setFilter(filter).setPartition(partition).setTypeCode('typeCode')
      Returns:
      obj ref action object with further configuration options.
    • getScheduleSettings

      public ScheduleSettings<CalculationFlowActionBuilder> getScheduleSettings()
      It's getting you an object that is used to obtain the schedule as seen in the UI + if needed alter it.
      Returns:
      schedule settings with further configuration options
    • getObjectName

      public String getObjectName()
      Specified by:
      getObjectName in interface Help
    • getActions

      public List<Action> getActions()