
Core Plugins and tasks Pause
CertifiedPause the flow until it is resumed.
Core Plugins and tasks Pause
Pause the flow until it is resumed.
Stops downstream task scheduling and moves the execution to PAUSED. Resume manually from the UI, via the /executions/{id}/resume API, or automatically after pauseDuration if set.
You can declare onResume inputs to collect human/automation feedback before continuing.
type: io.kestra.plugin.core.flow.PauseExamples
Pause the execution and wait for a manual approval.
id: human_in_the_loop
namespace: company.team
tasks:
- id: before_approval
type: io.kestra.plugin.core.debug.Return
format: Output data that needs to be validated by a human
- id: pause
type: io.kestra.plugin.core.flow.Pause
- id: run_post_approval
type: io.kestra.plugin.scripts.shell.Commands
taskRunner:
type: io.kestra.plugin.core.runner.Process
commands:
- echo "Manual approval received! Continuing the execution..."
- id: post_resume
type: io.kestra.plugin.core.debug.Return
format: "{{ task.id }} started on {{ taskrun.startDate }} after the Pause"
Vacation approval process pausing the execution for approval and waiting for input from a human to approve or reject the request.
id: vacation_approval_process
namespace: company.team
inputs:
- id: request.name
type: STRING
defaults: Rick Astley
- id: request.start_date
type: DATE
defaults: 2042-07-01
- id: request.end_date
type: DATE
defaults: 2042-07-07
- id: slack_webhook_uri
type: URI
defaults: https://reqres.in/api/slack
tasks:
- id: send_approval_request
type: io.kestra.plugin.slack.notifications.SlackIncomingWebhook
url: "{{ inputs.slack_webhook_uri }}"
payload: |
{
"channel": "#vacation",
"text": "Validate holiday request for {{ inputs.request.name }}. To approve the request, click on the `Resume` button here http://localhost:28080/ui/executions/{{flow.namespace}}/{{flow.id}}/{{execution.id}}"
}
- id: wait_for_approval
type: io.kestra.plugin.core.flow.Pause
onResume:
- id: approved
description: Whether to approve the request
type: BOOL
defaults: true
- id: reason
description: Reason for approval or rejection
type: STRING
defaults: Well-deserved vacation
- id: approve
type: io.kestra.plugin.core.http.Request
uri: https://reqres.in/api/products
method: POST
contentType: application/json
body: "{{ inputs.request }}"
- id: log
type: io.kestra.plugin.core.log.Log
message: Status is {{ outputs.wait_for_approval.onResume.reason }}. Process finished with {{ outputs.approve.body }}
Pause the execution and set the execution to WARNING if it has not been resumed after 5 minutes.
id: pause_warn
namespace: company.team
tasks:
- id: pause
type: io.kestra.plugin.core.flow.Pause
pauseDuration: PT5M
behavior: WARN
- id: post_resume
type: io.kestra.plugin.core.debug.Return
format: "{{ task.id }} started on {{ taskrun.startDate }} after the Pause"
Properties
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150behavior string
RESUMERESUMEWARNCANCELFAILPause behavior, by default set to RESUME. This property controls happens when a pause task reach its duration.
Tasks that are resumed before the duration (for example, from the UI) will not use the behavior property but will always succeed. Possible values are:
- RESUME: continues with the execution
- WARN: ends the Pause task in WARNING and continues with the execution
- FAIL: fails the Pause task
- CANCEL: cancels the execution
errors array
List of tasks to run if any tasks failed on this FlowableTask.
finally array
onPause
A runnable task that will be executed when it's paused
onResume
Inputs to be passed to the execution when it's resumed
Before resuming the execution, the user will be prompted to fill in these inputs. The inputs can be used to pass additional data to the execution, which is useful for human-in-the-loop scenarios. The onResume inputs work the same way as regular flow inputs — they can be of any type and can have default values. You can access those values in downstream tasks using the onResume output of the Pause task.
pauseDuration string
durationDuration of the pause - if not set, the task will wait forever to be manually resumed except if a timeout is set, in this case, the timeout will be honored.
The duration is a string in ISO 8601 Duration format, e.g. PT1H for 1 hour, PT30M for 30 minutes, PT10S for 10 seconds, P1D for 1 day, etc. If no pauseDuration and no timeout are configured, the execution will never end until it's manually resumed from the UI or API.
Outputs
onResume object
resumed
Resumed information: when and by who the execution was resumed
io.kestra.plugin.core.flow.Pause-Resumed
date-timeCREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED