Class DataLoadAction<T extends Help>
Object
Action
DataLoadAction<T>
- All Implemented Interfaces:
Help
public class DataLoadAction<T extends Help>
extends Action
This action starts calculation of selected data load. 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.addDataLoadAction(String, String, String). The label, the type
and the target together identify the Data Load. The target is the type code and the unique name of the target
table, for example DM.Transactions for a Datamart or DMDS.Products for a Data Source. The action
runs the Data Load only when the logic calls setCalculate(true). If no Data Load matches, or the type is not
valid, nothing runs and the Calculation Flow does not report an error.
Example:
actionBuilder.addDataLoadAction('Refresh Transactions', 'Refresh', 'DM.Transactions')
.setCalculate(true)
- See Also:
-
Field Summary
Fields inherited from class Action
jobs -
Constructor Summary
ConstructorsConstructorDescriptionDataLoadAction(T backLink, Invocations<MethodInvocationRecord> invocations, String dataLoadLabel, String dataLoadType, String target) Not intended for public use. -
Method Summary
Modifier and TypeMethodDescriptionback()Returns the builder that added this action, so that the logic can add the next action in the same chain.Gets whether this action runs the Data Load.Gets the label of the Data Load that this action runs.Gets the type of the Data Load that this action runs.Gets the follow-on jobs set withsetNextJobs(List).Not intended for public use.Gets the target of the Data Load that this action runs.setCalculate(Boolean calculate) Whether the action is valid and should be triggered or not.setNextJobs(List<ChainedJobInfo> jobs) Defines subsequent follow-on jobs.toString()Returns a text representation of this action for debugging.
-
Constructor Details
-
DataLoadAction
public DataLoadAction(T backLink, Invocations<MethodInvocationRecord> invocations, String dataLoadLabel, String dataLoadType, String target) Not intended for public use. An action created with this constructor is not added to the Calculation Flow, so it never runs. UseactionBuilder.addDataLoadAction()instead.- See Also:
-
-
Method Details
-
setCalculate
Whether the action is valid and should be triggered or not.- Parameters:
calculate-- true - calculation of the data load is started as background process
- false - calculation of the data load is NOT started at all
- Returns:
- this action, for further configuration
-
setNextJobs
Defines subsequent follow-on jobs. A next job starts when the Data Load has finished. If the Data Load fails, a next job starts only when itsexecuteOnErroristrue. Each next job can have next jobs of its own.Example, running another Data Load after this one:
import net.pricefx.common.dto.ChainedJobInfo def nextJob = new ChainedJobInfo() nextJob.setTargetObject('286.DMDL') nextJob.setExecuteOnError(false) actionBuilder.addDataLoadAction('Refresh Transactions', 'Refresh', 'DM.Transactions') .setNextJobs([nextJob]) .setCalculate(true)- Parameters:
jobs- List of ChainedJobInfo objects- Returns:
- this action, for further configuration
- See Also:
-
back
Returns the builder that added this action, so that the logic can add the next action in the same chain.- Returns:
- the
actionBuilderthat added this action - See Also:
-
getObjectName
Not intended for public use.- Returns:
- the name of the builder that added this action, followed by
".DataLoadAction"
-
getDataLoadLabel
Gets the label of the Data Load that this action runs.- Returns:
- the label passed to
CalculationFlowActionBuilder.addDataLoadAction(String, String, String)
-
getDataLoadType
Gets the type of the Data Load that this action runs.- Returns:
- the type passed to
CalculationFlowActionBuilder.addDataLoadAction(String, String, String), for exampleRefresh
-
getTarget
Gets the target of the Data Load that this action runs.- Returns:
- the target passed to
CalculationFlowActionBuilder.addDataLoadAction(String, String, String), for exampleDM.Transactions
-
getCalculate
Gets whether this action runs the Data Load.- Returns:
trueaftersetCalculate(true), otherwisefalse- See Also:
-
getNextJobs
Gets the follow-on jobs set withsetNextJobs(List).- Returns:
- the follow-on jobs
-
toString
Returns a text representation of this action for debugging.
-