
Camunda Trigger
CertifiedStart a flow for each Camunda job of a given type
Camunda Trigger
Start a flow for each Camunda job of a given type
Holds a Camunda job worker open and starts one execution per activated job, so a Kestra flow can implement a BPMN service task.
The job is not completed by the trigger: the flow reports the outcome with CompleteJob on success and FailJob on error, both keyed on {{ trigger.jobKey }}.
Always report an outcome. Camunda re-offers a job whose lock expired without decrementing its retries, so a flow
that reports neither is activated again every timeout, fails again, and repeats for as long as the process
instance lives. Retries never reach zero, so no incident is raised and nothing surfaces in Operate.
Delivery is at-least-once: a lock expiry, a worker restart mid-flow, or a flow slower than timeout all produce
a second execution for the same job. Keep timeout above the expected flow duration, and make the work
idempotent or guard it with the job key if a repeat would be harmful.
Job activation uses the same transport as the tasks, which is the REST API when restAddress is set. Set grpcAddress together with streamEnabled for push-based streaming instead of long polling.
type: io.kestra.plugin.camunda.TriggerExamples
React to Camunda jobs of a given type and complete them from the flow.
id: handle_camunda_job
namespace: company.team
triggers:
- id: on_camunda_job
type: io.kestra.plugin.camunda.Trigger
restAddress: "{{ secret('CAMUNDA_REST_ADDRESS') }}"
clientId: "{{ secret('CAMUNDA_CLIENT_ID') }}"
clientSecret: "{{ secret('CAMUNDA_CLIENT_SECRET') }}"
authorizationServerUrl: "{{ secret('CAMUNDA_AUTH_SERVER_URL') }}"
audience: "{{ secret('CAMUNDA_AUDIENCE') }}"
jobType: send-notification
timeout: PT5M
tasks:
- id: handle_job
type: io.kestra.plugin.core.log.Log
message: "Handling Camunda job {{ trigger.jobKey }} for process instance {{ trigger.processInstanceKey }}"
- id: complete_job
type: io.kestra.plugin.camunda.CompleteJob
restAddress: "{{ secret('CAMUNDA_REST_ADDRESS') }}"
clientId: "{{ secret('CAMUNDA_CLIENT_ID') }}"
clientSecret: "{{ secret('CAMUNDA_CLIENT_SECRET') }}"
authorizationServerUrl: "{{ secret('CAMUNDA_AUTH_SERVER_URL') }}"
audience: "{{ secret('CAMUNDA_AUDIENCE') }}"
jobKey: "{{ trigger.jobKey }}"
Stream jobs over gRPC from a local development cluster and only fetch the variables the flow needs.
id: stream_camunda_jobs
namespace: company.team
triggers:
- id: on_camunda_job
type: io.kestra.plugin.camunda.Trigger
grpcAddress: http://localhost:26500
streamEnabled: true
jobType: charge-payment
fetchVariables:
- orderId
- amount
tasks:
- id: log_job
type: io.kestra.plugin.core.log.Log
message: "Charging {{ trigger.variables.amount }} for order {{ trigger.variables.orderId }}"
- id: complete_job
type: io.kestra.plugin.camunda.CompleteJob
grpcAddress: http://localhost:26500
jobKey: "{{ trigger.jobKey }}"
Properties
jobType *Requiredstring
Type of the jobs to activate
Matches the task definition type of the BPMN service task.
allowConcurrent Non-dynamicboolean
falseSpecifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.
audience string
OAuth2 audience
clientId string
OAuth2 client ID
clientSecret string
OAuth2 client secret
clusterId string
Camunda SaaS cluster ID
fetchVariables array
Variables to fetch for each job
Fetches every process variable when not set, which can be expensive on processes carrying large payloads.
grpcAddress string
gRPC gateway address of the Camunda cluster
maxJobsActive integerstring
Maximum number of jobs activated at once
Bounds how many jobs the worker activates before asking Camunda for more. Defaults to the client default of 32.
It does not cap how many executions run at once: the trigger releases each job as soon as its execution is
created, so the slot frees immediately. Use the flow's concurrency block to limit parallel executions, and
keep timeout above the resulting queue wait or the lock expires while an execution is still queued.
password string
Password for Basic authentication
region string
Camunda SaaS region
restAddress string
REST API base URL of the Camunda cluster
stopAfter Non-dynamicarray
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDList of execution states after which a trigger should be stopped (a.k.a. disabled).
streamEnabled booleanstring
falsePush jobs over a gRPC stream instead of long polling
Requires grpcAddress, job streaming has no REST equivalent. Disabled by default so that a trigger configured with restAddress alone does not open a stream to an unreachable gateway.
tenantId string
Camunda tenant ID the worker activates jobs for
Camunda's own multi-tenancy identifier, unrelated to the Kestra tenant the flow runs in.
Defaults to <default>, so on a multi-tenant cluster a worker left unset will not see
jobs belonging to any other tenant.
timeout string
How long the job stays locked for this worker
ISO-8601 duration. Must be longer than the flow takes to complete the job, otherwise Camunda hands the job to another worker and the flow runs twice. Defaults to the client default of 5 minutes.
transport string
RESTGRPCWhich API to send commands and job activation over
Defaults to gRPC on Camunda SaaS, and on a self-managed cluster to the API implied by
whichever address is set. streamEnabled always uses gRPC regardless.
username string
Username for Basic authentication
when string
trueA condition that determines whether the trigger should run.
A Pebble expression evaluated at trigger time. The trigger fires only when the expression evaluates to a truthy value (true, a non-empty string, a non-zero number). Use this to gate trigger execution on dynamic runtime values such as execution labels, flow variables, or environment conditions.
workerName string
Name reported to Camunda as the job worker name
Shows up in Operate and in the worker trigger output. Defaults to the trigger ID.
Outputs
bpmnProcessId string
BPMN process ID of the process instance
customHeaders object
Custom headers defined on the BPMN element
deadline string
date-timeInstant at which the job lock expires
Camunda makes the job available to workers again after this point, so the flow should complete the job before it.
elementId string
ID of the BPMN element that created the job
elementInstanceKey integer
Key of the element instance that created the job
jobKey integer
Key of the activated job
Pass it to the CompleteJob task to report the job as done.
processDefinitionKey integer
Key of the process definition
processDefinitionVersion integer
Version of the process definition
processInstanceKey integer
Key of the process instance the job belongs to
retries integer
Remaining retries of the job
tenantId string
Tenant the job belongs to
variables object
Variables of the job, limited to fetchVariables when it is set
worker string
Name of the worker that activated the job