Camunda Trigger

Camunda Trigger

Certified

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.

yaml
type: io.kestra.plugin.camunda.Trigger

React to Camunda jobs of a given type and complete them from the flow.

yaml
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.

yaml
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

Type of the jobs to activate

Matches the task definition type of the BPMN service task.

Defaultfalse

Specifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.

OAuth2 audience

OAuth2 token endpoint, required for a self-managed cluster

OAuth2 client ID

OAuth2 client secret

Camunda SaaS cluster ID

SubTypestring

Variables to fetch for each job

Fetches every process variable when not set, which can be expensive on processes carrying large payloads.

gRPC gateway address of the Camunda cluster

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 for Basic authentication

Camunda SaaS region

REST API base URL of the Camunda cluster

SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

List of execution states after which a trigger should be stopped (a.k.a. disabled).

Defaultfalse

Push 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.

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.

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.

Possible Values
RESTGRPC

Which 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 for Basic authentication

Defaulttrue

A 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.

Name reported to Camunda as the job worker name

Shows up in Operate and in the worker trigger output. Defaults to the trigger ID.

BPMN process ID of the process instance

SubTypestring

Custom headers defined on the BPMN element

Formatdate-time

Instant 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.

ID of the BPMN element that created the job

Key of the element instance that created the job

Key of the activated job

Pass it to the CompleteJob task to report the job as done.

Key of the process definition

Version of the process definition

Key of the process instance the job belongs to

Remaining retries of the job

Tenant the job belongs to

Variables of the job, limited to fetchVariables when it is set

Name of the worker that activated the job