Camunda CompleteJob

Camunda CompleteJob

Certified

Complete a Camunda job

Reports a job as done so the process instance moves past the service task, optionally merging output variables into it. Use it with the Trigger, which activates a job and hands its key to the flow without completing it. Camunda accepts the command only while the job lock is held, so the flow must finish within the trigger timeout.

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

Handle a Camunda job in Kestra and report the outcome back to the process instance.

yaml
id: handle_camunda_job
namespace: company.team

triggers:
  - id: on_camunda_job
    type: io.kestra.plugin.camunda.Trigger
    grpcAddress: "{{ secret('CAMUNDA_GRPC_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: send_notification
    type: io.kestra.plugin.core.log.Log
    message: "Notifying about order {{ trigger.variables.orderId }}"

  - 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 }}"
    variables:
      notified: true
Properties

Key of the job to complete

Available as {{ trigger.jobKey }} when the execution was started by the Camunda trigger.

OAuth2 audience

Required for OAuth2 against a self-managed cluster. The audience claim the identity provider must issue the token for, commonly zeebe-api. Derived from the cluster for Camunda SaaS, so leave it unset there.

OAuth2 token endpoint

Required for OAuth2 against a self-managed cluster, for example http://localhost: 18080/auth/realms/camunda-platform/protocol/openid-connect/token.

OAuth2 client ID

Set together with clientSecret and either authorizationServerUrl (self-managed) or clusterId (SaaS).

OAuth2 client secret

Set together with clientId.

Camunda SaaS cluster ID

Switches the client to SaaS mode, where restAddress and grpcAddress are derived from the cluster ID and region.

gRPC gateway address of the Camunda cluster

For a self-managed cluster, for example http://localhost: 26500. Setting it without restAddress sends this task's commands over gRPC instead of REST.

Password for Basic authentication

Must be set together with username.

Camunda SaaS region

For example bru-2. Only used with clusterId.

REST API base URL of the Camunda cluster

For a self-managed cluster, the orchestration cluster address, for example http://localhost: 8080. Commands use the REST API unless only grpcAddress is set.

Camunda tenant ID

Camunda's own multi-tenancy identifier, unrelated to the Kestra tenant the flow runs in. Applied to every command this task sends. Defaults to <default>, which is the only tenant on a cluster that does not have multi-tenancy enabled.

Possible Values
RESTGRPC

Which API to send commands over

Defaults to gRPC on Camunda SaaS, and on a self-managed cluster to the API implied by whichever address is set, falling back to REST when both or neither are. SaaS defaults to gRPC because a default free-tier cluster answers 404 Not Found on the REST base the client derives, while gRPC succeeds with the same credentials. Set REST to opt back in if your cluster serves it.

Username for Basic authentication

Must be set together with password. Mutually exclusive with the OAuth2 properties.

Variables to merge into the process instance