Package step.core.execution
Class ExecutionEngine
- java.lang.Object
-
- step.core.execution.ExecutionEngine
-
public class ExecutionEngine extends java.lang.Object
This class represent the central component for the execution ofPlan
s. It supports local executions as well as central executions within controller instances. It replaces all the classes implementing the legacyPlanRunner
interface
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ExecutionEngine.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ExecutionEngine.Builder
builder()
PlanRunnerResult
execute(java.lang.String executionId)
Executes anExecution
previously initialized byinitializeExecution(ExecutionParameters)
PlanRunnerResult
execute(ExecutionParameters executionParameterObject)
Create a new execution and runs the plan specified within the providedExecutionParameters
PlanRunnerResult
execute(Plan plan)
Create a new execution and runs the provided plan as part of thisExecution
PlanRunnerResult
execute(Plan plan, java.util.Map<java.lang.String,java.lang.String> executionParameters)
Create a new execution and runs the provided plan as part of thisExecution
java.util.List<ExecutionContext>
getCurrentExecutions()
ExecutionEngineContext
getExecutionEngineContext()
java.lang.String
initializeExecution(ExecutionParameters executionParameters)
Initializes an execution based on the provided parameters.java.lang.String
initializeExecution(ExecutiontTaskParameters executionTaskParameters)
Initializes an execution based on the provided parameters.ExecutionContext
newExecutionContext()
protected ExecutionContext
newExecutionContext(java.lang.String executionId, ExecutionParameters executionParameters, ExecutiontTaskParameters executiontTaskParameters)
-
-
-
Method Detail
-
builder
public static ExecutionEngine.Builder builder()
- Returns:
- a new instance of the
ExecutionEngine
build
-
getExecutionEngineContext
public ExecutionEngineContext getExecutionEngineContext()
- Returns:
- the
ExecutionEngineContext
of thisExecutionEngine
-
initializeExecution
public java.lang.String initializeExecution(ExecutionParameters executionParameters)
Initializes an execution based on the provided parameters. This creates and persists a newExecution
instance. This method call should be followed byexecute(String)
- Parameters:
executionParameters
- theExecutionParameters
of theExecution
to be created- Returns:
- the ID of the new
Execution
-
initializeExecution
public java.lang.String initializeExecution(ExecutiontTaskParameters executionTaskParameters)
Initializes an execution based on the provided parameters. This creates and persists a newExecution
instance. This method call should be followed byexecute(String)
- Parameters:
executionTaskParameters
- theExecutiontTaskParameters
of theExecution
to be created- Returns:
- the ID of the new
Execution
-
execute
public PlanRunnerResult execute(java.lang.String executionId)
Executes anExecution
previously initialized byinitializeExecution(ExecutionParameters)
- Parameters:
executionId
- the ID of theExecution
initialized and returned byinitializeExecution(ExecutionParameters)
- Returns:
- the result of the execution
-
execute
public PlanRunnerResult execute(Plan plan)
Create a new execution and runs the provided plan as part of thisExecution
- Parameters:
plan
- thePlan
to be executed- Returns:
-
execute
public PlanRunnerResult execute(Plan plan, java.util.Map<java.lang.String,java.lang.String> executionParameters)
Create a new execution and runs the provided plan as part of thisExecution
- Parameters:
plan
- thePlan
to be executedexecutionParameters
- the map of execution parameters. These parameters are equivalent to the parameters selected on the execution screen of the STEP UI- Returns:
-
execute
public PlanRunnerResult execute(ExecutionParameters executionParameterObject)
Create a new execution and runs the plan specified within the providedExecutionParameters
- Parameters:
executionParameterObject
- the- Returns:
-
newExecutionContext
public ExecutionContext newExecutionContext()
- Returns:
- a new
ExecutionContext
. Warning: This method should only be used for testing purposes i.e. for tests requiring anExecutionContext
withoutExecutionEngine
-
newExecutionContext
protected ExecutionContext newExecutionContext(java.lang.String executionId, ExecutionParameters executionParameters, ExecutiontTaskParameters executiontTaskParameters)
-
getCurrentExecutions
public java.util.List<ExecutionContext> getCurrentExecutions()
- Returns:
- the
List
of currently running executions
-
-