Class QuoteMassUpdateAction<T extends Help>

Object
Action
QuoteMassUpdateAction<T>
All Implemented Interfaces:
Help

public class QuoteMassUpdateAction<T extends Help> extends Action
This action runs a Quote Mass Update. It's a programmatic version of the mass update job available in UI, so the logic can schedule the job in a Calculation Flow.

Obtain it with CalculationFlowActionBuilder.addQuoteMassUpdateAction(String), which takes the label of an existing Quote Mass Update. The action starts the job only when the logic calls setCalculate(true). If no Quote Mass Update has this label, no job starts and the Calculation Flow does not report an error. If several have this label, the Calculation Flow reports an error and the actions added after this one do not run.

The action always runs on a new copy of the Quote Mass Update, whatever setCopy(Boolean) sets, because getCopy() returns the calculate flag. The copy runs as a simulation unless the logic calls setSimulation(false).

Example:


 actionBuilder.addQuoteMassUpdateAction('Monthly Repricing')
     .setSimulation(false)
     .setCopyLabel('Monthly Repricing (scheduled)')
     .setCalculate(true)
 
See Also:
  • Constructor Details

    • QuoteMassUpdateAction

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

    • setCalculate

      public QuoteMassUpdateAction<T> setCalculate(Boolean calculate)
      Whether the action is valid and should be triggered or not.
      Parameters:
      calculate -
      • true - calculation of the Quote Mass Update is started as background process
      • false - calculation of the Quote Mass Update is NOT started at all
      Returns:
      this action, for further configuration
    • setCopy

      public QuoteMassUpdateAction<T> setCopy(Boolean copy)
      Whether the action should copy a quote mass update object and then run the copied one or not.

      This setting has no effect at the moment: the action always runs on a copy. See the class description.

      Parameters:
      copy -
      • true - a quote mass update should be copied before execution
      • false - intended to run the execution on the original object
      Returns:
      this action, for further configuration
    • setSimulation

      public QuoteMassUpdateAction<T> setSimulation(Boolean simulation)
      Whether the action on copied object should be a simulation or not. With true, the copy runs as a simulation. With false, it runs as an update.
      Parameters:
      simulation - true by default
      Returns:
      this action, for further configuration
    • setCopyLabel

      public QuoteMassUpdateAction<T> setCopyLabel(String label)
      Sets the label of the copied quote mass update. If you do not set it, the copy gets the label of the original followed by CFcopy( and six random characters in brackets.
      Parameters:
      label - the label of the copy
      Returns:
      this action, for further configuration
    • setCopyComment

      public QuoteMassUpdateAction<T> setCopyComment(String copyComment)
      Comment that is passed also into submitter reason into workflow. The action sets it as the comment of the copied quote mass update.
      Parameters:
      copyComment - the comment
      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 ".QuoteMassUpdateAction"
    • getQuoteMassUpdateLabel

      public String getQuoteMassUpdateLabel()
      Gets the label of the Quote Mass Update that this action runs.
      Returns:
      the label passed to CalculationFlowActionBuilder.addQuoteMassUpdateAction(String)
    • getCalculate

      public Boolean getCalculate()
      Gets whether this action starts the Quote Mass Update.
      Returns:
      true after setCalculate(true), otherwise false
      See Also:
    • getCopy

      public Boolean getCopy()
      Gets whether the action runs on a copy. This method returns the calculate flag, not the value set with setCopy(Boolean).
      Returns:
      the value of the calculate flag
    • getSimulation

      public Boolean getSimulation()
      Gets whether the copy runs as a simulation.
      Returns:
      the value set with setSimulation(Boolean), true if it was not set
    • getCopyLabel

      public String getCopyLabel()
      Gets the label of the copy.
      Returns:
      the label set with setCopyLabel(String)
    • getCopyComment

      public String getCopyComment()
      Gets the comment of the copy.
      Returns:
      the comment set with setCopyComment(String)
    • 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 Quote Mass Update and the settings of this action