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 Summary
Constructors Constructor Description CalculationFlowActionBuilder(Invocations<MethodInvocationRecord> invocations)
CalculationFlowActionBuilder(Invocations<MethodInvocationRecord> invocations, CalculationFlowTimeUnit timeUnit, BigDecimal numberOfTimeUnits, String startingDate, Boolean periodic, CFTraitType traitType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CFSAction<CalculationFlowActionBuilder>
addCalculatedFieldSetAction(String cfsLabel)
Adds CFS action to the list of actions that should be executed.DataLoadAction<CalculationFlowActionBuilder>
addDataLoadAction(String dataLoadLabel, String dataLoadType, String target)
Adds data load action to the list of actions that should be executed.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')
LivePriceGridAction<CalculationFlowActionBuilder>
addLivePriceGridAction(String lpgLabel)
Adds live price grid action to the list of actions that should be executed.ManualPricelistAction<CalculationFlowActionBuilder>
addManualPricelistAction(String manualPricelistUniqueName)
Adds manual pricelist action to the list of actions that should be executed.ObjRefAction<CalculationFlowActionBuilder>
addObjRefAction()
Adds object references action to the list of actions that should be executed.PriceAPIAction<CalculationFlowActionBuilder>
addPriceAPIAction(String jobName)
Adds PriceAPI action to the list of actions that should be executed.PricelistAction<CalculationFlowActionBuilder>
addPricelistAction(String pricelistName)
Adds pricelist action to the list of actions that should be executed.RebateRecordAction<CalculationFlowActionBuilder>
addRebateRecordAction(String rrscLabel)
Adds rebate record action to the list of actions that should be executed.SimulationAction<CalculationFlowActionBuilder>
addSimulationAction(String simulationLabel)
Adds simulation action to the list of actions that should be executed.ArrayList<Action>
getActions()
String
getObjectName()
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.
-
-
-
Constructor Detail
-
CalculationFlowActionBuilder
public CalculationFlowActionBuilder(Invocations<MethodInvocationRecord> invocations, CalculationFlowTimeUnit timeUnit, BigDecimal numberOfTimeUnits, String startingDate, Boolean periodic, CFTraitType traitType)
-
CalculationFlowActionBuilder
public CalculationFlowActionBuilder(Invocations<MethodInvocationRecord> invocations)
-
-
Method Detail
-
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']).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.
- Full recalculation:
-
addDataLoadAction
public DataLoadAction<CalculationFlowActionBuilder> addDataLoadAction(String dataLoadLabel, String dataLoadType, String target)
Adds data load action to the list of actions that should be executed.
Snippet:
-
actionBuilder.addDataLoadAction('dataLoadLabel', 'dataLoadType', 'target').setCalculate(true)
- Parameters:
dataLoadLabel
- label of data load as seen in the data loads overview in the UI.dataLoadType
- type of data load as seen in the data loads overview in the UI.target
- target of data load as seen in the data loads overview in the UI.- Returns:
- data load action object with further configuration options.
-
-
addPriceAPIAction
public PriceAPIAction<CalculationFlowActionBuilder> addPriceAPIAction(String jobName)
Adds PriceAPI action to the list of actions that should be executed.
Snippet:
-
actionBuilder.addPriceAPIAction('jobName').setCalculate(true)
- Parameters:
jobName
- name of the job as seen in Price API UI.- Returns:
- price api action object with further configuration options.
-
-
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.
-
Export flavour:
-
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.
-
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 interfaceHelp
-
getActions
public ArrayList<Action> getActions()
-
-