Class CamundaClientImpl
- All Implemented Interfaces:
JobClient,CamundaClient,AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionCamundaClientImpl(CamundaClientConfiguration configuration) CamundaClientImpl(CamundaClientConfiguration configuration, io.grpc.ManagedChannel channel) CamundaClientImpl(CamundaClientConfiguration configuration, io.grpc.ManagedChannel channel, HttpClient httpClient) CamundaClientImpl(CamundaClientConfiguration configuration, io.grpc.ManagedChannel channel, io.camunda.zeebe.gateway.protocol.GatewayGrpc.GatewayStub gatewayStub) CamundaClientImpl(CamundaClientConfiguration config, io.grpc.ManagedChannel channel, io.camunda.zeebe.gateway.protocol.GatewayGrpc.GatewayStub gatewayStub, JobWorkerExecutors executorResource) CamundaClientImpl(CamundaClientConfiguration config, io.grpc.ManagedChannel channel, io.camunda.zeebe.gateway.protocol.GatewayGrpc.GatewayStub gatewayStub, JobWorkerExecutors executorResource, HttpClient httpClient) -
Method Summary
Modifier and TypeMethodDescriptionstatic io.grpc.ManagedChannelstatic io.camunda.zeebe.gateway.protocol.GatewayGrpc.GatewayStubbuildGatewayStub(io.grpc.ManagedChannel channel, CamundaClientConfiguration config) voidclose()newActivateAdHocSubProcessActivitiesCommand(String adHocSubProcessInstanceKey) Command to activate activities within an activated ad-hoc sub-process.Command to activate multiple jobs of a given type.newAgentInstanceGetRequest(long agentInstanceKey) Creates a request to fetch an agent instance by its key.newAgentInstanceHistorySearchRequest(long agentInstanceKey) Creates a request to search the conversation history of an agent instance.Creates a request to search for agent instances.Command to assign a client to a group.Command to assign a client to a tenant.Command to assign a group to a tenant.Command to assign a mapping rule to a group.Command to assign a mapping rule to a tenant.newAssignProcessInstanceBusinessIdCommand(long processInstanceKey) Command to assign a business id to an already running process instance.Command to assign a role to a client.Command to assign a role to a group.Command to assign a role to a mapping rule.Command to assign a role to a tenant.Command to assign a role to a user.newAssignUserTaskCommand(long userTaskKey) Command to assign a user task.Command to assign a user to a group.Command to assign a user to a tenant.newAuditLogGetRequest(String auditLogKey) Request to get an audit log by audit log key.Executes a search request to query audit logs by the audit log key.newAuthorizationGetRequest(long authorizationKey) Request to get an authorization by authorization key.Executes a search request to query authorizations.newBatchOperationGetRequest(String batchOperationKey) Request to get a single batch operation by batch operation key.Executes a search request to query batch operation items.Executes a search request to query batch operations.Command to broadcast a signal.newCancelBatchOperationCommand(String batchOperationKey) Command to cancel a batch operationnewCancelInstanceCommand(long processInstanceKey) Command to cancel a process instance.newClientsByGroupSearchRequest(String groupId) Executes a search request to query clients by group.newClientsByRoleSearchRequest(String roleId) Executes a search request to query clients by role.newClientsByTenantSearchRequest(String tenantId) Executes a search request to query clients by tenant.Creates a request to search for cluster variables.newCompleteCommand(long jobKey) Command to complete a job.Command to complete a job.newCompleteUserTaskCommand(long userTaskKey) Command to complete a user task.Executes a search request to query correlated message subscriptions.Command to correlate a message and wait for it to be correlated against a process instance.newCreateAgentHistoryItemCommand(long agentInstanceKey) Creates a command to append a conversation history item to an agent instance.Creates a command to create a new agent instance.Command to create an authorizationCommand to create a batch operationExperimental: This method is under development.Experimental: This method is under development.newCreateDocumentLinkCommand(DocumentReferenceResponse documentReference) Experimental: This method is under development.newCreateDocumentLinkCommand(String documentId) Experimental: This method is under development.Creates a request to create a new global task listener.Command to create a group.Command to create/start a new instance of a process.Command to create a mapping rule.Command to create a role.Command to create a tenant.Command to create a user.newDecisionDefinitionGetRequest(long decisionDefinitionKey) Gets a decision definition by key.newDecisionDefinitionGetXmlRequest(long decisionKey) Retrieves the XML representation of a decision definition.Executes a search request to query decision definitions.newDecisionInstanceGetRequest(String decisionInstanceId) Retrieves a decision instance by id.Executes a search request to query decision instances.newDecisionRequirementsGetRequest(long decisionRequirementsKey) Gets a decision requirements by key.newDecisionRequirementsGetXmlRequest(long decisionRequirementsKey) Retrieves the XML representation of a decision requirements.Executes a search request to query Decision Requirements.newDeleteAuthorizationCommand(long authorizationKey) Command to delete an authorizationnewDeleteDecisionInstanceCommand(long decisionInstanceKey) Command to delete a decision instance history.newDeleteDocumentCommand(DocumentReferenceResponse documentReference) Experimental: This method is under development.newDeleteDocumentCommand(String documentId) Experimental: This method is under development.Creates a request to delete a global task listener.newDeleteGroupCommand(String groupId) Command to delete a group.newDeleteMappingRuleCommand(String mappingRuleId) Command to delete a mapping rule.newDeleteProcessInstanceCommand(long processInstanceKey) Command to delete a process instance history.newDeleteResourceCommand(long resourceKey) Command to delete a resource.newDeleteRoleCommand(String roleId) Command to delete a role by role ID.newDeleteTenantCommand(String tenantId) Command to delete a tenant.newDeleteUserCommand(String username) Command to delete a user by usernameCommand to deploy new processes.Command to deploy new resources, i.e.newDocumentContentGetRequest(DocumentReferenceResponse documentReference) Experimental: This method is under development.newDocumentContentGetRequest(String documentId) Experimental: This method is under development.newElementInstanceGetRequest(long elementInstanceKey) Gets a element instance by key.Executes a search request to query element instances.Executes a search request to query element instance wait states.Command to evaluate root-level conditional start events for process definitions.Command to evaluate a decision.Command to evaluate an expression.newFailCommand(long jobKey) Command to mark a job as failed.Command to mark a job as failed.newFormGetRequest(long formKey) Gets a Form by key.Executes a request to query global job statistics.Creates a request to create a new globally-scoped cluster variable.Creates a request to delete a globally-scoped cluster variable.Creates a request to fetch a globally-scoped cluster variable by name.Creates a request to update a globally-scoped cluster variable.Creates a request to fetch a global task listener by id.Creates a request to search for global task listeners.newGroupGetRequest(String groupId) Request to get a group by group ID.newGroupsByRoleSearchRequest(String roleId) Executes a search request to query groups by role.newGroupsByTenantSearchRequest(String tenantId) Executes a search request to query groups by tenant.Executes a search request to query groups.newIncidentGetRequest(long incidentKey) Gets an incident by key.newIncidentProcessInstanceStatisticsByDefinitionRequest(int errorHashCode) Executes a statistics request that returns counts of active process instances with active incidents, grouped by process definition.Retrieves statistics about active process instances that currently have active incidents, grouped by incident error hash code.newIncidentsByElementInstanceSearchRequest(long elementInstanceKey) Executes a search request to query incidents by element instance key.newIncidentsByProcessInstanceSearchRequest(long processInstanceKey) Executes a search request to query incidents by process instance key.Executes a search request to query incidents.newJobErrorStatisticsRequest(OffsetDateTime from, OffsetDateTime to, String jobType) Executes a request to query per-error job metrics for a specific job type.Executes a search request to query jobs.newJobTimeSeriesStatisticsRequest(OffsetDateTime from, OffsetDateTime to, String jobType) Executes a request to query time-bucketed job metrics for a specific job type.Executes a request to query job statistics grouped by job type.newJobWorkerStatisticsRequest(OffsetDateTime from, OffsetDateTime to, String jobType) Executes a request to query job statistics grouped by worker for a specific job type.newMappingRuleGetRequest(String mappingRuleId) Request to get a mapping rule by mapping rule ID.Executes a search request to query mapping rules by group.Executes a search request to query mapping rules by role.newMappingRulesByTenantSearchRequest(String tenantId) Executes a search request to query mapping rules by tenant.Executes a search request to query mapping rules.Executes a search request to query message subscriptions.newMigrateProcessInstanceCommand(long processInstanceKey) Command to migrate a process instance to a different process definition.newModifyProcessInstanceCommand(long processInstanceKey) Command to modify a process instance.Command to pin the Zeebe engine's internal clock to a specific time.newProcessDefinitionElementStatisticsRequest(long processDefinitionKey) Executes a search request to query process definition element statistics.newProcessDefinitionGetFormRequest(long processDefinitionKey) Retrieves the Form of a process definition.newProcessDefinitionGetRequest(long processDefinitionKey) Gets a process definition by key.newProcessDefinitionGetXmlRequest(long processDefinitionKey) Retrieves the XML representation of a process definition.Get statistics about process instances, grouped by process definition and tenant.newProcessDefinitionInstanceVersionStatisticsRequest(String processDefinitionId) Get statistics about process instances, grouped by version for a given process definition.Executes a search request to query process definition message subscription statistics.Executes a search request to query process definitions.newProcessInstanceElementStatisticsRequest(long processInstanceKey) Executes a search request to query process instance element statistics.newProcessInstanceGetCallHierarchyRequest(Long processInstanceKey) Retrieves the call hierarchy for a given process instance by its key.newProcessInstanceGetRequest(long processInstanceKey) Retrieves a process instance by key.Executes a search request to query process instances.newProcessInstanceSequenceFlowsRequest(long processInstanceKey) Executes a search request to query process instance sequence flows.newProcessInstanceWaitStateStatisticsRequest(long processInstanceKey) Executes a request to query process instance wait state statistics, grouped by element id.Command to publish a message which can be correlated to a process instance.Command to reset the Zeebe engine's internal clock to the system time.newResolveIncidentCommand(long incidentKey) Command to resolve an existing incident.newResolveProcessInstanceIncidentsCommand(long processInstanceKey) Command to resolve multiple existing incidents for one process instance.newResourceContentBinaryGetRequest(long resourceKey) Retrieves a resource content as binary by key.newResourceContentGetRequest(long resourceKey) Retrieves a resource content by key.newResourceGetRequest(long resourceKey) Retrieves a resource by key.Executes a search request to query deployed resources.newResumeBatchOperationCommand(String batchOperationKey) Command to resume a batch operationnewResumeProcessInstanceCommand(long processInstanceKey) Command to resume a process instance.newRoleGetRequest(String roleId) Request to get a role by role ID.newRolesByGroupSearchRequest(String groupId) Executes a search request to query roles by group.newRolesByTenantSearchRequest(String tenantId) Executes a search request to query roles assigned to a specific tenant.Executes a search request to query roles.newSetVariablesCommand(long elementInstanceKey) Command to set and/or update the variables of a given flow element (e.g. process instance, task, etc.)Request the current cluster status.Activates and streams jobs of a specific type.newSuspendBatchOperationCommand(String batchOperationKey) Command to suspend a batch operationnewSuspendProcessInstanceCommand(long processInstanceKey) Command to suspend a process instance.newTenantGetRequest(String tenantId) Request to get a tenant by tenant ID.Creates a request to create a new tenant-scoped cluster variable.Creates a request to delete a tenant-scoped cluster variable.Creates a request to fetch a tenant-scoped cluster variable by name.Creates a request to update a tenant-scoped cluster variable.Executes a search request to query tenants.newThrowErrorCommand(long jobKey) Command to report a business error (i.e. non-technical) that occurs while processing a job.Command to report a business error (i.e. non-technical) that occurs while processing a job.Request the current cluster topology.Command to unassign a client from a group.Command to unassign a client from a tenant.Command to unassign a group from a tenant.Command to unassign a mapping rule from a group.Command to unassign a mapping rule from a tenant.Command to unassign a role from a client.Command to unassign a role from a group.Command to unassign a role from a mapping rule.Command to unassign a role from a tenant.Command to unassign a role from a user.Command to unassign a user from a group.Command to unassign a user from a tenant.newUnassignUserTaskCommand(long userTaskKey) Command to unassign a user task.newUpdateAgentInstanceCommand(long agentInstanceKey) Creates a command to update an existing agent instance.newUpdateAuthorizationCommand(long authorizationKey) Command to update an authorizationCreates a request to update an existing global task listener.newUpdateGroupCommand(String groupId) Command to update a group.newUpdateJobCommand(long jobKey) Command to update the retries and/or the timeout of a job.Command to update the retries and/or the timeout of a job.newUpdateJobPriorityCommand(long jobKey) Command to update the priority of a job.Command to update the priority of a job.newUpdateMappingRuleCommand(String mappingRuleId) Command to update a mapping rule.newUpdateRetriesCommand(long jobKey) Command to update the retries of a job.Command to update the retries of a job.newUpdateRoleCommand(String roleId) Command to update a role.newUpdateTenantCommand(String tenantId) Creates a command to update the name of an existing tenant.newUpdateTimeoutCommand(long jobKey) Command to update the timeout of a job.Command to update the timeout of a job.newUpdateUserCommand(String username) Command to update a user.newUpdateUserTaskCommand(long userTaskKey) Command to update a user task.newUsageMetricsRequest(OffsetDateTime startTime, OffsetDateTime endTime) Executes a search request to query usage metrics statistics.newUserGetRequest(String username) Request to get a user by username.newUsersByGroupSearchRequest(String groupId) Executes a search request to query users by group.newUsersByRoleSearchRequest(String roleId) Executes a search request to query users by role.newUsersByTenantSearchRequest(String tenantId) Executes a search request to query users assigned to a tenant.Executes a search request to query users.newUserTaskAuditLogSearchRequest(long userTaskKey) Executes a search request to query audit logs related to a user task.newUserTaskEffectiveVariableSearchRequest(long userTaskKey) Executes a search request to query effective variables related to a user task.newUserTaskGetFormRequest(long userTaskKey) Gets a user task form by key.newUserTaskGetRequest(long userTaskKey) Gets a User Task by key.Executes a search request to query user tasks.newUserTaskVariableSearchRequest(long userTaskKey) Executes a search request to query variables related to a user task.newVariableGetRequest(long variableKey) Gets a variable by key.Executes a search request to query variables.Registers a new job worker for jobs of a given type.
-
Constructor Details
-
CamundaClientImpl
-
CamundaClientImpl
-
CamundaClientImpl
public CamundaClientImpl(CamundaClientConfiguration configuration, io.grpc.ManagedChannel channel, HttpClient httpClient) -
CamundaClientImpl
public CamundaClientImpl(CamundaClientConfiguration configuration, io.grpc.ManagedChannel channel, io.camunda.zeebe.gateway.protocol.GatewayGrpc.GatewayStub gatewayStub) -
CamundaClientImpl
public CamundaClientImpl(CamundaClientConfiguration config, io.grpc.ManagedChannel channel, io.camunda.zeebe.gateway.protocol.GatewayGrpc.GatewayStub gatewayStub, JobWorkerExecutors executorResource) -
CamundaClientImpl
public CamundaClientImpl(CamundaClientConfiguration config, io.grpc.ManagedChannel channel, io.camunda.zeebe.gateway.protocol.GatewayGrpc.GatewayStub gatewayStub, JobWorkerExecutors executorResource, HttpClient httpClient)
-
-
Method Details
-
buildChannel
-
buildGatewayStub
public static io.camunda.zeebe.gateway.protocol.GatewayGrpc.GatewayStub buildGatewayStub(io.grpc.ManagedChannel channel, CamundaClientConfiguration config) -
newTopologyRequest
Description copied from interface:CamundaClientRequest the current cluster topology. Can be used to inspect which brokers are available at which endpoint and which broker is the leader of which partition.List<BrokerInfo> brokers = camundaClient .newTopologyRequest() .send() .join() .getBrokers(); InetSocketAddress address = broker.getSocketAddress(); List<PartitionInfo> partitions = broker.getPartitions();
- Specified by:
newTopologyRequestin interfaceCamundaClient- Returns:
- the request where you must call
send()
-
newStatusRequest
Description copied from interface:CamundaClientRequest the current cluster status. Can be used to check if the cluster is healthy (has at least one partition with a healthy leader).boolean isHealthy = camundaClient .newStatusRequest() .send() .join() .isHealthy();
- Specified by:
newStatusRequestin interfaceCamundaClient- Returns:
- the request where you must call
send()
-
getConfiguration
- Specified by:
getConfigurationin interfaceCamundaClient- Returns:
- the client's configuration
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCamundaClient
-
newDeployCommand
Description copied from interface:CamundaClientCommand to deploy new processes.camundaClient .newDeployCommand() .addResourceFile("~/wf/process1.bpmn") .addResourceFile("~/wf/process2.bpmn") .send();- Specified by:
newDeployCommandin interfaceCamundaClient- Returns:
- a builder for the command
-
newDeployResourceCommand
Description copied from interface:CamundaClientCommand to deploy new resources, i.e. BPMN process models and DMN decision models.camundaClient .newDeployCommand() .addResourceFile("~/wf/process1.bpmn") .addResourceFile("~/wf/process2.bpmn") .addResourceFile("~/dmn/decision.dmn") .send();- Specified by:
newDeployResourceCommandin interfaceCamundaClient- Returns:
- a builder for the command
-
newCreateInstanceCommand
Description copied from interface:CamundaClientCommand to create/start a new instance of a process.camundaClient .newCreateInstanceCommand() .bpmnProcessId("my-process") .latestVersion() .variables(json) .send();- Specified by:
newCreateInstanceCommandin interfaceCamundaClient- Returns:
- a builder for the command
-
newModifyProcessInstanceCommand
Description copied from interface:CamundaClientCommand to modify a process instance.camundaClient .newModifyProcessInstanceCommand(processInstanceKey) .activateElement("element1") .and() .activateElement("element2") .withVariables(globalScopedVariables) .withVariables(localScopedVariables, "element2") .and() .terminateElement("element3") .send();- Specified by:
newModifyProcessInstanceCommandin interfaceCamundaClient- Parameters:
processInstanceKey- the key which identifies the corresponding process instance- Returns:
- a builder for the command
-
newMigrateProcessInstanceCommand
Description copied from interface:CamundaClientCommand to migrate a process instance to a different process definition.The migration command contains a migration plan. Migration plan contains targetProcessDefinitionKey to indicate which process definition to use for the migration. Mapping instructions for the migration describe how to map elements from the source process definition to the target process definition.
For example, let's consider we want to migrate process instance with key
1, target process definition key2, a source process definition with a service task with id"task1"and the target process definition with a service task with id"task2". The migration command could be:{ "processInstanceKey": 1, "migrationPlan": { "targetProcessDefinitionKey": 2, "mappingInstructions": [ { "sourceElementId": "task1", "targetElementId": "task2" } ] } }camundaClient .newMigrateProcessInstanceCommand(1L) .migrationPlan(2L) .addMappingInstruction("element1", "element2") .addMappingInstruction("element3", "element4") .send();final MigrationPlan migrationPlan = MigrationPlan.newBuilder() .withTargetProcessDefinitionKey(2L) .addMappingInstruction("element1", "element2") .addMappingInstruction("element3", "element4") .build(); camundaClient .newMigrateProcessInstanceCommand(1L) .migrationPlan(migrationPlan) .send();- Specified by:
newMigrateProcessInstanceCommandin interfaceCamundaClient- Parameters:
processInstanceKey- the key which refers to the process instance to migrate- Returns:
- a builder for the command
-
newAssignProcessInstanceBusinessIdCommand
public AssignProcessInstanceBusinessIdCommandStep1 newAssignProcessInstanceBusinessIdCommand(long processInstanceKey) Description copied from interface:CamundaClientCommand to assign a business id to an already running process instance.This allows attaching a business id to a process instance that was started without one. The assignment is rejected if the instance already has a different business id, if it is a child instance created by a call activity, or if business id uniqueness is enabled for its process definition.
camundaClient .newAssignProcessInstanceBusinessIdCommand(processInstanceKey) .businessId("order-4711") .send();- Specified by:
newAssignProcessInstanceBusinessIdCommandin interfaceCamundaClient- Parameters:
processInstanceKey- the key of the process instance to assign the business id to- Returns:
- a builder for the command
-
newCancelInstanceCommand
Description copied from interface:CamundaClientCommand to cancel a process instance.camundaClient .newCancelInstanceCommand(processInstanceKey) .send();
- Specified by:
newCancelInstanceCommandin interfaceCamundaClient- Parameters:
processInstanceKey- the key which identifies the corresponding process instance- Returns:
- a builder for the command
-
newSuspendProcessInstanceCommand
Description copied from interface:CamundaClientCommand to suspend a process instance.camundaClient .newSuspendProcessInstanceCommand(processInstanceKey) .send();
- Specified by:
newSuspendProcessInstanceCommandin interfaceCamundaClient- Parameters:
processInstanceKey- the key which identifies the corresponding process instance- Returns:
- a builder for the command
-
newResumeProcessInstanceCommand
Description copied from interface:CamundaClientCommand to resume a process instance.camundaClient .newResumeProcessInstanceCommand(processInstanceKey) .send();
- Specified by:
newResumeProcessInstanceCommandin interfaceCamundaClient- Parameters:
processInstanceKey- the key which identifies the corresponding process instance- Returns:
- a builder for the command
-
newDeleteProcessInstanceCommand
Description copied from interface:CamundaClientCommand to delete a process instance history.camundaClient .newDeleteProcessInstanceCommand(processInstanceKey) .send();
- Specified by:
newDeleteProcessInstanceCommandin interfaceCamundaClient- Parameters:
processInstanceKey- the key which identifies the corresponding process instance- Returns:
- a builder for the command
-
newSetVariablesCommand
Description copied from interface:CamundaClientCommand to set and/or update the variables of a given flow element (e.g. process instance, task, etc.)camundaClient .newSetVariablesCommand(elementInstanceKey) .variables(json) .send();
- Specified by:
newSetVariablesCommandin interfaceCamundaClient- Parameters:
elementInstanceKey- the key of the element instance to set/update the variables for- Returns:
- a builder for the command
-
newEvaluateDecisionCommand
Description copied from interface:CamundaClientCommand to evaluate a decision.camundaClient .newEvaluateDecisionCommand() .decisionKey("my-decision") .variables(json) .send();- Specified by:
newEvaluateDecisionCommandin interfaceCamundaClient- Returns:
- a builder for the command
-
newPublishMessageCommand
Description copied from interface:CamundaClientCommand to publish a message which can be correlated to a process instance.camundaClient .newPublishMessageCommand() .messageName("order canceled") .correlationKey(orderId) .variables(json) .send();- Specified by:
newPublishMessageCommandin interfaceCamundaClient- Returns:
- a builder for the command
-
newCorrelateMessageCommand
Description copied from interface:CamundaClientCommand to correlate a message and wait for it to be correlated against a process instance.camundaClient .newCorrelateMessageCommand() .messageName("order canceled") .correlationKey(orderId) .variables(json) .tenantId("tenant") .send();- Specified by:
newCorrelateMessageCommandin interfaceCamundaClient- Returns:
- a builder for the command
-
newBroadcastSignalCommand
Description copied from interface:CamundaClientCommand to broadcast a signal.camundaClient .newBroadcastSignalCommand() .signalName("signal") .variables(json) .send();- Specified by:
newBroadcastSignalCommandin interfaceCamundaClient- Returns:
- a builder for the command
-
newResolveIncidentCommand
Description copied from interface:CamundaClientCommand to resolve an existing incident.camundaClient .newResolveIncidentCommand(incidentKey) .send();
- Specified by:
newResolveIncidentCommandin interfaceCamundaClient- Parameters:
incidentKey- the key of the corresponding incident- Returns:
- the builder for the command
-
newResolveProcessInstanceIncidentsCommand
public ResolveProcessInstanceIncidentsCommandStep1 newResolveProcessInstanceIncidentsCommand(long processInstanceKey) Description copied from interface:CamundaClientCommand to resolve multiple existing incidents for one process instance.camundaClient .newResolveProcessInstanceIncidentsCommand(processInstanceKey) .send();
- Specified by:
newResolveProcessInstanceIncidentsCommandin interfaceCamundaClient- Parameters:
processInstanceKey- the key of the process instance to resolve incidents for- Returns:
- the builder for the command
-
newUpdateRetriesCommand
Description copied from interface:CamundaClientCommand to update the retries of a job.long jobKey = ..; camundaClient .newUpdateRetriesCommand(jobKey) .retries(3) .send();
If the given retries are greater than zero then this job will be picked up again by a job worker. This will not close a related incident, which still has to be marked as resolved with
newResolveIncidentCommand(long incidentKey).- Specified by:
newUpdateRetriesCommandin interfaceCamundaClient- Parameters:
jobKey- the key of the job to update- Returns:
- a builder for the command
-
newUpdateRetriesCommand
Description copied from interface:CamundaClientCommand to update the retries of a job.ActivatedJob job= ..; camundaClient .newUpdateRetriesCommand(job) .retries(3) .send();
If the given retries are greater than zero then this job will be picked up again by a job worker. This will not close a related incident, which still has to be marked as resolved with
newResolveIncidentCommand(long incidentKey).- Specified by:
newUpdateRetriesCommandin interfaceCamundaClient- Parameters:
job- the activated job- Returns:
- a builder for the command
-
newUpdateTimeoutCommand
Description copied from interface:CamundaClientCommand to update the timeout of a job.long jobKey = ..; camundaClient .newUpdateTimeoutCommand(jobKey) .timeout(100) .send();
Timeout value in millis is used to calculate a new job deadline. This will happen when the command to update the timeline is processed. The timeout value will be added to the current time then.
- Specified by:
newUpdateTimeoutCommandin interfaceCamundaClient- Parameters:
jobKey- the key of the job to update- Returns:
- a builder for the command
-
newUpdateTimeoutCommand
Description copied from interface:CamundaClientCommand to update the timeout of a job.ActivatedJob job= ..; camundaClient .newUpdateTimeoutCommand(job) .timeout(100) .send();
Timeout value in millis is used to calculate a new job deadline. This will happen when the command to update the timeline is processed. The timeout value will be added to the current time then.
- Specified by:
newUpdateTimeoutCommandin interfaceCamundaClient- Parameters:
job- the activated job- Returns:
- a builder for the command
-
newUpdateJobPriorityCommand
Description copied from interface:CamundaClientCommand to update the priority of a job.long jobKey = ..; camundaClient .newUpdateJobPriorityCommand(jobKey) .priority(5) .send();
- Specified by:
newUpdateJobPriorityCommandin interfaceCamundaClient- Parameters:
jobKey- the key of the job to update- Returns:
- a builder for the command
-
newUpdateJobPriorityCommand
Description copied from interface:CamundaClientCommand to update the priority of a job.ActivatedJob job= ..; camundaClient .newUpdateJobPriorityCommand(job) .priority(5) .send();
- Specified by:
newUpdateJobPriorityCommandin interfaceCamundaClient- Parameters:
job- the activated job- Returns:
- a builder for the command
-
newWorker
Description copied from interface:CamundaClientRegisters a new job worker for jobs of a given type.After registration, the broker activates available jobs and assigns them to this worker. It then publishes them to the client. The given worker is called for every received job, works on them and eventually completes them.
JobWorker worker = camundaClient .newWorker() .jobType("payment") .handler(paymentHandler) .open(); ... worker.close();Example JobHandler implementation:public final class PaymentHandler implements JobHandler { @Override public void handle(JobClient client, JobEvent jobEvent) { String json = jobEvent.getVariables(); // modify variables client .newCompleteCommand() .event(jobEvent) .variables(json) .send(); } };- Specified by:
newWorkerin interfaceCamundaClient- Returns:
- a builder for the worker registration
-
newDeleteResourceCommand
Description copied from interface:CamundaClientCommand to delete a resource.camundaClient .newDeleteResourceCommand(resourceKey) .send();
- Specified by:
newDeleteResourceCommandin interfaceCamundaClient- Parameters:
resourceKey- the key of the resource- Returns:
- the builder for the command
-
newCompleteUserTaskCommand
Description copied from interface:CamundaClientCommand to complete a user task.long userTaskKey = ..; camundaClient .newCompleteUserTaskCommand(userTaskKey) .variables(map) .send();
If the user task is linked to a process instance then this command will complete the related activity and continue the flow.
This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newCompleteUserTaskCommandin interfaceCamundaClient- Parameters:
userTaskKey- the key of the user task- Returns:
- a builder for the command
-
newAssignUserTaskCommand
Description copied from interface:CamundaClientCommand to assign a user task.long userTaskKey = ..; camundaClient .newAssignUserTaskCommand(userTaskKey) .assignee(newAssignee) .send();
This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newAssignUserTaskCommandin interfaceCamundaClient- Parameters:
userTaskKey- the key of the user task- Returns:
- a builder for the command
-
newUpdateUserTaskCommand
Description copied from interface:CamundaClientCommand to update a user task.long userTaskKey = ..; camundaClient .newUpdateUserTaskCommand(userTaskKey) .candidateGroups(newCandidateGroups) .send();
This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newUpdateUserTaskCommandin interfaceCamundaClient- Parameters:
userTaskKey- the key of the user task- Returns:
- a builder for the command
-
newUnassignUserTaskCommand
Description copied from interface:CamundaClientCommand to unassign a user task.long userTaskKey = ..; camundaClient .newUnassignUserTaskCommand(userTaskKey) .send();
This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newUnassignUserTaskCommandin interfaceCamundaClient- Parameters:
userTaskKey- the key of the user task- Returns:
- a builder for the command
-
newUpdateJobCommand
Description copied from interface:CamundaClientCommand to update the retries and/or the timeout of a job.JobChangeset changeset= ..; camundaClient .newUpdateCommand(jobKey) .update(changeset) .send();
If the given retries are greater than zero then this job will be picked up again by a job worker. This will not close a related incident, which still has to be marked as resolved with
newResolveIncidentCommand(long incidentKey).Timeout value in millis is used to calculate a new job deadline. This will happen when the command to update the timeline is processed. The timeout value will be added to the current time then.
- Specified by:
newUpdateJobCommandin interfaceCamundaClient- Parameters:
jobKey- the key of the job to update- Returns:
- a builder for the command
-
newUpdateJobCommand
Description copied from interface:CamundaClientCommand to update the retries and/or the timeout of a job.ActivatedJob job= ..; JobChangeset changeset= ..; camundaClient .newUpdateCommand(job) .update(changeset) .send();
If the given retries are greater than zero then this job will be picked up again by a job worker. This will not close a related incident, which still has to be marked as resolved with
newResolveIncidentCommand(long incidentKey).Timeout value in millis is used to calculate a new job deadline. This will happen when the command to update the timeline is processed. The timeout value will be added to the current time then.
- Specified by:
newUpdateJobCommandin interfaceCamundaClient- Parameters:
job- the activated job- Returns:
- a builder for the command
-
newPinClockCommand
Description copied from interface:CamundaClientCommand to pin the Zeebe engine's internal clock to a specific time.This method initiates a command to pin the clock to a specified time. You can specify the time using either an epoch timestamp in milliseconds or an
Instantobject.Once pinned, the clock will remain at the specified time and will not advance until another
pinorresetcommand is issued. This is useful for scenarios where you need to simulate process execution at a specific point in time.Example usage:
final long pinnedTime = 1742461285000L; // Thu, Mar 20, 2025 09:01:25 GMT+0000 camundaClient .newPinClockCommand() .time(pinnedTime) .send(); final Instant futureInstant = Instant.now().plus(Duration.ofDays(7)); camundaClient .newPinClockCommand() .time(futureInstant) .send();The command is marked as experimental and may undergo changes or improvements in future releases.
- Specified by:
newPinClockCommandin interfaceCamundaClient- Returns:
- a builder for the command that allows setting either a timestamp or an instant
-
newResetClockCommand
Description copied from interface:CamundaClientCommand to reset the Zeebe engine's internal clock to the system time.This command allows you to reset the clock to the current system time, effectively undoing any previous
pincommand that may have set the clock to a specific, static time.camundaClient .newResetClockCommand() .send();The command is marked as experimental and may undergo changes or improvements in future releases.
- Specified by:
newResetClockCommandin interfaceCamundaClient- Returns:
- a builder for the command
-
newProcessDefinitionGetRequest
Description copied from interface:CamundaClientGets a process definition by key.long processDefinitionKey = ...; camundaClient .newProcessDefinitionGetRequest(processDefinitionKey) .send();
- Specified by:
newProcessDefinitionGetRequestin interfaceCamundaClient- Parameters:
processDefinitionKey- the key of the process definition- Returns:
- a builder for the request to get a process definition
-
newProcessDefinitionGetXmlRequest
Description copied from interface:CamundaClientRetrieves the XML representation of a process definition.long processDefinitionKey = ...; camundaClient .newProcessDefinitionGetXmlRequest(processDefinitionKey) .send();
- Specified by:
newProcessDefinitionGetXmlRequestin interfaceCamundaClient- Parameters:
processDefinitionKey- the key of the process definition- Returns:
- a builder for the request to get the XML of a process definition
-
newProcessDefinitionGetFormRequest
public ProcessDefinitionGetFormRequest newProcessDefinitionGetFormRequest(long processDefinitionKey) Description copied from interface:CamundaClientRetrieves the Form of a process definition.long processDefinitionKey = ...; camundaClient .newProcessDefinitionGetFormRequest(processDefinitionKey) .send();
- Specified by:
newProcessDefinitionGetFormRequestin interfaceCamundaClient- Parameters:
processDefinitionKey- the key of the process definition- Returns:
- a builder for the request to get the Form of process definition
-
newFormGetRequest
Description copied from interface:CamundaClientGets a Form by key.long formKey = ...; camundaClient .newFormGetRequest(formKey) .send();
- Specified by:
newFormGetRequestin interfaceCamundaClient- Parameters:
formKey- the key of the form- Returns:
- a builder for the request to get a form
-
newProcessDefinitionSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query process definitions.long processDefinitionKey = ...; camundaClient .newProcessDefinitionSearchRequest() .filter((f) -> f.processDefinitionKey(processDefinitionKey)) .sort((s) -> s.name().asc()) .page((p) -> p.limit(100)) .send();
- Specified by:
newProcessDefinitionSearchRequestin interfaceCamundaClient- Returns:
- a builder for the process definition search request
-
newResourceSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query deployed resources.long resourceKey = ...; camundaClient .newResourceSearchRequest() .filter((f) -> f.resourceKey(resourceKey)) .sort((s) -> s.resourceName().asc()) .page((p) -> p.limit(100)) .send();
- Specified by:
newResourceSearchRequestin interfaceCamundaClient- Returns:
- a builder for the resource search request
-
newProcessDefinitionElementStatisticsRequest
public ProcessDefinitionElementStatisticsRequest newProcessDefinitionElementStatisticsRequest(long processDefinitionKey) Description copied from interface:CamundaClientExecutes a search request to query process definition element statistics.long processDefinitionKey = ...; camundaClient .newProcessDefinitionElementStatisticsRequest(processDefinitionKey) .filter((f) -> f.processInstanceKey(processInstanceKey)) .send();
- Specified by:
newProcessDefinitionElementStatisticsRequestin interfaceCamundaClient- Returns:
- a builder for the process definition statistics request
-
newProcessInstanceElementStatisticsRequest
public ProcessInstanceElementStatisticsRequest newProcessInstanceElementStatisticsRequest(long processInstanceKey) Description copied from interface:CamundaClientExecutes a search request to query process instance element statistics.long processInstanceKey = ...; camundaClient .newProcessInstanceElementStatisticsRequest(processInstanceKey) .send();
- Specified by:
newProcessInstanceElementStatisticsRequestin interfaceCamundaClient- Returns:
- a builder for the process instance statistics request
-
newProcessInstanceWaitStateStatisticsRequest
public ProcessInstanceWaitStateStatisticsRequest newProcessInstanceWaitStateStatisticsRequest(long processInstanceKey) Description copied from interface:CamundaClientExecutes a request to query process instance wait state statistics, grouped by element id.long processInstanceKey = ...; camundaClient .newProcessInstanceWaitStateStatisticsRequest(processInstanceKey) .send();
- Specified by:
newProcessInstanceWaitStateStatisticsRequestin interfaceCamundaClient- Returns:
- a builder for the process instance wait state statistics request
-
newProcessDefinitionMessageSubscriptionStatisticsRequest
public ProcessDefinitionMessageSubscriptionStatisticsRequest newProcessDefinitionMessageSubscriptionStatisticsRequest()Description copied from interface:CamundaClientExecutes a search request to query process definition message subscription statistics.camundaClient .newProcessDefinitionMessageSubscriptionStatisticsRequest() .send();
- Specified by:
newProcessDefinitionMessageSubscriptionStatisticsRequestin interfaceCamundaClient- Returns:
- a builder for the process definition message subscription statistics request
-
newUsageMetricsRequest
public UsageMetricsStatisticsRequest newUsageMetricsRequest(OffsetDateTime startTime, OffsetDateTime endTime) Description copied from interface:CamundaClientExecutes a search request to query usage metrics statistics.camundaClient .newUsageMetricsRequest(OffsetDateTime.now().minusYears(1), OffsetDateTime.now()) .withTenants(true) .send();
- Specified by:
newUsageMetricsRequestin interfaceCamundaClient- Returns:
- a builder for the usage metrics statistics request
-
newGlobalJobStatisticsRequest
public GlobalJobStatisticsRequest newGlobalJobStatisticsRequest(OffsetDateTime from, OffsetDateTime to) Description copied from interface:CamundaClientExecutes a request to query global job statistics.camundaClient .newGlobalJobStatisticsRequest(OffsetDateTime.now().minusDays(1), OffsetDateTime.now()) .jobType("myJobType") .send();- Specified by:
newGlobalJobStatisticsRequestin interfaceCamundaClient- Parameters:
from- the start of the time range (inclusive)to- the end of the time range (inclusive)- Returns:
- a builder for the global job statistics request
-
newJobTypeStatisticsRequest
Description copied from interface:CamundaClientExecutes a request to query job statistics grouped by job type.camundaClient .newJobTypeStatisticsRequest(OffsetDateTime.now().minusDays(1), OffsetDateTime.now()) .filter(f -> f.jobType(jt -> jt.like("fetch-*"))) .send();- Specified by:
newJobTypeStatisticsRequestin interfaceCamundaClient- Parameters:
from- the start of the time range (inclusive)to- the end of the time range (inclusive)- Returns:
- a builder for the job type statistics request
-
newJobWorkerStatisticsRequest
public JobWorkerStatisticsRequest newJobWorkerStatisticsRequest(OffsetDateTime from, OffsetDateTime to, String jobType) Description copied from interface:CamundaClientExecutes a request to query job statistics grouped by worker for a specific job type.camundaClient .newJobWorkerStatisticsRequest(OffsetDateTime.now().minusDays(1), OffsetDateTime.now(), "fetch-customer-data") .send();
- Specified by:
newJobWorkerStatisticsRequestin interfaceCamundaClient- Parameters:
from- the start of the time range (inclusive)to- the end of the time range (inclusive)jobType- the job type to return worker statistics for- Returns:
- a builder for the job worker statistics request
-
newJobTimeSeriesStatisticsRequest
public JobTimeSeriesStatisticsRequest newJobTimeSeriesStatisticsRequest(OffsetDateTime from, OffsetDateTime to, String jobType) Description copied from interface:CamundaClientExecutes a request to query time-bucketed job metrics for a specific job type.camundaClient .newJobTimeSeriesStatisticsRequest(OffsetDateTime.now().minusDays(1), OffsetDateTime.now(), "fetch-customer-data") .resolution(Duration.ofMinutes(1)) .send();
- Specified by:
newJobTimeSeriesStatisticsRequestin interfaceCamundaClient- Parameters:
from- the start of the time range (inclusive)to- the end of the time range (inclusive)jobType- the job type to return time-series metrics for- Returns:
- a builder for the job time-series statistics request
-
newJobErrorStatisticsRequest
public JobErrorStatisticsRequest newJobErrorStatisticsRequest(OffsetDateTime from, OffsetDateTime to, String jobType) Description copied from interface:CamundaClientExecutes a request to query per-error job metrics for a specific job type. Supports optional errorCode / errorMessage filters.camundaClient .newJobErrorStatisticsRequest(OffsetDateTime.now().minusDays(1), OffsetDateTime.now(), "fetch-customer-data") .filter(f -> f.errorCode(c -> c.like("UNHANDLED_*"))) .send();- Specified by:
newJobErrorStatisticsRequestin interfaceCamundaClient- Parameters:
from- the start of the time range (inclusive)to- the end of the time range (inclusive)jobType- the job type to return error metrics for- Returns:
- a builder for the job error statistics request
-
newProcessInstanceSequenceFlowsRequest
public ProcessInstanceSequenceFlowsRequest newProcessInstanceSequenceFlowsRequest(long processInstanceKey) Description copied from interface:CamundaClientExecutes a search request to query process instance sequence flows.long processInstanceKey = ...; camundaClient .newProcessInstanceSequenceFlowsRequest(processInstanceKey) .send();
- Specified by:
newProcessInstanceSequenceFlowsRequestin interfaceCamundaClient- Returns:
- a builder for the process instance sequence flows request
-
newProcessInstanceGetRequest
Description copied from interface:CamundaClientRetrieves a process instance by key.long processInstanceKey = ...; camundaClient .newProcessInstanceGetRequest(processInstanceKey) .send();
- Specified by:
newProcessInstanceGetRequestin interfaceCamundaClient- Returns:
- a builder for the request to get a process instance
-
newProcessInstanceSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query process instances.long processInstanceKey = ...; camundaClient .newProcessInstanceSearchRequest() .filter((f) -> f.processInstanceKeys(processInstanceKey)) .sort((s) -> s.startDate().asc()) .page((p) -> p.limit(100)) .send();
- Specified by:
newProcessInstanceSearchRequestin interfaceCamundaClient- Returns:
- a builder for the process instance search request
-
newElementInstanceSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query element instances.long elementInstanceKey = ...; camundaClient .newElementInstanceSearchRequest() .filter((f) -> f.processInstanceKeys(processInstanceKey)) .sort((s) -> s.elementName().asc()) .page((p) -> p.limit(100)) .send();
- Specified by:
newElementInstanceSearchRequestin interfaceCamundaClient- Returns:
- a builder for the process instance search request
-
newElementInstanceGetRequest
Description copied from interface:CamundaClientGets a element instance by key.long elementInstanceKey = ...; camundaClient .newElementInstanceGetRequest(elementInstanceKey) .send();
- Specified by:
newElementInstanceGetRequestin interfaceCamundaClient- Parameters:
elementInstanceKey- the key of the element instance- Returns:
- a builder for the request to get a element instance
-
newActivateAdHocSubProcessActivitiesCommand
public ActivateAdHocSubProcessActivitiesCommandStep1 newActivateAdHocSubProcessActivitiesCommand(String adHocSubProcessInstanceKey) Description copied from interface:CamundaClientCommand to activate activities within an activated ad-hoc sub-process.camundaClient .newActivateAdHocSubProcessActivitiesCommand(adHocSubProcessInstanceKey) .activateElement("A") .activateElements("B", "C") .activateElements(Arrays.asList("D", "E")) .send();- Specified by:
newActivateAdHocSubProcessActivitiesCommandin interfaceCamundaClient- Parameters:
adHocSubProcessInstanceKey- the key which identifies the corresponding ad-hoc sub-process instance- Returns:
- a builder for the command
-
newUserTaskSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query user tasks.camundaClient .newUserTaskSearchRequest() .filter((f) -> f.userTaskKey(userTaskKey)) .sort((s) -> s.creationDate().asc()) .page((p) -> p.limit(100)) .send();
- Specified by:
newUserTaskSearchRequestin interfaceCamundaClient- Returns:
- a builder for the user task search request
-
newDecisionRequirementsSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query Decision Requirements.camundaClient .newDecisionRequirementsSearchRequest() .filter((f) -> f.decisionRequirementsKey(decisionRequirementsKey)) .sort((s) -> s.version().asc()) .page((p) -> p.limit(100)) .send();
- Specified by:
newDecisionRequirementsSearchRequestin interfaceCamundaClient- Returns:
- a builder for the decision requirements search request
-
newDecisionDefinitionSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query decision definitions.long decisionDefinitionKey = ...; camundaClient .newDecisionDefinitionQuery() .filter((f) -> f.decisionKey(decisionDefinitionKey)) .sort((s) -> s.dmnDecisionName().asc()) .page((p) -> p.limit(100)) .send();
- Specified by:
newDecisionDefinitionSearchRequestin interfaceCamundaClient- Returns:
- a builder for the decision definition search request
-
newDecisionDefinitionGetRequest
Description copied from interface:CamundaClientGets a decision definition by key.long decisionDefinitionKey = ...; camundaClient .newDecisionDefinitionGetRequest(decisionDefinitionKey) .send();
- Specified by:
newDecisionDefinitionGetRequestin interfaceCamundaClient- Parameters:
decisionDefinitionKey- the key of the decision definition- Returns:
- a builder for the request to get a decision definition
-
newDecisionDefinitionGetXmlRequest
Description copied from interface:CamundaClientRetrieves the XML representation of a decision definition.long decisionDefinitionKey = ...; camundaClient .newDecisionDefinitionGetXmlRequest(decisionDefinitionKey) .send();
- Specified by:
newDecisionDefinitionGetXmlRequestin interfaceCamundaClient- Parameters:
decisionKey- the key of the decision definition- Returns:
- a builder for the request to get the XML of a decision definition
-
newDecisionInstanceSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query decision instances.long decisionInstanceKey = ...; camundaClient .newDecisionInstanceSearchRequest() .filter((f) -> f.decisionInstanceKey(decisionInstanceKey)) .sort((s) -> s.decisionInstanceKey().asc()) .page((p) -> p.limit(100)) .send();
- Specified by:
newDecisionInstanceSearchRequestin interfaceCamundaClient- Returns:
- a builder for the decision instance search request
-
newDecisionInstanceGetRequest
Description copied from interface:CamundaClientRetrieves a decision instance by id.String decisionInstanceId = ...; camundaClient .newDecisionInstanceGetQuery(decisionInstanceId) .send();
- Specified by:
newDecisionInstanceGetRequestin interfaceCamundaClient- Parameters:
decisionInstanceId- the id of the decision instance to fetch- Returns:
- a builder for the request to get a decision instance
-
newDeleteDecisionInstanceCommand
public DeleteDecisionInstanceCommandStep1 newDeleteDecisionInstanceCommand(long decisionInstanceKey) Description copied from interface:CamundaClientCommand to delete a decision instance history.camundaClient .newDeleteDecisionInstanceCommand(decisionEvaluationKey) .send();
- Specified by:
newDeleteDecisionInstanceCommandin interfaceCamundaClient- Parameters:
decisionInstanceKey- the key which identifies the corresponding decision evaluation- Returns:
- a builder for the command
-
newIncidentSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query incidents.long processInstanceKey = ...; camundaClient .newIncidentSearchRequest() .filter((f) -> f.processInstanceKey(processInstanceKey)) .sort((s) -> s.processDefinitionKey().asc()) .page((p) -> p.limit(100)) .send();
- Specified by:
newIncidentSearchRequestin interfaceCamundaClient- Returns:
- a builder for the incident search request
-
newIncidentGetRequest
Description copied from interface:CamundaClientGets an incident by key.long incidentKey = ...; camundaClient .newIncidentGetRequest(incidentKey) .send();
- Specified by:
newIncidentGetRequestin interfaceCamundaClient- Parameters:
incidentKey- the key of the incident- Returns:
- a builder for the request to get an incident
-
newCreateRoleCommand
Description copied from interface:CamundaClientCommand to create a role.camundaClient .newRoleCreateCommand() .roleId("roleId") .name(name) .description("description") .send();This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newCreateRoleCommandin interfaceCamundaClient- Returns:
- a builder for the command
-
newRoleGetRequest
Description copied from interface:CamundaClientRequest to get a role by role ID.camundaClient .newRoleGetRequest("roleId") .send();- Specified by:
newRoleGetRequestin interfaceCamundaClient- Parameters:
roleId- the ID of the role- Returns:
- a builder for the request to get a role
-
newRolesSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query roles.camundaClient .newRolesSearchRequest() .filter((f) -> f.name("roleName")) .sort((s) -> s.name().asc()) .page((p) -> p.limit(100)) .send();- Specified by:
newRolesSearchRequestin interfaceCamundaClient- Returns:
- a builder for the roles search request
-
newUpdateRoleCommand
Description copied from interface:CamundaClientCommand to update a role.camundaClient .newUpdateRoleCommand("roleId") .name("name") .description("description") .send();This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newUpdateRoleCommandin interfaceCamundaClient- Returns:
- a builder for the command
-
newAssignRoleToMappingRuleCommand
Description copied from interface:CamundaClientCommand to assign a role to a mapping rule.camundaClient .newAssignRoleToMappingRuleCommand() .roleId("roleId") .mappingRuleId("mappingRuleId") .send();This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newAssignRoleToMappingRuleCommandin interfaceCamundaClient- Returns:
- a builder to configure and send the assign role to mapping rule command
-
newDeleteRoleCommand
Description copied from interface:CamundaClientCommand to delete a role by role ID.camundaClient .newDeleteRoleCommand("roleId") .send();This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newDeleteRoleCommandin interfaceCamundaClient- Returns:
- a builder for the command
-
newAssignRoleToGroupCommand
Description copied from interface:CamundaClientCommand to assign a role to a group.camundaClient .newAssignRoleToGroupCommand() .roleId("roleId") .groupId("groupId") .send();This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newAssignRoleToGroupCommandin interfaceCamundaClient- Returns:
- a builder to configure and send the assign role to group command
-
newAssignRoleToClientCommand
Description copied from interface:CamundaClientCommand to assign a role to a client.camundaClient .newAssignRoleToClientCommand() .roleId("roleId") .clientId("clientId") .send();This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newAssignRoleToClientCommandin interfaceCamundaClient- Returns:
- a builder to configure and send the assign role to client command
-
newClientsByRoleSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query clients by role.camundaClient .newClientsByRoleSearchRequest("roleId") .sort((s) -> s.clientId().asc()) .page((p) -> p.limit(100)) .send();- Specified by:
newClientsByRoleSearchRequestin interfaceCamundaClient- Parameters:
roleId- the ID of the role- Returns:
- a builder for the clients by role search request
-
newClientsByGroupSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query clients by group.camundaClient .newClientsByGroupSearchRequest("groupId") .sort((s) -> s.clientId().asc()) .page((p) -> p.limit(100)) .send();- Specified by:
newClientsByGroupSearchRequestin interfaceCamundaClient- Parameters:
groupId- the ID of the group- Returns:
- a builder for the clients by group search request
-
newClientsByTenantSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query clients by tenant.camundaClient .newClientsByTenantSearchRequest("tenantId") .sort((s) -> s.clientId().asc()) .page((p) -> p.limit(100)) .send();- Specified by:
newClientsByTenantSearchRequestin interfaceCamundaClient- Parameters:
tenantId- the ID of the tenant- Returns:
- a builder for the clients by tenant search request
-
newAssignRoleToTenantCommand
Description copied from interface:CamundaClientCommand to assign a role to a tenant.camundaClient .newAssignRoleToTenantCommand() .roleId("roleId") .tenantId("tenantId") .send();This command is only sent via REST over HTTP.
- Specified by:
newAssignRoleToTenantCommandin interfaceCamundaClient- Returns:
- a builder for the assign role to tenant command
-
newUnassignRoleFromTenantCommand
Description copied from interface:CamundaClientCommand to unassign a role from a tenant.camundaClient .newUnassignRoleFromTenantCommand() .roleId("roleId") .tenantId("tenantId") .send();This command is only sent via REST over HTTP.
- Specified by:
newUnassignRoleFromTenantCommandin interfaceCamundaClient- Returns:
- a builder for the unassign role from tenant command
-
newRolesByTenantSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query roles assigned to a specific tenant.camundaClient .newRolesByTenantSearchRequest("tenantId") .filter((f) -> f.name("admin")) .sort((s) -> s.name().asc()) .page((p) -> p.limit(50)) .send();- Specified by:
newRolesByTenantSearchRequestin interfaceCamundaClient- Parameters:
tenantId- the ID of the tenant- Returns:
- a builder for the roles by tenant search request
-
newUnassignRoleFromGroupCommand
Description copied from interface:CamundaClientCommand to unassign a role from a group.Example usage:
camundaClient .newUnassignRoleFromGroupCommand() .roleId("roleId") .groupId("groupId") .send();This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newUnassignRoleFromGroupCommandin interfaceCamundaClient- Returns:
- a builder for the unassign role from group command
-
newUnassignRoleFromMappingRuleCommand
Description copied from interface:CamundaClientCommand to unassign a role from a mapping rule.Example usage:
camundaClient .newUnassignRoleFromMappingRuleCommand() .roleId("roleId") .mappingRuleId("mappingRuleId") .send();This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newUnassignRoleFromMappingRuleCommandin interfaceCamundaClient- Returns:
- a builder for the unassign role from mapping rule command
-
newUnassignRoleFromClientCommand
Description copied from interface:CamundaClientCommand to unassign a role from a client.Example usage:
camundaClient .newUnassignRoleFromClientCommand() .roleId("roleId") .clientId("clientId") .send();This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newUnassignRoleFromClientCommandin interfaceCamundaClient- Returns:
- a builder for the unassign role from client command
-
newAssignRoleToUserCommand
Description copied from interface:CamundaClientCommand to assign a role to a user.Example usage:
camundaClient .newAssignRoleToUserCommand() .roleId("roleId") .username("username") .send();- Specified by:
newAssignRoleToUserCommandin interfaceCamundaClient- Returns:
- a builder for the assign role to user command
-
newUnassignRoleFromUserCommand
Description copied from interface:CamundaClientCommand to unassign a role from a user.camundaClient .newUnassignRoleFromUserCommand() .roleId("roleId") .username("username") .send();This command is only sent via REST over HTTP, not via gRPC.
- Specified by:
newUnassignRoleFromUserCommandin interfaceCamundaClient- Returns:
- a builder for the unassign role from user command
-
newUsersByRoleSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query users by role.camundaClient .newUsersByRoleSearchRequest("roleId") .sort((s) -> s.username().asc()) .page((p) -> p.limit(100)) .send();- Specified by:
newUsersByRoleSearchRequestin interfaceCamundaClient- Parameters:
roleId- the ID of the role- Returns:
- a builder for the users by role search request
-
newUsersByTenantSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query users assigned to a tenant.camundaClient .newUsersByTenantSearchRequest("tenantId") .sort((s) -> s.username().asc()) .page((p) -> p.limit(100)) .send();- Specified by:
newUsersByTenantSearchRequestin interfaceCamundaClient- Parameters:
tenantId- the ID of the tenant- Returns:
- a builder for the users by tenant search request
-
newUsersSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query users.camundaClient .newUsersSearchRequest() .filter((f) -> f.username("userName")) .sort((s) -> s.username().asc()) .page((p) -> p.limit(100)) .send();- Specified by:
newUsersSearchRequestin interfaceCamundaClient- Returns:
- a builder for the users search request
-
newCreateGroupCommand
Description copied from interface:CamundaClientCommand to create a group.camundaClient .newCreateGroupCommand() .groupId("groupId") .name("name") .send();This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newCreateGroupCommandin interfaceCamundaClient- Returns:
- a builder for the command
-
newUpdateGroupCommand
Description copied from interface:CamundaClientCommand to update a group.camundaClient .newUpdateGroupCommand("groupId") .name("name") .send();This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newUpdateGroupCommandin interfaceCamundaClient- Returns:
- a builder for the command
-
newDeleteGroupCommand
Description copied from interface:CamundaClientCommand to delete a group.camundaClient .newDeleteGroupCommand("groupId") .send();This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newDeleteGroupCommandin interfaceCamundaClient- Returns:
- a builder for the command
-
newDeleteMappingRuleCommand
Description copied from interface:CamundaClientCommand to delete a mapping rule.camundaClient .newDeleteMappingRuleCommand("mappingRuleId") .send();This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newDeleteMappingRuleCommandin interfaceCamundaClient- Parameters:
mappingRuleId- the ID of the mapping rule to delete- Returns:
- a builder for the command
-
newMappingRuleGetRequest
Description copied from interface:CamundaClientRequest to get a mapping rule by mapping rule ID.camundaClient .newMappingRuleGetRequest("mappingRuleId") .send();- Specified by:
newMappingRuleGetRequestin interfaceCamundaClient- Parameters:
mappingRuleId- the ID of the mapping rule- Returns:
- a builder for the request to get a mapping rule
-
newAssignUserToGroupCommand
Description copied from interface:CamundaClientCommand to assign a user to a group.camundaClient .newAssignUserToGroupCommand() .username("username") .groupId("groupId") .send();This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newAssignUserToGroupCommandin interfaceCamundaClient- Returns:
- a builder for the command
-
newUnassignUserFromGroupCommand
Description copied from interface:CamundaClientCommand to unassign a user from a group.camundaClient .newUnassignUserFromGroupCommand() .username("username") .groupId("groupId") .send();This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newUnassignUserFromGroupCommandin interfaceCamundaClient- Returns:
- a builder for the command
-
newCreateUserCommand
Description copied from interface:CamundaClientCommand to create a user.camundaClient .newCreateUserCommand() .username(username) .email(email) .name(name) .password(password) .send();
This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newCreateUserCommandin interfaceCamundaClient- Returns:
- a builder for the command
-
newDeleteUserCommand
Description copied from interface:CamundaClientCommand to delete a user by usernamecamundaClient .newDeleteUserCommand("username") .send();This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newDeleteUserCommandin interfaceCamundaClient- Returns:
- a builder for the command
-
newUpdateUserCommand
Description copied from interface:CamundaClientCommand to update a user.camundaClient .newUpdateUserCommand("username") .name("name") .email("email@email.com") .send();This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newUpdateUserCommandin interfaceCamundaClient- Returns:
- a builder for the command
-
newUserGetRequest
Description copied from interface:CamundaClientRequest to get a user by username.camundaClient .newUserGetRequest("username") .send();- Specified by:
newUserGetRequestin interfaceCamundaClient- Parameters:
username- the username of the user- Returns:
- a builder for the request to get a user
-
newCreateMappingRuleCommand
Description copied from interface:CamundaClientCommand to create a mapping rule.camundaClient .newCreateMappingRuleCommand() .claimName(claimName) .claimValue(claimValue) .mappingRuleId(mappingRuleId) .name(name) .send();
This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newCreateMappingRuleCommandin interfaceCamundaClient- Returns:
- a builder for the command
-
newUpdateMappingRuleCommand
Description copied from interface:CamundaClientCommand to update a mapping rule.camundaClient .newUpdateMappingRule("mappingRuleId") .name("name") .claimName("claim name") .claimValue("claim value") .send();This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newUpdateMappingRuleCommandin interfaceCamundaClient- Returns:
- a builder for the command
-
newDecisionRequirementsGetXmlRequest
public DecisionRequirementsGetXmlRequest newDecisionRequirementsGetXmlRequest(long decisionRequirementsKey) Description copied from interface:CamundaClientRetrieves the XML representation of a decision requirements.long decisionRequirementsKey = ...; camundaClient .newDecisionRequirementsGetXmlRequest(decisionRequirementsKey) .send();
- Specified by:
newDecisionRequirementsGetXmlRequestin interfaceCamundaClient- Returns:
- a builder for the request to get the XML of a decision definition
-
newDecisionRequirementsGetRequest
public DecisionRequirementsGetRequest newDecisionRequirementsGetRequest(long decisionRequirementsKey) Description copied from interface:CamundaClientGets a decision requirements by key.long decisionRequirementsKey = ...; camundaClient .newDecisionRequirementsGetRequest(decisionRequirementsKey) .send();
- Specified by:
newDecisionRequirementsGetRequestin interfaceCamundaClient- Parameters:
decisionRequirementsKey- the key of the decision requirements- Returns:
- a builder for the request to get a decision requirements
-
newUserTaskGetFormRequest
Description copied from interface:CamundaClientGets a user task form by key.long userTaskKey = ...; camundaClient .newUserTaskGetFormRequest(userTaskKey) .send();
- Specified by:
newUserTaskGetFormRequestin interfaceCamundaClient- Parameters:
userTaskKey- the key of the user task- Returns:
- a builder for the request to get a user task form
-
newUserTaskGetRequest
Description copied from interface:CamundaClientGets a User Task by key.long userTaskKey = ...; camundaClient .newUserTaskGetRequest(userTaskKey) .send();
- Specified by:
newUserTaskGetRequestin interfaceCamundaClient- Parameters:
userTaskKey- the key of the user task- Returns:
- a builder for the request to get a user task
-
newVariableSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query variables.camundaClient .newVariableSearchRequest() .filter((f) -> f.variableKey(variableKey)) .sort((s) -> s.value().asc()) .page((p) -> p.limit(100)) .withFullValues() .send();
- Specified by:
newVariableSearchRequestin interfaceCamundaClient- Returns:
- a builder for the variable search request
-
newVariableGetRequest
Description copied from interface:CamundaClientGets a variable by key.long variableKey = ...; camundaClient .newVariableGetRequest(variableKey) .send();
- Specified by:
newVariableGetRequestin interfaceCamundaClient- Parameters:
variableKey- the key of the variable- Returns:
- a builder for the request to get a variable
-
newGloballyScopedClusterVariableCreateRequest
public GloballyScopedClusterVariableCreationCommandStep1 newGloballyScopedClusterVariableCreateRequest()Description copied from interface:CamundaClientCreates a request to create a new globally-scoped cluster variable.camundaClient .newGloballyScopedClusterVariableCreateRequest() .create("myVariable", "myValue") .send();- Specified by:
newGloballyScopedClusterVariableCreateRequestin interfaceCamundaClient- Returns:
- a builder for creating a globally-scoped cluster variable
-
newTenantScopedClusterVariableCreateRequest
public TenantScopedClusterVariableCreationCommandStep1 newTenantScopedClusterVariableCreateRequest(String tenantId) Description copied from interface:CamundaClientCreates a request to create a new tenant-scoped cluster variable.camundaClient .newTenantScopedClusterVariableCreateRequest("my-tenant-id") .create("myVariable", "myValue") .send();- Specified by:
newTenantScopedClusterVariableCreateRequestin interfaceCamundaClient- Parameters:
tenantId- the ID of the tenant for which the variable is scoped- Returns:
- a builder for creating a tenant-scoped cluster variable
-
newGloballyScopedClusterVariableUpdateRequest
public GloballyScopedClusterVariableUpdateCommandStep1 newGloballyScopedClusterVariableUpdateRequest()Description copied from interface:CamundaClientCreates a request to update a globally-scoped cluster variable.camundaClient .newGloballyScopedClusterVariableUpdateRequest() .update("myVariable", "newValue") .send();- Specified by:
newGloballyScopedClusterVariableUpdateRequestin interfaceCamundaClient- Returns:
- a builder for updating a globally-scoped cluster variable
-
newTenantScopedClusterVariableUpdateRequest
public TenantScopedClusterVariableUpdateCommandStep1 newTenantScopedClusterVariableUpdateRequest(String tenantId) Description copied from interface:CamundaClientCreates a request to update a tenant-scoped cluster variable.camundaClient .newTenantScopedClusterVariableUpdateRequest("my-tenant-id") .update("myVariable", "newValue") .send();- Specified by:
newTenantScopedClusterVariableUpdateRequestin interfaceCamundaClient- Parameters:
tenantId- the ID of the tenant for which the variable is scoped- Returns:
- a builder for updating a tenant-scoped cluster variable
-
newGloballyScopedClusterVariableDeleteRequest
public GloballyScopedClusterVariableDeletionCommandStep1 newGloballyScopedClusterVariableDeleteRequest()Description copied from interface:CamundaClientCreates a request to delete a globally-scoped cluster variable.camundaClient .newGloballyScopedClusterVariableDeleteRequest() .delete("myVariable") .send();- Specified by:
newGloballyScopedClusterVariableDeleteRequestin interfaceCamundaClient- Returns:
- a builder for deleting a globally-scoped cluster variable
-
newTenantScopedClusterVariableDeleteRequest
public TenantScopedClusterVariableDeletionCommandStep1 newTenantScopedClusterVariableDeleteRequest(String tenantId) Description copied from interface:CamundaClientCreates a request to delete a tenant-scoped cluster variable.camundaClient .newTenantScopedClusterVariableDeleteRequest("my-tenant-id") .delete("myVariable") .send();- Specified by:
newTenantScopedClusterVariableDeleteRequestin interfaceCamundaClient- Parameters:
tenantId- the ID of the tenant for which the variable is scoped- Returns:
- a builder for deleting a tenant-scoped cluster variable
-
newGloballyScopedClusterVariableGetRequest
Description copied from interface:CamundaClientCreates a request to fetch a globally-scoped cluster variable by name.camundaClient .newGloballyScopedClusterVariableGetRequest() .withName("myVariable") .send();- Specified by:
newGloballyScopedClusterVariableGetRequestin interfaceCamundaClient- Returns:
- a builder for fetching a globally-scoped cluster variable
-
newTenantScopedClusterVariableGetRequest
public TenantScopedClusterVariableGetRequest newTenantScopedClusterVariableGetRequest(String tenantId) Description copied from interface:CamundaClientCreates a request to fetch a tenant-scoped cluster variable by name.camundaClient .newTenantScopedClusterVariableGetRequest("my-tenant-id") .withName("myVariable") .send();- Specified by:
newTenantScopedClusterVariableGetRequestin interfaceCamundaClient- Parameters:
tenantId- the ID of the tenant for which the variable is scoped- Returns:
- a builder for fetching a tenant-scoped cluster variable
-
newClusterVariableSearchRequest
Description copied from interface:CamundaClientCreates a request to search for cluster variables.Cluster variables can be searched with filtering and sorting capabilities:
camundaClient .newClusterVariableSearchRequest() .filter(f -> f.scope(ClusterVariableScope.GLOBAL)) .sort(s -> s.name().asc()) .send(); // or for tenant-scoped variables camundaClient .newClusterVariableSearchRequest() .filter(f -> f.scope(ClusterVariableScope.TENANT).tenantId("my-tenant-id")) .send();- Specified by:
newClusterVariableSearchRequestin interfaceCamundaClient- Returns:
- a builder for searching cluster variables
-
newUserTaskVariableSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query variables related to a user task.long userTaskKey = ...; camundaClient .newUserTaskVariableSearchRequest(userTaskKey) .sort((s) -> s.value().asc()) .page((p) -> p.limit(100)) .withFullValues() .send();
- Specified by:
newUserTaskVariableSearchRequestin interfaceCamundaClient- Parameters:
userTaskKey- the key of the user task- Returns:
- a builder for the user task variable search request
-
newUserTaskEffectiveVariableSearchRequest
public UserTaskEffectiveVariableSearchRequest newUserTaskEffectiveVariableSearchRequest(long userTaskKey) Description copied from interface:CamundaClientExecutes a search request to query effective variables related to a user task. Returns deduplicated variables where the innermost scope wins when the same variable name exists at multiple scope levels.long userTaskKey = ...; camundaClient .newUserTaskEffectiveVariableSearchRequest(userTaskKey) .sort((s) -> s.value().asc()) .page((p) -> p.limit(100)) .withFullValues() .send();
- Specified by:
newUserTaskEffectiveVariableSearchRequestin interfaceCamundaClient- Parameters:
userTaskKey- the key of the user task- Returns:
- a builder for the user task effective variable search request
-
newCreateDocumentCommand
Description copied from interface:CamundaClientExperimental: This method is under development. The respective API on compatible clusters cannot be considered production-ready. Thus, this method doesn't work out of the box with all clusters. Until this warning is removed, anything described below may not yet have taken effect, and the interface and its description are subject to change.Command to create a document.
camundaClient .newCreateDocumentCommand() .content(inputStream) .fileName("file.txt") .timeToLive(Duration.ofDays(1)) .send();- Specified by:
newCreateDocumentCommandin interfaceCamundaClient- Returns:
- a builder for the command
-
newCreateDocumentBatchCommand
Description copied from interface:CamundaClientExperimental: This method is under development. The respective API on compatible clusters cannot be considered production-ready. Thus, this method doesn't work out of the box with all clusters. Until this warning is removed, anything described below may not yet have taken effect, and the interface and its description are subject to change.Command to create a batch of documents. Unlike
CamundaClient.newCreateDocumentCommand(), this command allows you to create multiple documents in a single request. This can be more efficient than creating each document individually, however, there are multiple limitations to consider.
Limitations:- The gateway does not guarantee the atomicity of the batch operation. If the gateway receives the batch but fails to create one or more documents, it will not roll back the operation. This means that some documents may be created while others are not. The client should handle this scenario by checking the response for each document.
- Each document in the batch must have a unique name.
- It is not possible to assign a custom document ID to the documents in the batch. The document ID will be generated by the broker.
- The total size of the batch must not exceed the multipart request size limit of the gateway.
- The documents can only be created in a single store. If you need to create documents in multiple stores, you must create separate batches for each store.
zeebeClient .newCreateDocumentBatchCommand() .addDocument() .content(inputStream1) .fileName("file1.txt") .timeToLive(Duration.ofDays(1)) .done() .addDocument() .content(inputStream2) .fileName("file2.txt") .timeToLive(Duration.ofDays(1)) .done()- Specified by:
newCreateDocumentBatchCommandin interfaceCamundaClient- Returns:
- a builder for the command
-
newDocumentContentGetRequest
Description copied from interface:CamundaClientExperimental: This method is under development. The respective API on compatible clusters cannot be considered production-ready. Thus, this method doesn't work out of the box with all clusters. Until this warning is removed, anything described below may not yet have taken effect, and the interface and its description are subject to change.Command to get a document.
camundaClient .newDocumentContentGetRequest(documentId) .storeId(storeId) .send();
- Specified by:
newDocumentContentGetRequestin interfaceCamundaClient- Parameters:
documentId- the id of the document- Returns:
- a builder for the request
-
newDocumentContentGetRequest
public DocumentContentGetRequest newDocumentContentGetRequest(DocumentReferenceResponse documentReference) Description copied from interface:CamundaClientExperimental: This method is under development. The respective API on compatible clusters cannot be considered production-ready. Thus, this method doesn't work out of the box with all clusters. Until this warning is removed, anything described below may not yet have taken effect, and the interface and its description are subject to change.Command to get a document.
camundaClient .newDocumentContentGetRequest(documentReferenceResponse) .send();
- Specified by:
newDocumentContentGetRequestin interfaceCamundaClient- Parameters:
documentReference- the reference of the document- Returns:
- a builder for the request
-
newCreateDocumentLinkCommand
Description copied from interface:CamundaClientExperimental: This method is under development. The respective API on compatible clusters cannot be considered production-ready. Thus, this method doesn't work out of the box with all clusters. Until this warning is removed, anything described below may not yet have taken effect, and the interface and its description are subject to change.Command to update a document.
camundaClient .newCreateDocumentLinkCommand(documentId) .storeId(storeId) .timeToLive(Duration.ofHours(1)) .send();
- Specified by:
newCreateDocumentLinkCommandin interfaceCamundaClient- Parameters:
documentId- the id of the document- Returns:
- a builder for the command
-
newCreateDocumentLinkCommand
public CreateDocumentLinkCommandStep1 newCreateDocumentLinkCommand(DocumentReferenceResponse documentReference) Description copied from interface:CamundaClientExperimental: This method is under development. The respective API on compatible clusters cannot be considered production-ready. Thus, this method doesn't work out of the box with all clusters. Until this warning is removed, anything described below may not yet have taken effect, and the interface and its description are subject to change.Command to update a document.
camundaClient .newCreateDocumentLinkCommand(documentReferenceResponse) .timeToLive(Duration.ofHours(1)) .send();
- Specified by:
newCreateDocumentLinkCommandin interfaceCamundaClient- Parameters:
documentReference- the reference of the document- Returns:
- a builder for the command
-
newDeleteDocumentCommand
Description copied from interface:CamundaClientExperimental: This method is under development. The respective API on compatible clusters cannot be considered production-ready. Thus, this method doesn't work out of the box with all clusters. Until this warning is removed, anything described below may not yet have taken effect, and the interface and its description are subject to change.Command to update a document.
camundaClient .newDeleteDocumentCommand(documentId) .storeId(storeId) .send();
- Specified by:
newDeleteDocumentCommandin interfaceCamundaClient- Parameters:
documentId- the id of the document- Returns:
- a builder for the command
-
newDeleteDocumentCommand
public DeleteDocumentCommandStep1 newDeleteDocumentCommand(DocumentReferenceResponse documentReference) Description copied from interface:CamundaClientExperimental: This method is under development. The respective API on compatible clusters cannot be considered production-ready. Thus, this method doesn't work out of the box with all clusters. Until this warning is removed, anything described below may not yet have taken effect, and the interface and its description are subject to change.Command to update a document.
camundaClient .newDeleteDocumentCommand(documentReferenceResponse) .send();
- Specified by:
newDeleteDocumentCommandin interfaceCamundaClient- Parameters:
documentReference- the reference of the document- Returns:
- a builder for the command
-
newCreateTenantCommand
Description copied from interface:CamundaClientCommand to create a tenant.camundaClient .newCreateTenantCommand() .tenantId("tenant-id") .name("Tenant Name") .send();- Specified by:
newCreateTenantCommandin interfaceCamundaClient- Returns:
- a builder for the command
-
newUpdateTenantCommand
Description copied from interface:CamundaClientCreates a command to update the name of an existing tenant.Example usage:
camundaClient .newUpdateTenantCommand("my-tenant-id") // Specify the tenant id .name("Updated Tenant Name") // Set the new tenant name .send(); // Send the command to the broker- Specified by:
newUpdateTenantCommandin interfaceCamundaClient- Parameters:
tenantId- the unique identifier of the tenant to be updated- Returns:
- a builder to configure and send the update tenant command
-
newTenantGetRequest
Description copied from interface:CamundaClientRequest to get a tenant by tenant ID.camundaClient .newTenantGetRequest("tenantId") .send();- Specified by:
newTenantGetRequestin interfaceCamundaClient- Parameters:
tenantId- the ID of the tenant- Returns:
- a builder for the request to get a tenant by ID
-
newTenantsSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query tenants.camundaClient .newTenantsSearchRequest() .filter((f) -> f.name("tenantName")) .sort((s) -> s.name().asc()) .page((p) -> p.limit(100)) .send();- Specified by:
newTenantsSearchRequestin interfaceCamundaClient- Returns:
- a builder for the tenants search request
-
newDeleteTenantCommand
Description copied from interface:CamundaClientCommand to delete a tenant.camundaClient .newDeleteTenantCommand(tenantId) .send();
- Specified by:
newDeleteTenantCommandin interfaceCamundaClient- Parameters:
tenantId- the id of the tenant to delete- Returns:
- a builder for the delete tenant command
-
newAssignMappingRuleToTenantCommand
Description copied from interface:CamundaClientCommand to assign a mapping rule to a tenant.Example usage:
camundaClient .newAssignMappingRuleToTenantCommand() .mappingRuleId("mappingRuleId") .tenantId("tenantId") .send();This command sends an HTTP PUT request to assign the specified mapping rule to the given tenant.
- Specified by:
newAssignMappingRuleToTenantCommandin interfaceCamundaClient- Returns:
- a builder for the assign mapping rule to tenant command
-
newAssignUserToTenantCommand
Description copied from interface:CamundaClientCommand to assign a user to a tenant.Example usage:
camundaClient .newAssignUserToTenantCommand() .username(username) .tenantId(tenantId) .send();
This command sends an HTTP PUT request to assign the specified user to the given tenant.
- Specified by:
newAssignUserToTenantCommandin interfaceCamundaClient- Returns:
- a builder for the assign user to tenant command
-
newUnassignUserFromTenantCommand
Description copied from interface:CamundaClientCommand to unassign a user from a tenant.Example usage:
camundaClient .newUnassignUserFromTenantCommand() .username(username) .tenantId(tenantId) .send();
This command sends an HTTP DELETE request to unassign the specified user from the given tenant.
- Specified by:
newUnassignUserFromTenantCommandin interfaceCamundaClient- Returns:
- a builder for the unassign user from tenant command
-
newAssignGroupToTenantCommand
Description copied from interface:CamundaClientCommand to assign a group to a tenant.Example usage:
camundaClient .newAssignGroupToTenantCommand() .groupId("groupId") .tenantId("tenantId") .send();- Specified by:
newAssignGroupToTenantCommandin interfaceCamundaClient- Returns:
- a builder to configure and send the assign group to tenant command
-
newUnassignGroupFromTenantCommand
Description copied from interface:CamundaClientCommand to unassign a group from a tenant.Example usage:
camundaClient .newUnassignGroupFromTenantCommand() .groupId("groupId") .tenantId("tenantId") .send();- Specified by:
newUnassignGroupFromTenantCommandin interfaceCamundaClient- Returns:
- a builder to configure and send the unassign group from tenant command
-
newAssignClientToGroupCommand
Description copied from interface:CamundaClientCommand to assign a client to a group.camundaClient .newAssignClientToGroupCommand() .clientId("clientId") .groupId("groupId") .send();This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newAssignClientToGroupCommandin interfaceCamundaClient- Returns:
- a builder to configure and send the assign client to group command
-
newUnassignClientFromGroupCommand
Description copied from interface:CamundaClientCommand to unassign a client from a group.Example usage:
camundaClient .newUnassignClientFromGroupCommand() .clientId("clientId") .groupId("groupId") .send();This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newUnassignClientFromGroupCommandin interfaceCamundaClient- Returns:
- a builder for the unassign client from group command
-
newAssignClientToTenantCommand
Description copied from interface:CamundaClientCommand to assign a client to a tenant.camundaClient .newAssignClientToTenantCommand() .clientId("clientId") .tenantId("tenantId") .send();This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newAssignClientToTenantCommandin interfaceCamundaClient- Returns:
- a builder to configure and send the assign client to tenant command
-
newUnassignClientFromTenantCommand
Description copied from interface:CamundaClientCommand to unassign a client from a tenant.camundaClient .newUnassignClientFromTenantCommand() .clientId("clientId") .tenantId("tenantId") .send();This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newUnassignClientFromTenantCommandin interfaceCamundaClient- Returns:
- a builder to configure and send the unassign client from tenant command
-
newUnassignMappingRuleFromTenantCommand
Description copied from interface:CamundaClientCommand to unassign a mapping rule from a tenant.camundaClient .newUnassignMappingRuleFromTenantCommand() .mappingRuleId("mappingRuleId") .tenantId("tenantId") .send();This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newUnassignMappingRuleFromTenantCommandin interfaceCamundaClient- Returns:
- a builder to configure and send the unassign mapping rule from tenant command
-
newCreateAuthorizationCommand
Description copied from interface:CamundaClientCommand to create an authorizationExample usage:
camundaClient .newCreateAuthorizationCommand() .ownerId(ownerId) .ownerType(ownerType) .resourceId(resourceId) // or .resourcePropertyName(resourcePropertyName) .resourceType(resourceType) .permission(PermissionType.READ) .send();
- Specified by:
newCreateAuthorizationCommandin interfaceCamundaClient- Returns:
- a builder to configure and send the create authorization command
-
newAuthorizationGetRequest
Description copied from interface:CamundaClientRequest to get an authorization by authorization key.camundaClient .newAuthorizationGetRequest(authorizationKey) .send();
- Specified by:
newAuthorizationGetRequestin interfaceCamundaClient- Parameters:
authorizationKey- the authorizationKey of the authorization- Returns:
- a builder for the request to get an authorization
-
newAuthorizationSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query authorizations.camundaClient .newAuthorizationSearchRequest() .filter((f) -> f.ownerType("ownerType")) .sort((s) -> s.ownerId().asc()) .page((p) -> p.limit(100)) .send();- Specified by:
newAuthorizationSearchRequestin interfaceCamundaClient- Returns:
- a builder for the authorizations search request
-
newDeleteAuthorizationCommand
Description copied from interface:CamundaClientCommand to delete an authorizationExample usage:
camundaClient .newDeleteAuthorizationCommand(authorizationKey) .send();
- Specified by:
newDeleteAuthorizationCommandin interfaceCamundaClient- Parameters:
authorizationKey- the key of the authorization to delete- Returns:
- a builder to configure and send the delete authorization command
-
newUpdateAuthorizationCommand
Description copied from interface:CamundaClientCommand to update an authorizationExample usage:
camundaClient .newUpdateAuthorizationCommand(authorizationKey) .ownerId(ownerId) .ownerType(ownerType) .resourceId(resourceId) // or .resourcePropertyName(resourcePropertyName) .resourceType(resourceType) .permissionTypes(Set.of(PermissionType.READ)) .send();
- Specified by:
newUpdateAuthorizationCommandin interfaceCamundaClient- Parameters:
authorizationKey- the key of the authorization to update- Returns:
- a builder to configure and send the update authorization command
-
newCreateBatchOperationCommand
Description copied from interface:CamundaClientCommand to create a batch operationExample usage:
camundaClient .newCreateBatchOperationCommand() .processInstanceCancel() .filter(filter) .send();
- Specified by:
newCreateBatchOperationCommandin interfaceCamundaClient- Returns:
- a builder to configure and send the create batch operation command
-
newBatchOperationGetRequest
Description copied from interface:CamundaClientRequest to get a single batch operation by batch operation key.camundaClient .newBatchOperationGetRequest(batchOperationKey) .send();
- Specified by:
newBatchOperationGetRequestin interfaceCamundaClient- Parameters:
batchOperationKey- the key which identifies the corresponding batch operation- Returns:
- a builder for the request
-
newBatchOperationSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query batch operations.camundaClient .newBatchOperationSearchRequest() .filter((f) -> f.state(state)) .sort((s) -> s.startDate().asc()) .page((p) -> p.limit(100)) .send();
- Specified by:
newBatchOperationSearchRequestin interfaceCamundaClient- Returns:
- a builder for the groups search request
-
newCancelBatchOperationCommand
Description copied from interface:CamundaClientCommand to cancel a batch operationExample usage:
camundaClient .newCancelBatchOperationCommand("123") .send();- Specified by:
newCancelBatchOperationCommandin interfaceCamundaClient- Returns:
- a builder to configure and send the cancel batch operation command
-
newSuspendBatchOperationCommand
Description copied from interface:CamundaClientCommand to suspend a batch operationExample usage:
camundaClient .newSuspendBatchOperationCommand("123L") .send();- Specified by:
newSuspendBatchOperationCommandin interfaceCamundaClient- Returns:
- a builder to configure and send the suspend batch operation command
-
newResumeBatchOperationCommand
Description copied from interface:CamundaClientCommand to resume a batch operationExample usage:
camundaClient .newResumeBatchOperationCommand("123L") .send();- Specified by:
newResumeBatchOperationCommandin interfaceCamundaClient- Returns:
- a builder to configure and send the resume batch operation command
-
newBatchOperationItemsSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query batch operation items.camundaClient .newBatchOperationItemSearchRequest() .filter((f) -> f.state(state)) .sort((s) -> s.itemKey().asc()) .page((p) -> p.limit(100)) .send();
- Specified by:
newBatchOperationItemsSearchRequestin interfaceCamundaClient- Returns:
- a builder for the groups search request
-
newAssignMappingRuleToGroupCommand
Description copied from interface:CamundaClientCommand to assign a mapping rule to a group.camundaClient .newAssignMappingRuleToGroupCommand() .mappingRuleId(mappingRuleId) .groupId(groupId) .send();
This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newAssignMappingRuleToGroupCommandin interfaceCamundaClient- Returns:
- a builder for the command
-
newUnassignMappingRuleFromGroupCommand
Description copied from interface:CamundaClientCommand to unassign a mapping rule from a group.camundaClient .newUnassignMappingRuleFromGroupCommand() .mappingRuleId(mappingRuleId) .groupId(groupId) .send();
This command is only sent via REST over HTTP, not via gRPC
- Specified by:
newUnassignMappingRuleFromGroupCommandin interfaceCamundaClient- Returns:
- a builder for the command
-
newGroupGetRequest
Description copied from interface:CamundaClientRequest to get a group by group ID.camundaClient .newGroupGetRequest(groupId) .send();
- Specified by:
newGroupGetRequestin interfaceCamundaClient- Parameters:
groupId- the ID of the group- Returns:
- a builder for the request to get a group
-
newGroupsSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query groups.camundaClient .newGroupsSearchRequest() .filter((f) -> f.name(name)) .sort((s) -> s.name().asc()) .page((p) -> p.limit(100)) .send();
- Specified by:
newGroupsSearchRequestin interfaceCamundaClient- Returns:
- a builder for the groups search request
-
newUsersByGroupSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query users by group.camundaClient .newUsersByGroupSearchRequest(groupId) .sort((s) -> s.username().asc()) .page((p) -> p.limit(100)) .send();
- Specified by:
newUsersByGroupSearchRequestin interfaceCamundaClient- Returns:
- a builder for the users by group search request
-
newProcessInstanceGetCallHierarchyRequest
public ProcessInstanceGetCallHierarchyRequest newProcessInstanceGetCallHierarchyRequest(Long processInstanceKey) Description copied from interface:CamundaClientRetrieves the call hierarchy for a given process instance by its key.camundaClient .newProcessInstanceGetCallHierarchyRequest(processInstanceKey) .send();
The returned hierarchical structure represents the relationship of the given process instance to its parent and child process instances, if any.
- Specified by:
newProcessInstanceGetCallHierarchyRequestin interfaceCamundaClient- Parameters:
processInstanceKey- the key of the process instance- Returns:
- a builder for the request
-
newMappingRulesByGroupSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query mapping rules by group.camundaClient .newMappingRulesByGroupSearchRequest(groupId) .filter((f) -> f.mappingRuleId(mappingRuleId)) .sort((s) -> s.mappingRuleId().asc()) .page((p) -> p.limit(100)) .send();- Specified by:
newMappingRulesByGroupSearchRequestin interfaceCamundaClient- Parameters:
groupId- the ID of the group- Returns:
- a builder for the mapping rules by group search request
-
newMappingRulesByRoleSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query mapping rules by role.camundaClient .newMappingRulesByRoleSearchRequest("roleId") .filter((f) -> f.mappingRuleId("mapping-rule-123")) .sort((s) -> s.mappingRuleId().asc()) .page((p) -> p.limit(100)) .send();- Specified by:
newMappingRulesByRoleSearchRequestin interfaceCamundaClient- Parameters:
roleId- the ID of the role- Returns:
- a builder for the mapping rules by role search request
-
newMappingRulesByTenantSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query mapping rules by tenant.camundaClient .newMappingRulesByTenantSearchRequest("tenantId") .filter((f) -> f.mappingRuleId("mapping-rule-123")) .sort((s) -> s.mappingRuleId().asc()) .page((p) -> p.limit(100)) .send();- Specified by:
newMappingRulesByTenantSearchRequestin interfaceCamundaClient- Parameters:
tenantId- the ID of the tenant- Returns:
- a builder for the mapping rules by tenant search request
-
newMappingRulesSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query mapping rules.camundaClient .newMappingRulesSearchRequest() .filter((f) -> f.mappingRuleId("mapping-rule-123")) .sort((s) -> s.mappingRuleId().asc()) .page((p) -> p.limit(100)) .send();- Specified by:
newMappingRulesSearchRequestin interfaceCamundaClient- Returns:
- a builder for the mapping rules search request
-
newRolesByGroupSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query roles by group.camundaClient .newRolesByGroupSearchRequest(groupId) .filter((f) -> f.roleName(roleName)) .sort((s) -> s.roleName().asc()) .page((p) -> p.limit(100)) .send();- Specified by:
newRolesByGroupSearchRequestin interfaceCamundaClient- Parameters:
groupId- the ID of the group- Returns:
- a builder for the roles by group search request
-
newIncidentsByProcessInstanceSearchRequest
public IncidentsByProcessInstanceSearchRequest newIncidentsByProcessInstanceSearchRequest(long processInstanceKey) Description copied from interface:CamundaClientExecutes a search request to query incidents by process instance key.camundaClient .newIncidentSearchByProcessInstanceKey(processInstanceKey) .sort((s) -> s.incidentKey().desc()) .page((p) -> p.limit(100)) .send();- Specified by:
newIncidentsByProcessInstanceSearchRequestin interfaceCamundaClient
-
newGroupsByRoleSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query groups by role.camundaClient .newGroupsByRoleSearchRequest("roleId") .sort((s) -> s.groupdId().asc()) .page((p) -> p.limit(100)) .send();- Specified by:
newGroupsByRoleSearchRequestin interfaceCamundaClient- Parameters:
roleId- the ID of the role- Returns:
- a builder for the groups by role search request
-
newGroupsByTenantSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query groups by tenant.camundaClient .newGroupsByTenantSearchRequest("tenantId") .sort((s) -> s.groupId().desc()) .page((p) -> p.limit(100)) .send();- Specified by:
newGroupsByTenantSearchRequestin interfaceCamundaClient- Parameters:
tenantId- the ID of the tenant- Returns:
- a builder for the groups by tenant search request
-
newJobSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query jobs.camundaClient .newJobSearchRequest() .filter((f) -> f.jobKey(userTaskKey)) .sort((s) -> s.endTime.asc()) .page((p) -> p.limit(100)) .send();
- Specified by:
newJobSearchRequestin interfaceCamundaClient- Returns:
- a builder for the job search request
-
newMessageSubscriptionSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query message subscriptions.camundaClient .newMessageSubscriptionSearchRequest() .filter((f) -> f.messageSubscriptionKey(messageSubscriptionKey)) .sort((s) -> s.messageName().asc()) .page((p) -> p.limit(100)) .send();
- Specified by:
newMessageSubscriptionSearchRequestin interfaceCamundaClient- Returns:
- a builder for the message subscription search request
-
newIncidentsByElementInstanceSearchRequest
public IncidentsByElementInstanceSearchRequest newIncidentsByElementInstanceSearchRequest(long elementInstanceKey) Description copied from interface:CamundaClientExecutes a search request to query incidents by element instance key.camundaClient .newIncidentsByElementInstanceSearchRequest(elementInstanceKey) .sort((s) -> s.incidentKey().desc()) .page((p) -> p.limit(100)) .send();- Specified by:
newIncidentsByElementInstanceSearchRequestin interfaceCamundaClient- Parameters:
elementInstanceKey- the key of the element instance- Returns:
- a builder for the incidents by element instance search request
-
newAuditLogGetRequest
Description copied from interface:CamundaClientRequest to get an audit log by audit log key.camundaClient .newAuditLogGetRequest(auditLogKey) .send();- Specified by:
newAuditLogGetRequestin interfaceCamundaClient- Parameters:
auditLogKey- the key that identifies the corresponding audit log- Returns:
- a builder for the audit log request
-
newAuditLogSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query audit logs by the audit log key.camundaClient .newAuditLogSearchRequest() .filter((f) -> f.processInstanceKey("myProcessInstanceKey")) .sort((s) -> s.processDefinitionId().desc()) .page((p) -> p.limit(100)) .send();- Specified by:
newAuditLogSearchRequestin interfaceCamundaClient- Returns:
- a builder for the incidents by element instance search request
-
newElementInstanceWaitStateSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query element instance wait states.camundaClient .newElementInstanceWaitStateSearchRequest() .filter((f) -> f.processInstanceKey(myProcessInstanceKey)) .page((p) -> p.limit(100)) .send();- Specified by:
newElementInstanceWaitStateSearchRequestin interfaceCamundaClient- Returns:
- a builder for the element instance wait state search request
-
newUserTaskAuditLogSearchRequest
Description copied from interface:CamundaClientExecutes a search request to query audit logs related to a user task.long userTaskKey = ...; camundaClient .newUserTaskAuditLogSearchRequest(userTaskKey) .filter((f) -> f.actorId("actorId")) .sort((s) -> s.timestamp().desc()) .page((p) -> p.limit(100)) .send();- Specified by:
newUserTaskAuditLogSearchRequestin interfaceCamundaClient- Parameters:
userTaskKey- the key of the user task- Returns:
- a builder for the user task audit log search request
-
newProcessDefinitionInstanceStatisticsRequest
Description copied from interface:CamundaClientGet statistics about process instances, grouped by process definition and tenant.camundaClient .newProcessDefinitionInstanceStatisticsRequest() .sort((s) -> s.processDefinitionId().asc()) .page((p) -> p.limit(100)) .send();
- Specified by:
newProcessDefinitionInstanceStatisticsRequestin interfaceCamundaClient- Returns:
- a builder for the process definition instance statistics request
-
newProcessDefinitionInstanceVersionStatisticsRequest
public ProcessDefinitionInstanceVersionStatisticsRequest newProcessDefinitionInstanceVersionStatisticsRequest(String processDefinitionId) Description copied from interface:CamundaClientGet statistics about process instances, grouped by version for a given process definition.camundaClient .newProcessDefinitionInstanceVersionStatisticsRequest(processDefinitionId) .filter((f) -> f.tenantId("tenantId")) .sort((s) -> s.processDefinitionVersion().asc()) .page((p) -> p.limit(100)) .send();- Specified by:
newProcessDefinitionInstanceVersionStatisticsRequestin interfaceCamundaClient- Parameters:
processDefinitionId- the id of the process definition- Returns:
- a builder for the process definition version instance statistics request
-
newEvaluateConditionalCommand
Description copied from interface:CamundaClientCommand to evaluate root-level conditional start events for process definitions.camundaClient .newEvaluateConditionalCommand() .variables(json) .send(); // Or for a specific process definition and tenant: camundaClient .newEvaluateConditionalCommand() .variables(json) .processDefinitionKey(12345L) .tenantId("tenant-1") .send();- Specified by:
newEvaluateConditionalCommandin interfaceCamundaClient- Returns:
- a builder for the request to evaluate root-level conditional start events
-
newIncidentProcessInstanceStatisticsByErrorRequest
public IncidentProcessInstanceStatisticsByErrorRequest newIncidentProcessInstanceStatisticsByErrorRequest()Description copied from interface:CamundaClientRetrieves statistics about active process instances that currently have active incidents, grouped by incident error hash code.camundaClient .newIncidentProcessInstanceStatisticsByErrorRequest() .page(p -> p.limit(50)) .sort(s -> s.activeInstancesWithErrorCount().desc()) .send();
- Specified by:
newIncidentProcessInstanceStatisticsByErrorRequestin interfaceCamundaClient- Returns:
- a builder for querying process instance statistics grouped by incident error
-
newEvaluateExpressionCommand
Description copied from interface:CamundaClientCommand to evaluate an expression.camundaClient .newEvaluateExpressionCommand() .expression("=x + y") .tenantId("tenant_123") .send();- Specified by:
newEvaluateExpressionCommandin interfaceCamundaClient- Returns:
- a builder for the command
-
newIncidentProcessInstanceStatisticsByDefinitionRequest
public IncidentProcessInstanceStatisticsByDefinitionRequest newIncidentProcessInstanceStatisticsByDefinitionRequest(int errorHashCode) Description copied from interface:CamundaClientExecutes a statistics request that returns counts of active process instances with active incidents, grouped by process definition.The statistics are scoped to a specific incident error and therefore require an error hash code to be provided.
Each result item represents a single process definition (including version and tenant) and contains the number of active process instances that currently have an incident with the given error hash code.
camundaClient .newIncidentProcessInstanceStatisticsByDefinitionRequest(errorHashCode) .page(p -> p.limit(50)) .sort(s -> s.activeInstancesWithErrorCount().desc()) .send();
- Specified by:
newIncidentProcessInstanceStatisticsByDefinitionRequestin interfaceCamundaClient- Parameters:
errorHashCode- the error hash code to filter the incidents by- Returns:
- a builder for the incident process instance statistics request grouped by definition
-
newResourceGetRequest
Description copied from interface:CamundaClientRetrieves a resource by key.long resourceKey = ...; camundaClient .newResourceGetRequest(resourceKey) .send();
- Specified by:
newResourceGetRequestin interfaceCamundaClient- Returns:
- a builder for the request to get a resource
-
newResourceContentGetRequest
Description copied from interface:CamundaClientRetrieves a resource content by key.long resourceKey = ...; camundaClient .newResourceContentGetRequest(resourceKey) .send();
- Specified by:
newResourceContentGetRequestin interfaceCamundaClient- Returns:
- a builder for the request to get an RPA resource content as JSON
-
newResourceContentBinaryGetRequest
Description copied from interface:CamundaClientRetrieves a resource content as binary by key.long resourceKey = ...; camundaClient .newResourceContentBinaryGetRequest(resourceKey) .send();
- Specified by:
newResourceContentBinaryGetRequestin interfaceCamundaClient- Returns:
- a builder for the request to get a resource content as binary
-
newCreateAgentHistoryItemCommand
Description copied from interface:CamundaClientCreates a command to append a conversation history item to an agent instance.CreateAgentHistoryItemResponse response = camundaClient .newCreateAgentHistoryItemCommand(agentInstanceKey) .elementInstanceKey(elementInstanceKey) .jobKey(jobKey) .jobLease(jobLease) .role(AgentInstanceHistoryRole.ASSISTANT) .content(contentList) .producedAt(OffsetDateTime.now()) .send() .join();- Specified by:
newCreateAgentHistoryItemCommandin interfaceCamundaClient- Parameters:
agentInstanceKey- the key of the agent instance- Returns:
- a builder for creating an agent history item
-
newCreateAgentInstanceCommand
Description copied from interface:CamundaClientCreates a command to create a new agent instance.CreateAgentInstanceResponse response = camundaClient .newCreateAgentInstanceCommand() .elementInstanceKey(2251799813685248) .model("gpt-4o") .provider("openai") .systemPrompt("You are a helpful assistant.") .send() .join();- Specified by:
newCreateAgentInstanceCommandin interfaceCamundaClient- Returns:
- a builder for creating an agent instance
-
newUpdateAgentInstanceCommand
Description copied from interface:CamundaClientCreates a command to update an existing agent instance.camundaClient .newUpdateAgentInstanceCommand(agentInstanceKey) .elementInstanceKey(elementInstanceKey) .status(AgentInstanceUpdateStatus.THINKING) .send() .join();- Specified by:
newUpdateAgentInstanceCommandin interfaceCamundaClient- Parameters:
agentInstanceKey- the key of the agent instance to update- Returns:
- a builder for updating the agent instance
-
newCreateGlobalTaskListenerRequest
Description copied from interface:CamundaClientCreates a request to create a new global task listener.GlobalTaskListenerResponse response = camundaClient .newCreateGlobalTaskListenerRequest() .id("my-listener") .type("my-job-type") .eventTypes(GlobalTaskListenerEventType.ALL) .send() .join();- Specified by:
newCreateGlobalTaskListenerRequestin interfaceCamundaClient- Returns:
- a builder for creating a global task listener
-
newUpdateGlobalTaskListenerRequest
Description copied from interface:CamundaClientCreates a request to update an existing global task listener.GlobalTaskListenerResponse response = camundaClient .newUpdateGlobalTaskListenerRequest("my-listener") .type("my-job-type") .eventTypes(GlobalTaskListenerEventType.ALL) .send() .join();- Specified by:
newUpdateGlobalTaskListenerRequestin interfaceCamundaClient- Parameters:
id- the id of the global listener to update- Returns:
- a builder for updating a global task listener
-
newDeleteGlobalTaskListenerRequest
Description copied from interface:CamundaClientCreates a request to delete a global task listener.camundaClient .newDeleteGlobalTaskListenerRequest("my-listener") .send();- Specified by:
newDeleteGlobalTaskListenerRequestin interfaceCamundaClient- Parameters:
id- the id of the global listener to delete- Returns:
- a builder for deleting a global task listener
-
newGlobalTaskListenerGetRequest
Description copied from interface:CamundaClientCreates a request to fetch a global task listener by id.camundaClient .newGlobalTaskListenerGetRequest("my-listener") .send();- Specified by:
newGlobalTaskListenerGetRequestin interfaceCamundaClient- Returns:
- a builder for fetching a global task listener
-
newGlobalTaskListenerSearchRequest
Description copied from interface:CamundaClientCreates a request to search for global task listeners.Global task listeners can be searched with filtering and sorting capabilities:
camundaClient .newGlobalTaskListenerSearchRequest() .filter(f -> f.source(GlobalListenerSource.CONFIGURATION)) .sort(s -> s.priority().desc()) .send();- Specified by:
newGlobalTaskListenerSearchRequestin interfaceCamundaClient- Returns:
- a builder for searching global task listeners
-
newAgentInstanceGetRequest
Description copied from interface:CamundaClientCreates a request to fetch an agent instance by its key.camundaClient .newAgentInstanceGetRequest(agentInstanceKey) .send();- Specified by:
newAgentInstanceGetRequestin interfaceCamundaClient- Parameters:
agentInstanceKey- the key of the agent instance to retrieve- Returns:
- a builder for fetching an agent instance
-
newAgentInstanceSearchRequest
Description copied from interface:CamundaClientCreates a request to search for agent instances.Agent instances can be searched with filtering and sorting capabilities:
camundaClient .newAgentInstanceSearchRequest() .filter(f -> f.status(AgentInstanceStatus.COMPLETED)) .sort(s -> s.creationDate().desc()) .send();- Specified by:
newAgentInstanceSearchRequestin interfaceCamundaClient- Returns:
- a builder for searching agent instances
-
newAgentInstanceHistorySearchRequest
public AgentInstanceHistorySearchRequest newAgentInstanceHistorySearchRequest(long agentInstanceKey) Description copied from interface:CamundaClientCreates a request to search the conversation history of an agent instance.camundaClient .newAgentInstanceHistorySearchRequest(agentInstanceKey) .filter(f -> f.role(AgentInstanceHistoryRole.USER)) .sort(s -> s.producedAt().asc()) .send();- Specified by:
newAgentInstanceHistorySearchRequestin interfaceCamundaClient- Parameters:
agentInstanceKey- the key of the agent instance whose history to search- Returns:
- a builder for searching agent instance history
-
newCompleteCommand
Description copied from interface:JobClientCommand to complete a job.long jobKey = ..; jobClient .newCompleteCommand(jobKey) .variables(json) .send();
If the job is linked to a process instance then this command will complete the related activity and continue the flow.
- Specified by:
newCompleteCommandin interfaceJobClient- Parameters:
jobKey- the key which identifies the job- Returns:
- a builder for the command
-
newCompleteCommand
Description copied from interface:JobClientCommand to complete a job.ActivatedJob job = ..; jobClient .newCompleteCommand(job) .variables(json) .send();
If the job is linked to a process instance then this command will complete the related activity and continue the flow.
- Specified by:
newCompleteCommandin interfaceJobClient- Parameters:
job- the activated job- Returns:
- a builder for the command
-
newFailCommand
Description copied from interface:JobClientCommand to mark a job as failed.long jobKey = ..; jobClient .newFailCommand(jobKey) .retries(3) .send();
If the given retries are greater than zero then this job will be picked up again by a job subscription. Otherwise, an incident is created for this job.
- Specified by:
newFailCommandin interfaceJobClient- Parameters:
jobKey- the key which identifies the job- Returns:
- a builder for the command
-
newFailCommand
Description copied from interface:JobClientCommand to mark a job as failed.ActivatedJob job = ..; jobClient .newFailCommand(job) .retries(3) .send();
If the given retries are greater than zero then this job will be picked up again by a job subscription. Otherwise, an incident is created for this job.
- Specified by:
newFailCommandin interfaceJobClient- Parameters:
job- the activated job- Returns:
- a builder for the command
-
newThrowErrorCommand
Description copied from interface:JobClientCommand to report a business error (i.e. non-technical) that occurs while processing a job.long jobKey = ...; String code = ...; jobClient .newThrowErrorCommand(jobKey) .errorCode(code) .send();
The error is handled in the process by an error catch event. If there is no error catch event with the specified errorCode then an incident will be raised instead.
- Specified by:
newThrowErrorCommandin interfaceJobClient- Parameters:
jobKey- the key which identifies the job- Returns:
- a builder for the command
-
newThrowErrorCommand
Description copied from interface:JobClientCommand to report a business error (i.e. non-technical) that occurs while processing a job.ActivatedJob job = ...; String code = ...; jobClient .newThrowErrorCommand(job) .errorCode(code) .send();
The error is handled in the process by an error catch event. If there is no error catch event with the specified errorCode then an incident will be raised instead.
- Specified by:
newThrowErrorCommandin interfaceJobClient- Parameters:
job- the activated job- Returns:
- a builder for the command
-
newActivateJobsCommand
Description copied from interface:JobClientCommand to activate multiple jobs of a given type.jobClient .newActivateJobsCommand() .jobType("payment") .maxJobsToActivate(10) .workerName("paymentWorker") .timeout(Duration.ofMinutes(10)) .send();The command will try to use
maxJobsToActivatefor givenjobType. If less then the requestedmaxJobsToActivatejobs of thejobTypeare available for activation the returned list will have fewer elements.- Specified by:
newActivateJobsCommandin interfaceJobClient- Returns:
- a builder for the command
-
newStreamJobsCommand
Description copied from interface:JobClientActivates and streams jobs of a specific type.This command will always try to use the gRPC communication protocol, even if the client is configured to prefer REST (streaming over REST is not supported).
final Consumer<ActivatedJob> consumer = ...; // do something with the consumed job final CamundaFuture<StreamJobsResponse> stream = jobClient .newStreamJobsCommand() .jobType("payment") .consumer(consumer) .workerName("paymentWorker") .timeout(Duration.ofMinutes(10)) .send(); stream.whenComplete((ok, error) -> { // recreate stream if necessary // be careful if you've cancelled the stream explicitly to not recreate it if shutting down }); // You can later terminate the stream by cancelling the future stream.cancel(true);Stream or Activate?
As opposed to
JobClient.newActivateJobsCommand(), which polls each partition until it has activated enough jobs or a timeout has elapsed, this command opens a long living stream onto which activated jobs are pushed. This typically results in lower latency, as jobs are activated and pushed out immediately, instead of waiting to be polled.Limitations
There is currently no way to rate limit how many jobs are streamed over a single call. This can be mitigated by opening more streams of the same type, which will ensure work is fairly load balanced.
Additionally, only jobs which are created, retried, or timed out after the command has been registered will be streamed out. For older jobs, you must still use the
JobClient.newActivateJobsCommand(). It's generally recommended that you use theJobWorkerAPI to avoid having to coordinate both calls.Activation
Jobs activated via this command will use the given worker name, activation time out, and fetch variables parameters in the same way as the
JobClient.newActivateJobsCommand().Termination
The stream can be explicitly cancelled by performing one of the following:
- Closing the Camunda client
- Cancelling the result of
FinalCommandStep.send()viaFuture.cancel(boolean)(the argument is irrelevant) - Setting a
FinalCommandStep.requestTimeout(Duration); the stream will be closed once this time out is reached. By default, there is no request time out at all. It's recommended to assign a long-ish time out and recreate your streams from time to time to ensure good load balancing across gateways.
- Specified by:
newStreamJobsCommandin interfaceJobClient- Returns:
- a builder for the command
-