Class RebateRecordAction<T extends Help>

Object
Action
RebateRecordAction<T>
All Implemented Interfaces:
Help

public class RebateRecordAction<T extends Help> extends Action
This action starts the selected Rebate Calculation, which calculates its Rebate Records. It's a programmatic version of the same action available in UI. As such it allows user to schedule the action in calculation flow formula.

Obtain it with CalculationFlowActionBuilder.addRebateRecordAction(String), which takes the label of a Rebate Calculation, not of a Rebate Record Set. The action runs that Rebate Calculation, like the Run Calculation button on the Rebate Calculations page. If several Rebate Calculations have this label, it runs the most recently updated one. It starts the job only when the logic calls setCalculate(true). If no Rebate Calculation matches the label, no job starts and the Calculation Flow does not report an error.

Example:


 actionBuilder.addRebateRecordAction('Monthly Accruals')
     .setCalculate(true)
 
See Also:
  • Constructor Details

    • RebateRecordAction

      public RebateRecordAction(T backLink, Invocations<MethodInvocationRecord> invocations, String rrscLabel)
      Not intended for public use. An action created with this constructor is not added to the Calculation Flow, so it never runs. Use actionBuilder.addRebateRecordAction() instead.
      See Also:
  • Method Details

    • setCalculate

      public RebateRecordAction<T> setCalculate(Boolean calculate)
      Whether the action is valid and should be triggered or not.
      Parameters:
      calculate -
      • true - the Rebate Calculation is started as background process
      • false - the Rebate Calculation is NOT started at all
      Returns:
      this action, for further configuration
    • back

      public T back()
      Returns the builder that added this action, so that the logic can add the next action in the same chain.
      Returns:
      the actionBuilder that added this action
      See Also:
    • getObjectName

      public String getObjectName()
      Not intended for public use.
      Returns:
      the name of the builder that added this action, followed by ".RebateRecordAction"
    • getRebateRecordSetCalculationLabel

      public String getRebateRecordSetCalculationLabel()
      Gets the label of the Rebate Calculation that this action runs.
      Returns:
      the label passed to CalculationFlowActionBuilder.addRebateRecordAction(String)
    • getCalculate

      public Boolean getCalculate()
      Gets whether this action starts the Rebate Calculation.
      Returns:
      true after setCalculate(true), otherwise false
      See Also:
    • toString

      public String toString()
      Returns a text representation of this action for debugging.
      Overrides:
      toString in class Object
      Returns:
      a text that contains the label of the Rebate Calculation and the calculate flag of this action