Package io.kestra.core.models.executions
Class Execution
java.lang.Object
io.kestra.core.models.executions.Execution
- All Implemented Interfaces:
DeletedInterface,TenantInterface
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Execution.ExecutionBuilderbuilder()childExecution(String childExecutionId, List<TaskRun> taskRunList, State state) Convert an exception on Executor and add log to the currentRUNNINGtaskRun, on the lastAttempts.findChilds(TaskRun taskRun) Find all children from thisTaskRun.findChildsValues(TaskRun taskRun, boolean withCurrent) findFirstByState(State.Type state) findLastByState(List<TaskRun> taskRuns, State.Type state) findLastCreated(List<TaskRun> taskRuns) findLastRunning(List<TaskRun> taskRuns) findLastTerminated(List<TaskRun> taskRuns) findTaskDependingFlowState(List<ResolvedTask> resolvedTasks) findTaskDependingFlowState(List<ResolvedTask> resolvedTasks, List<ResolvedTask> resolvedErrors) Determine if the current execution is on error & normal tasks Used only from the flowfindTaskDependingFlowState(List<ResolvedTask> resolvedTasks, List<ResolvedTask> resolvedErrors, TaskRun parentTaskRun) Determine if the current execution is on error & normal tasksfindTaskRunByTaskIdAndValue(String id, List<String> values) findTaskRunByTasks(List<ResolvedTask> resolvedTasks, TaskRun parentTaskRun) guessFinalState(Flow flow) guessFinalState(List<ResolvedTask> currentTasks, TaskRun parentTaskRun) booleanbooleanhasCreated(List<ResolvedTask> resolvedTasks) booleanhasCreated(List<ResolvedTask> resolvedTasks, TaskRun parentTaskRun) booleanbooleanhasFailed(List<ResolvedTask> resolvedTasks) booleanhasFailed(List<ResolvedTask> resolvedTasks, TaskRun parentTaskRun) booleanhasRunning(List<ResolvedTask> resolvedTasks) booleanhasRunning(List<ResolvedTask> resolvedTasks, TaskRun parentTaskRun) booleanhasTaskRunJoinable(TaskRun taskRun) booleanbooleanhasWarning(List<ResolvedTask> resolvedTasks) booleanhasWarning(List<ResolvedTask> resolvedTasks, TaskRun parentTaskRun) booleanisTerminated(List<ResolvedTask> resolvedTasks) booleanisTerminated(List<ResolvedTask> resolvedTasks, TaskRun parentTaskRun) static ch.qos.logback.classic.spi.ILoggingEventTransform an exception toILoggingEventoutputs()toString(boolean pretty) withState(State.Type state) withTaskRun(TaskRun taskRun) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.kestra.core.models.DeletedInterface
isDeletedMethods inherited from interface io.kestra.core.models.TenantInterface
getTenantId
-
Constructor Details
-
Execution
public Execution()
-
-
Method Details
-
builder
-
withState
-
withTaskRun
- Throws:
InternalException
-
childExecution
-
findTaskRunsByTaskId
-
findTaskRunByTaskRunId
- Throws:
InternalException
-
findTaskRunByTaskIdAndValue
- Throws:
InternalException
-
findTaskDependingFlowState
public List<ResolvedTask> findTaskDependingFlowState(List<ResolvedTask> resolvedTasks, List<ResolvedTask> resolvedErrors) Determine if the current execution is on error & normal tasks Used only from the flow- Parameters:
resolvedTasks- normal tasksresolvedErrors- errors tasks- Returns:
- the flow we need to follow
-
findTaskDependingFlowState
public List<ResolvedTask> findTaskDependingFlowState(List<ResolvedTask> resolvedTasks, @Nullable List<ResolvedTask> resolvedErrors, TaskRun parentTaskRun) Determine if the current execution is on error & normal tasksif the current have errors, return tasks from errors if not, return the normal tasks
- Parameters:
resolvedTasks- normal tasksresolvedErrors- errors tasksparentTaskRun- the parent task- Returns:
- the flow we need to follow
-
findTaskDependingFlowState
-
findTaskRunByTasks
-
findFirstByState
-
findFirstRunning
-
findLastNotTerminated
-
findLastByState
-
findLastCreated
-
findLastRunning
-
findLastTerminated
-
isTerminated
-
isTerminated
-
hasWarning
public boolean hasWarning() -
hasWarning
-
hasWarning
-
hasFailed
public boolean hasFailed() -
hasFailed
-
hasFailed
-
hasCreated
public boolean hasCreated() -
hasCreated
-
hasCreated
-
hasRunning
-
hasRunning
-
guessFinalState
-
guessFinalState
-
hasTaskRunJoinable
-
failedExecutionFromExecutor
Convert an exception on Executor and add log to the currentRUNNINGtaskRun, on the lastAttempts. If no Attempt is found, we create one (must be nominal case). The executor will catch theFAILEDtaskRun emitted and will failed the execution. In the worst case, we FAILED the execution (only fromFlow).- Parameters:
e- the exception throw from Executor- Returns:
- a new execution with taskrun failed if possible or execution failed is other case
-
loggingEventFromException
Transform an exception toILoggingEvent- Parameters:
e- the current execption- Returns:
- the
ILoggingEventwaited to generateLogEntry
-
outputs
-
parents
-
findChilds
Find all children from thisTaskRun. The list is starting from deeper child and end on closest child, so first element is the task that start first. This method don't return the current tasks- Parameters:
taskRun- current child- Returns:
- List of parent
TaskRun
-
findChildsValues
-
toDeleted
-
toString
-
toStringState
-
toCrc32State
-