Package io.kestra.core.tasks.flows
Class Flow
java.lang.Object
io.kestra.core.models.tasks.Task
io.kestra.core.tasks.flows.Flow
- All Implemented Interfaces:
ExecutableTask<Flow.Output>
@Plugin(examples=@Example(title="Run a subflow with custom inputs",code={"namespace: dev","flowId: subflow","inputs:"," user: \"Rick Astley\""," favorite_song: \"Never Gonna Give You Up\"","wait: true","transmitFailed: true"}))
public class Flow
extends Task
implements ExecutableTask<Flow.Output>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.kestra.core.models.tasks.ExecutableTask
ExecutableTask.SubflowId -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateWorkerTaskExecutions(RunContext runContext, FlowExecutorInterface flowExecutorInterface, Flow currentFlow, Execution currentExecution, TaskRun currentTaskRun) Creates a list of WorkerTaskExecution for this task definition.createWorkerTaskResult(RunContext runContext, TaskRun taskRun, Flow flow, Execution execution) Creates a WorkerTaskResult for a given WorkerTaskExecutionbooleanWhether to wait for the execution(s) of the subflow before terminating this tasksMethods inherited from class io.kestra.core.models.tasks.Task
findById, findById, isFlowable, isSendToWorkerTask
-
Constructor Details
-
Flow
public Flow()
-
-
Method Details
-
createWorkerTaskExecutions
public List<WorkerTaskExecution<?>> createWorkerTaskExecutions(RunContext runContext, FlowExecutorInterface flowExecutorInterface, Flow currentFlow, Execution currentExecution, TaskRun currentTaskRun) throws InternalException Description copied from interface:ExecutableTaskCreates a list of WorkerTaskExecution for this task definition. Each WorkerTaskExecution will generate a subflow execution.- Specified by:
createWorkerTaskExecutionsin interfaceExecutableTask<Flow.Output>- Throws:
InternalException
-
createWorkerTaskResult
public Optional<WorkerTaskResult> createWorkerTaskResult(RunContext runContext, TaskRun taskRun, Flow flow, Execution execution) Description copied from interface:ExecutableTaskCreates a WorkerTaskResult for a given WorkerTaskExecution- Specified by:
createWorkerTaskResultin interfaceExecutableTask<Flow.Output>
-
waitForExecution
public boolean waitForExecution()Description copied from interface:ExecutableTaskWhether to wait for the execution(s) of the subflow before terminating this tasks- Specified by:
waitForExecutionin interfaceExecutableTask<Flow.Output>
-
subflowId
- Specified by:
subflowIdin interfaceExecutableTask<Flow.Output>- Returns:
- the subflow identifier, used by the flow topology and related dependency code.
-