
Camunda CreateProcessInstance
CertifiedStart a Camunda process instance
Camunda CreateProcessInstance
Start a Camunda process instance
Starts an instance of a deployed process, either by its BPMN process ID or by a process definition key.
With awaitCompletion set to true the task blocks until the process instance ends and returns its variables,
so requestTimeout must be longer than the process takes to run.
type: io.kestra.plugin.camunda.CreateProcessInstanceExamples
Start a process instance and pass flow inputs as process variables.
id: start_camunda_process
namespace: company.team
inputs:
- id: orderId
type: STRING
tasks:
- id: start_process
type: io.kestra.plugin.camunda.CreateProcessInstance
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') }}"
processId: order-fulfillment
variables:
orderId: "{{ inputs.orderId }}"
Start a process instance, wait for it to finish, and read a result variable.
id: run_camunda_process
namespace: company.team
tasks:
- id: run_process
type: io.kestra.plugin.camunda.CreateProcessInstance
restAddress: http://localhost:8080
processId: order-fulfillment
variables:
orderId: ORD-123
awaitCompletion: true
fetchVariables:
- totalAmount
requestTimeout: PT2M
- id: log_total
type: io.kestra.plugin.core.log.Log
message: "Order total is {{ outputs.run_process.variables.totalAmount }}"
Properties
audience string
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.
awaitCompletion booleanstring
falseWait for the process instance to complete
When true, the task returns only once the process instance has ended, and its variables are available in the variables output.
Killing the execution while it waits stops the task but not the process instance, Camunda keeps running it. The process
instance key is only known once the command returns, so there is nothing to cancel it by while the wait is in flight.
clientId string
OAuth2 client ID
Set together with clientSecret and either authorizationServerUrl (self-managed) or clusterId (SaaS).
clientSecret string
OAuth2 client secret
Set together with clientId.
clusterId string
Camunda SaaS cluster ID
Switches the client to SaaS mode, where restAddress and grpcAddress are derived from the cluster ID and region.
fetchVariables array
Variables to return when awaiting completion
Only used with awaitCompletion. Returns every process variable when not set.
grpcAddress string
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 string
Password for Basic authentication
Must be set together with username.
processDefinitionKey integerstring
Key of the process definition to start
Targets one exact deployed version. Mutually exclusive with processId.
processId string
BPMN process ID of the process to start
The id attribute of the process element. Mutually exclusive with processDefinitionKey.
processVersion integerstring
Version of the process definition
Only used with processId. Defaults to the latest deployed version.
region string
Camunda SaaS region
For example bru-2. Only used with clusterId.
requestTimeout string
Timeout of the command sent to Camunda
ISO-8601 duration. Defaults to the client default of 10 seconds, which is usually too short when awaitCompletion is enabled.
restAddress string
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.
tenantId string
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.
transport string
RESTGRPCWhich 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 string
Username for Basic authentication
Must be set together with password. Mutually exclusive with the OAuth2 properties.
variables object
Variables to set on the new process instance
Outputs
bpmnProcessId string
BPMN process ID of the started process
processDefinitionKey integer
Key of the process definition that was instantiated
processInstanceKey integer
Key of the created process instance
tenantId string
Tenant the process instance belongs to
variables object
Variables of the completed process instance
Only set when awaitCompletion is enabled.
version integer
Version of the process definition that was instantiated