From 3439a4992ffb2d36a5b38d0fc3522ed321e32002 Mon Sep 17 00:00:00 2001 From: zambrovski Date: Tue, 8 Oct 2024 18:01:49 +0000 Subject: [PATCH] Deployed 3b69c15 to snapshot with MkDocs 1.6.1 and mike 2.1.3 --- snapshot/getting-started.html | 2 +- snapshot/search/search_index.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/snapshot/getting-started.html b/snapshot/getting-started.html index 619862b2..cfe691ed 100644 --- a/snapshot/getting-started.html +++ b/snapshot/getting-started.html @@ -886,7 +886,7 @@

Getting started

Install Dependency#

First install the extension dependency and configure Feign and Feign client:

<properties>
-  <camunda-platform-7-rest-client-spring-boot.version>7.21.1-SNAPSHOT</camunda-platform-7-rest-client-spring-boot.version>
+  <camunda-platform-7-rest-client-spring-boot.version>7.21.2-SNAPSHOT</camunda-platform-7-rest-client-spring-boot.version>
   <spring-cloud.version>2023.0.3</spring-cloud.version>
 </properties>
 
diff --git a/snapshot/search/search_index.json b/snapshot/search/search_index.json
index d7aabf58..2b6c6736 100644
--- a/snapshot/search/search_index.json
+++ b/snapshot/search/search_index.json
@@ -1 +1 @@
-{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"index.html","title":"Home","text":""},{"location":"index.html#introduction","title":"Introduction","text":"

This library aims to provide a REST client for Camunda Platform 7 REST API for SpringBoot. In doing so it offers \"remote\" implementations of Camunda Platform 7 Engine Java API. This project is highly iterative and releases the functionality in small increments. Please check the support matrix to find out if the functionality you require is already supported by the library.

"},{"location":"index.html#quick-start","title":"Quick Start","text":"

If you just want to start using the library, please consult our Getting Started guide.

"},{"location":"index.html#working-example","title":"Working Example","text":"

We provide a working example demonstrating some features of the library. See our Examples section for usage and configuration.

"},{"location":"index.html#user-guide","title":"User Guide","text":"

If you have any questions regarding configuration of Camunda BPM Feign please have a look at our User Guide.

"},{"location":"index.html#contribution","title":"Contribution","text":"

If you want to contribute to this project, feel free to do so. Start with Contributing guide.

"},{"location":"getting-started.html","title":"Getting started","text":"

Note

If you are using the extension from an application containing Camunda BPM Engine classes on the classpath, please check the Working Example section of our user guide.

Note

You can also use the generated feign clients directly without using the Camunda Services. Please check out the Feign Example section of our user guide.

"},{"location":"getting-started.html#install-dependency","title":"Install Dependency","text":"

First install the extension dependency and configure Feign and Feign client:

<properties>\n  <camunda-platform-7-rest-client-spring-boot.version>7.21.1-SNAPSHOT</camunda-platform-7-rest-client-spring-boot.version>\n  <spring-cloud.version>2023.0.3</spring-cloud.version>\n</properties>\n\n<dependencyManagement>\n<dependencies>\n  <dependency>\n    <groupId>org.springframework.cloud</groupId>\n    <artifactId>spring-cloud-dependencies</artifactId>\n    <version>${spring-cloud.version}</version>\n    <type>pom</type>\n    <scope>import</scope>\n  </dependency>\n</dependencies>\n</dependencyManagement>\n<dependencies>\n<dependency>\n  <groupId>org.camunda.community.rest</groupId>\n  <artifactId>camunda-platform-7-rest-client-spring-boot-starter</artifactId>\n  <version>${camunda-platform-7-rest-client-spring-boot.version}</version>\n</dependency>\n<dependency>\n  <groupId>org.springframework.cloud</groupId>\n  <artifactId>spring-cloud-starter-openfeign</artifactId>\n</dependency>\n<dependency>\n  <groupId>io.github.openfeign</groupId>\n  <artifactId>feign-httpclient</artifactId>\n</dependency>\n</dependencies>\n

Note

Please make sure your Spring Cloud version matches your Spring Boot version as described in the Spring Cloud documentation

"},{"location":"getting-started.html#configuration","title":"Configuration","text":"

In your client code, activate the usage of REST client by adding the following annotation to your configuration:

@Configuration\n@EnableCamundaRestClient\npublic class MyClientConfiguration {\n\n}\n

In order to configure the Feign client, make sure to provide usual feign client configuration (e.g. using application.yml). To set up the engine base URL, please set up the properties:

feign:\n  client:\n    config:\n      default:\n        url: \"http://your-process-engine-host/engine-rest/\"\n

There is also the possibility to configure a different URL for each feign client (even though this is a very uncommon setup):

feign:\n  client:\n    config:\n      processInstance:\n        url: \"http://your-process-engine-host/engine-rest/\"\n      processDefinition:\n        url: \"http://your-process-engine-host/engine-rest/\"\n      message:\n        url: \"http://your-process-engine-host/engine-rest/\"\n      ...\n
"},{"location":"getting-started.html#usage","title":"Usage","text":"

To access the remote API, inject the remote API implementation:

@Component\npublic class MyClient {\n\n  private RuntimeService runtimeService;\n\n  public MyClient(@Qualifier(\"remote\") RuntimeService runtimeService) {\n    this.runtimeService = runtimeService;\n  }\n\n  public void start() {\n    this.runtimeService\n      .startProcessInstanceByKey(\"my_process_key\");\n  }\n\n  public void correlate() {\n    this.runtimeService\n      .createMessageCorrelation(\"message_received\")\n      .processInstanceBusinessKey(\"WAIT_FOR_MESSAGE\")\n      .correlateAllWithResult();\n  }\n}\n
"},{"location":"developer-guide/contribution.html","title":"Contributing","text":"

There are several ways in which you may contribute to this project.

  • File issues
  • Submit a pull requests
"},{"location":"developer-guide/contribution.html#found-a-bug-or-missing-feature","title":"Found a bug or missing feature?","text":"

Please file an issue in our issue tracking system.

"},{"location":"developer-guide/contribution.html#submit-a-pull-request","title":"Submit a Pull Request","text":"

If you found a solution to an open issue and implemented it, we would be happy to add your contribution in the code base. For doing so, please create a pull request. Prior to that, please make sure you

  • rebased against the develop branch
  • stick to project coding conventions
  • added test cases for the problem you are solving
  • added docs, describing the change
  • generally comply with codeacy report
"},{"location":"developer-guide/project-setup.html","title":"Project Setup","text":"

If you are interested in developing and building the project please read the following the instructions carefully.

"},{"location":"developer-guide/project-setup.html#version-control","title":"Version control","text":"

To get sources of the project, please execute:

git clone https://github.com/camunda-communit-hub/camunda-platform-7-rest-client-spring-boot.git\ncd camunda-platform-7-rest-client-spring-boot\n

We are using gitflow in our git SCM for naming b ranches. That means that you should start from master branch, create a feature/<name> out of it and once it is completed create a pull request containing it. Please squash your commits before submitting and use semantic commit messages, if possible.

"},{"location":"developer-guide/project-setup.html#project-build","title":"Project Build","text":"

Perform the following steps to get a development setup up and running.

./mvnw clean install\n
"},{"location":"developer-guide/project-setup.html#integration-tests","title":"Integration Tests","text":"

By default, the build command will ignore the run of failsafe Maven plugin executing the integration tests (usual JUnit tests with class names ending with ITest). In order to run integration tests, please call from your command line:

./mvnw -Pitest failsafe:verify\n
"},{"location":"developer-guide/project-setup.html#project-build-modes-and-profiles","title":"Project build modes and profiles","text":""},{"location":"developer-guide/project-setup.html#camunda-version","title":"Camunda Version","text":"

You can choose the used Camunda version by specifying the profile camunda-ee or camunda-ce. The default version is a Community Edition. Specify -Pcamunda-ee to switch to Camunda Enterprise edition. This will require a valid Camunda license. You can put it into a file ~/.camunda/license.txt and it will be detected automatically.

"},{"location":"developer-guide/project-setup.html#documentation","title":"Documentation","text":"

We are using MkDocs for generation of a static site documentation and rely on markdown as much as possible.

Note

If you want to develop your docs in 'live' mode, run mkdocs serve and access the http://localhost:8000/ from your browser.

For creation of documentation, please run:

"},{"location":"developer-guide/project-setup.html#generation-of-javadoc-and-sources","title":"Generation of JavaDoc and Sources","text":"

By default, the sources and javadoc API documentation are not generated from the source code. To enable this:

./mvnw clean install -Pcommunity-action-maven-release -Dgpg.skip=true\n
"},{"location":"developer-guide/project-setup.html#starting-example-applications","title":"Starting example applications","text":"

To start applications, either use your IDE and create run configuration for the class:

  • org.camunda.community.rest.example.standalone.CamundaRestClientExampleApplication
  • org.camunda.community.rest.example.processapplication.CamundaRestClientExampleApplicationWithEngineProvided

Alternatively, you can run them from the command line:

./mvn spring-boot:run -f examples/example\n./mvn spring-boot:run -f examples/example-provided\n
"},{"location":"developer-guide/project-setup.html#continuous-integration","title":"Continuous Integration","text":"

GitHub Actions are building all branches on commit hook (for codecov). In addition, a GitHub Actions are used to build PRs and all branches.

"},{"location":"developer-guide/project-setup.html#release-management","title":"Release Management","text":"

The release is produced by using the GitHub feature to \"Publish a Release\". To do so, please \"close a milestone\" and a special action will generate automatically collected issues and PRs to generate the Release notes. It will create a tag, which will be built if this release get published. Now \"Publish release\" and the GH action will create a new release and publish it into Camunda Artifactory and Maven Central Staging. To release it to the public, please create an issue and assign it to someone of Camunda @camunda-community-hub/devrel

"},{"location":"developer-guide/project-setup.html#what-modules-get-deployed-to-repository","title":"What modules get deployed to repository","text":"

Every Maven module is enabled by default. If you want to change this, please provide the property

<maven.deploy.skip>true</maven.deploy.skip>\n

inside the corresponding pom.xml. Currently, all examples are EXCLUDED from publication into Maven Central.

"},{"location":"introduction/index.html","title":"Start here","text":"

If you are visiting this project for the first time, please check the following sections:

  • Motivation
  • Features
  • Solution Strategy
  • Further Outlook
"},{"location":"introduction/features.html","title":"Features","text":"

The library supports the following features:

"},{"location":"introduction/features.html#general","title":"General","text":"
  • Usage of Open Feign library to allow for high-customizable REST client (generated from camunda openapi definition)
  • Provides a SpringBoot starter for usage in standalone client mode
  • Provides a SpringBoot starter for usage inside a process application
  • Decode HTTP error response and simulate exceptions, as if they are thrown locally by the service.
  • Implemented Services: RuntimeService, RepositoryService, TaskService, ExternalTaskService, HistoryService
"},{"location":"introduction/features.html#runtimeservice","title":"RuntimeService","text":"
  • Process start by key: #startProcessInstanceByKey()
  • Process start by id: #startProcessInstanceById()
  • Process instance query: #createProcessInstanceQuery()
  • Message correlation: #correlateMessage(), #createMessageCorrelation()
  • Signal event: #signalEventReceived(), #createSignalEvent()
  • Execution trigger: #signal()
  • Read variables: #getVariable(),#getVariables(), #getVariableTyped(), #getVariablesTyped()
  • Read local variables: #getVariableLocal(),#getVariablesLocal(), #getVariableLocalTyped(), #getVariablesLocalTyped()
  • Write variables: #setVariable(),#setVariables(), #setVariableTyped(), #setVariablesTyped()
  • Delete variables: #removeVariable(),#removeVariables()
  • Write local variables: #setVariableLocal(),#setVariablesLocal(), #setVariableLocalTyped(), #setVariablesLocalTyped()
  • Delete local variables: #removeVariableLocal(),#removeVariablesLocal()
  • Incident query: #createIncidentQuery()
  • Create/Resolve incidents: #createIncident(), #resolveIncident()
  • Annotations for incidents: #setAnnotationForIncidentById(), #clearAnnotationForIncidentById()
  • Activate/Suspend process instances by definition key: #suspendProcessInstanceByProcessDefinitionKey(), #activateProcessInstanceByProcessDefinitionKey()
  • Activate/Suspend process instances by definition id: #suspendProcessInstanceByProcessDefinitionId(), #activateProcessInstanceByProcessDefinitionId()
  • Activate/Suspend process instances: #suspendProcessInstanceById(), #activateProcessInstanceById()
  • Update process instance suspension state: #updateProcessInstanceSuspensionState()
  • Delete process instances: #deleteProcessInstance(), #deleteProcessInstanceIfExists(), #deleteProcessInstances(), #deleteProcessInstancesIfExists(), #deleteProcessInstancesAsync()
  • Create event subscription query: #createEventSubscriptionQuery()
  • Create execution query: #createExecutionQuery()
"},{"location":"introduction/features.html#repositoryservice","title":"RepositoryService","text":"
  • Query for process definitions: #createProcessDefinitionQuery()
  • History time to live: #updateDecisionDefinitionHistoryTimeToLive(), #updateProcessDefinitionHistoryTimeToLive()
  • Create deployment: #createDeployment()
  • Delete deployment: #deleteDeployment(), #deleteDeploymentCascade()
  • Deployment query: #createDeploymentQuery()
  • Delete process definition: #deleteProcessDefinition()
  • Update process definition suspension state: #updateProcessDefinitionSuspensionState()
  • Get bpmn model instance: #getBpmnModelInstance()
"},{"location":"introduction/features.html#taskservice","title":"TaskService","text":"
  • Query for tasks: #createTaskQuery()
  • Task assignment: #claim(), #defer(), #resolve(), #addCandidateGroup(), #deleteCandidateGroup(), #addCadidateUser(), #deleteCandidateUser()
  • Identity links: #addUserIdentityLink(), #addGroupIdentityLink(), #deleteUserIdentityLink(), #deleteGroupIdentityLink(),
  • Task completion: #complete()
  • Task deletion: #deleteTasks()
  • Task attributes: #setPriority(), #setOwner(), #setAssignee(), #saveTask()
  • Handling Errors and Escalation: #handleBpmnError(), #handleEscalation()
  • Read variables: #getVariable(),#getVariables(), #getVariableTyped(), #getVariablesTyped()
  • Read local variables: #getVariableLocal(),#getVariablesLocal(), #getVariableLocalTyped(), #getVariablesLocalTyped()
  • Write variables: #setVariable(),#setVariables(), #setVariableTyped(), #setVariablesTyped()
  • Delete variables: #removeVariable(),#removeVariables()
  • Write local variables: #setVariableLocal(),#setVariablesLocal(), #setVariableLocalTyped(), #setVariablesLocalTyped()
  • Delete local variables: #removeVariableLocal(),#removeVariablesLocal()
"},{"location":"introduction/features.html#externaltaskservice","title":"ExternalTaskService","text":"

We are not aiming to replace the existing External Task Client, but still provide an alternative implementation for some methods.

  • Complete a task by id: #complete()
  • Handle BPMN Errors: #handleBpmnError()
  • Handle failures: #handleFailure()
  • Fetch and lock: #fetchAndLock()
  • Handling locks: #extendLock(),#lock(),#unlock()
  • Setting priority: #setPriority()
  • Getting topic names: #getTopicNames()
  • Getting error details: #getExternalTaskErrorDetails()
  • Querying external tasks: #createExternalTaskQuery()
  • Setting retries: #setRetries(),#setRetriesAsync(),#updateRetries()
"},{"location":"introduction/features.html#historyservice","title":"HistoryService","text":"
  • Historic process instance query: #createHistoricProcessInstanceQuery()
"},{"location":"introduction/features.html#decisionservice","title":"DecisionService","text":"
  • Evaluate decision: #evaluateDecisionById(),#evaluateDecisionByKey()
  • Evaluate decision table: #evaluateDecisionTableById(),#evaluateDecisionTableByKey().#evaluateDecisionTableByKeyAndVersion()
"},{"location":"introduction/further-outlook.html","title":"Further Outlook","text":"

Support query methods of RuntimeService for:

  • executions
  • process instances

Support methods of ManagementService for:

  • jobs
  • batches

Is the library missing a feature important for you? Please report it.

"},{"location":"introduction/motivation.html","title":"Motivation","text":"

During the development of Camunda Platform 7 process applications you have to choose if your applications is either using Camunda Platform 7 Engine or is Camunda Platform 7 Engine. Depending on this decision, you are accessing Camunda Platform 7 via REST or Java API.

While Camunda Engine Core API provides well-designed and easy-accessible programming interface for Java, the usage of REST interface requires additional development. In order to enable the usage of REST API from Java and allow for easy integration into Spring Boot applications, the Camunda Platform 7 REST Client Spring-Boot library has been developed.

So instead of usage a hand-written or generated client, this library provides you the same access to a remote Camunda Platform 7 engine as the Java API provides to local Camunda. The difference between using and being disappears.

"},{"location":"introduction/solution.html","title":"Solution","text":"

The library uses the popular Java REST client OpenFeign embedded into Spring-Cloud-Feign-Starter and provides implementations of Java Camunda Platform 7 Engine Core API, accessing the remote engine via REST API.

In doing so, the remote version of the Camunda Engine API can be easily integrated in existing application using a SpringBoot Starter.

Depending on your usage scenario, you can choose from two starters shipped by the library.

"},{"location":"user-guide/index.html","title":"Overview","text":"

The user guide consists of several sections.

"},{"location":"user-guide/index.html#examples","title":"Examples","text":"
  • Standalone Usage
  • Usage inside a process application
"},{"location":"user-guide/index.html#configuration","title":"Configuration","text":"
  • Support Matrix
  • Logging
  • HTTP Error Decoding
"},{"location":"user-guide/error-decoding.html","title":"Error-Decoding","text":"

The camunda-platform-7-rest-client-spring-boot uses HTTP to access a remote Camunda Platform 7 REST API. If any errors occur on this access, Camunda Platform 7 REST API will send with corresponding HTTP error code and embed information about the error into http response. camunda-platform-7-rest-client-spring-boot tries to parse this response and throw an exception on the client side similar to the original exception thrown on the remote Camunda Platform 7 Engine.

By default, the library tries to decode HTTP codes and will throw a RemoteProcessEngineException. If the response decoding was successful, the cause of the thrown RemoteProcessEngineException will be the instance of the exception class thrown on remote Camunda Platform 7 engine and the reason of the latter exception will be the original reason from the server. This behavior can be changed by configuration, so that the remotely thrown exception will be thrown locally, if the decoding was successful. For this the property camunda.rest.client.error-decoding.wrap-exceptions has to be set to false.

If anything goes wrong on HTTP error decoding, the RemoteProcessEngineException will contain a generic message extracted from the REST call. If the error decoding is deactivated, FeignException is wrapping any exception occurring during the remote access.

"},{"location":"user-guide/error-decoding.html#configuration","title":"Configuration","text":"

By default, the HTTP error decoding is switched on and the library reacts on HTTP codes 400 and 500. Also by default all exceptions will be wrapped in a RemoteProcessEngineException. Those defaults can be changed by setting the following properties.

In order to configure it, a block of properties e.g. in application.yml is required. Here are the defaults:

camunda:\n  rest:\n    client:\n      error-decoding:\n        enabled: true\n        http-codes: 400, 500\n        wrap-exceptions: true\n

Info

If you are using the remote version of the ExternalTaskService this will report HTTP 404 if you try to complete a non-existing task. By changing the camunda.rest.client.error-decoding.http-codes property you can cover this response too.

"},{"location":"user-guide/examples.html","title":"Examples","text":""},{"location":"user-guide/examples.html#working-example","title":"Working example","text":"

We provide demonstrating the usage of the library, depending on the context.

"},{"location":"user-guide/examples.html#standalone-usage","title":"Standalone usage","text":"

The example demonstrates the usage of the library accessing a process engine via REST from an arbitrary SpringBoot application. The client executes the following steps:

"},{"location":"user-guide/examples.html#timing-overview-of-the-example","title":"Timing overview of the example","text":"Initial offset Repeat Invoked method 8.0 sec - Get deployed processes 10.0 sec 5 sec Start process 12.5 sec 5 sec Send signal 13.0 sec 5 sec Correlate message"},{"location":"user-guide/examples.html#how-does-it-work","title":"How does it work","text":"

The application uses the library by adding it to the classpath via Apache Maven dependency. That is:

<dependency>\n  <groupId>org.camunda.community.rest</groupId>\n  <artifactId>camunda-platform-7-rest-client-spring-boot-starter</artifactId>\n  <version>${project.version}</version>\n</dependency>\n

In order to activate the library, the @EnableCamundaRestClient has been put on the configuration class of the application. The interesting part is now the ProcessClient component. This Spring Component has several methods marked with @Scheduled annotation to demonstrate the time-based execution of desired functionality. To do so, the component has two injected resources, both marked with the @Qualifier(\"remote\") annotation. This annotation indicates that the remote version of the Camunda API services are used.

In order to configure the library, a block of properties e.g. in application.yml is required. The values specify the location of the remote process engine:

feign:\n  client:\n    config:\n      default:\n        url: \"http://localhost:8083/engine-rest/\"\n

To run this example, you will need the server part from the next example. To activate the server part only, please run from command line:

mvn clean install\nmvn -f examples/example -Prun\nmvn -f examples/example-provided -Prun-server-only\n
"},{"location":"user-guide/examples.html#usage-inside-a-process-application","title":"Usage inside a process application","text":"

The example demonstrates the usage of the library for accessing a process engine via REST from a Camunda Platform 7 process application. The key difference to the previous example is that the required Camunda classes are already present on the classpath and an engine is initialized and is running.

Imagine the process engine has the following process deployed:

The client (running technically in the same JVM, but accessing the engine via REST) again executes the following steps:

"},{"location":"user-guide/examples.html#timing-overview-of-the-example_1","title":"Timing overview of the example","text":"Initial offset Repeat Invoked method 8.0 sec - Get deployed processes 10.0 sec 5 sec Start process 12.5 sec 5 sec Send signal 13.0 sec 5 sec Correlate message"},{"location":"user-guide/examples.html#how-does-it-work_1","title":"How does it work","text":"

The application uses the library by adding it to the classpath via Apache Maven dependency. That is:

<dependency>\n  <groupId>org.camunda.community.rest</groupId>\n  <artifactId>camunda-platform-7-rest-client-spring-boot-starter-provided</artifactId>\n  <version>${project.version}</version>\n</dependency>\n

NOTE: Please note that we use a different starter. The suffix provided in the artifact name indicates that the engine is already a part of the application and doesn't need to be put on classpath.

In order to activate the library, the @EnableCamundaRestClient has been put on the configuration class of the application. The interesting part is now the ProcessClient component. This Spring Component has several methods marked with @Scheduled annotation to demonstrate the time-based execution of desired functionality. To do so, the component has two injected resources, both marked with the @Qualifier(\"remote\") annotation. This annotation indicates that the remote version of the Camunda API services are used.

In order to configure the library, a block of properties e.g. in application.yml is required:

feign:\n  client:\n    config:\n      default:\n        url: \"http://localhost:8083/engine-rest/\"\n
"},{"location":"user-guide/examples.html#usage-of-feign-clients","title":"Usage of feign clients","text":"

The example demonstrates the usage of the library for accessing the REST from a Camunda Platform 7 process application using the generated feign clients. The difference to the previous examples is that no Camunda dependency is required on the classpath, as the feign clients are used directly.

"},{"location":"user-guide/examples.html#how-does-it-work_2","title":"How does it work","text":"

The application uses the library by adding it to the classpath via Apache Maven dependency. That is:

<dependency>\n  <groupId>org.camunda.community.rest</groupId>\n  <artifactId>camunda-platform-7-rest-client-spring-boot-openapi</artifactId>\n  <version>${project.version}</version>\n</dependency>\n

In order to activate the library, the @EnableCamundaFeignClients has to be put on the configuration class of the application. The interesting part is now the ProcessClient component. This Spring Component has several methods marked with @Scheduled annotation to demonstrate the time-based execution of desired functionality. To do so, the component has injected the needed feign clients as resources.

In order to configure the library, the same block of properties e.g. in application.yml as before is required:

feign:\n  client:\n    config:\n      ...\n
"},{"location":"user-guide/logging.html","title":"Logging","text":"

OpenFeign library used in the camunda-platform-7-rest-client-spring-boot has a high-configurable logging facility. In order to configure it, a block of properties e.g. in application.yml is required:

logging:\n  level:\n    org.camunda.community.rest.client.RuntimeServiceClient: DEBUG\n    org.camunda.community.rest.client.RepositoryServiceClient: DEBUG\n    org.camunda.community.rest.client.ExternalTaskServiceClient: DEBUG\n

In order to enable Request/Response logging, you need to configure additional Feign logging by providing a factory bean:

import feign.Logger;\n\n@Configuration\npublic class MyConfiguration {\n    /**\n     * Full debug of feign client, including request/response\n     */\n    @Bean\n    public Logger.Level feignLoggerLevel() {\n        return Logger.Level.FULL;\n    }\n}\n
"},{"location":"user-guide/support-matrix.html","title":"Support Martix","text":"

Here are currently implemented methods. The version behind the service name denotes the last version in which the service has been touched.

"},{"location":"user-guide/support-matrix.html#task-service-006","title":"Task Service @ 0.0.6","text":"
  • # createTaskQuery
  • # claim
  • # deleteTask
  • # deleteTasks
  • # resolveTask
  • # complete
  • # saveTask
  • # setAssignee
  • # setPriority
  • # setVariable
  • # setVariables
  • # setVariableLocal
  • # setVariablesLocal
  • # getVariable
  • # getVariableLocal
  • # getVariableTyped
  • # getVariableLocal
  • # getVariableLocalTyped
  • # getVariables
  • # getVariablesLocal
  • # getVariablesTyped
  • # getVariablesLocalTyped
  • # removeVariable
  • # removeVariableLocal
  • # removeVariables
  • # removeVariablesLocal
  • # getIdentityLinksForTask
  • # addCandidateUser
  • # addCandidateGroup
  • # addUserIdentityLink
  • # addGroupIdentityLink
  • # deleteCandidateUser
  • # deleteCandidateGroup
  • # deleteUserIdentityLink
  • # deleteGroupIdentityLink
  • # handleBpmnError
  • # handleEscalation
"},{"location":"user-guide/support-matrix.html#runtime-service-007","title":"Runtime Service @ 0.0.7","text":"
  • # startProcessInstanceByKey
  • # startProcessInstanceById
  • # correlateMessage
  • # createMessageCorrelation
  • # createProcessInstanceQuery
  • # signal
  • # signalEventReceived
  • # createSignalEvent
  • # getVariable
  • # getVariables
  • # setVariable
  • # setVariables
  • # removeVariable
  • # removeVariables
  • # getVariableTyped
  • # getVariablesTyped
  • # setVariableTyped
  • # setVariablesTyped
  • # getVariableLocal
  • # getVariablesLocal
  • # setVariableLocal
  • # setVariablesLocal
  • # removeVariableLocal
  • # removeVariablesLocal
  • # getVariableTypedLocal
  • # getVariablesTypedLocal
  • # setVariableTypedLocal
  • # setVariablesTypedLocal
  • # createIncidentQuery
  • # createIncident
  • # resolveIncident
  • # setAnnotationForIncidentById
  • # clearAnnotationForIncidentById
  • # suspendProcessInstanceByProcessDefinitionKey
  • # activateProcessInstanceByProcessDefinitionKey
  • # suspendProcessInstanceByProcessDefinitionId
  • # activateProcessInstanceByProcessDefinitionId
  • # suspendProcessInstanceById
  • # activateProcessInstanceById
  • # updateProcessInstanceSuspensionState
  • # deleteProcessInstance
  • # deleteProcessInstanceIfExists
  • # deleteProcessInstances
  • # deleteProcessInstancesIfExists
  • # deleteProcessInstancesAsync
"},{"location":"user-guide/support-matrix.html#repositoryservice-007","title":"RepositoryService @ 0.0.7","text":"
  • # createProcessDefinitionQuery
  • # updateDecisionDefinitionHistoryTimeToLive
  • # updateProcessDefinitionHistoryTimeToLive
  • # createDeployment
  • # deleteDeployment
  • # deleteDeploymentCascade
  • # createDeploymentQuery
  • # deleteProcessDefinition
  • # updateProcessDefinitionSuspensionState
"},{"location":"user-guide/support-matrix.html#externaltaskservice-005","title":"ExternalTaskService @ 0.0.5","text":"
  • # complete
  • # handleBpmnError
  • # handleFailure
"},{"location":"user-guide/support-matrix.html#historyservice-007","title":"HistoryService @ 0.0.7","text":"
  • # createHistoricProcessInstanceQuery
"},{"location":"user-guide/support-matrix.html#decisionservice-7173","title":"DecisionService @ 7.17.3","text":"
  • # evaluateDecisionById
  • # evaluateDecisionByKey
  • # evaluateDecisionTableById
  • # evaluateDecisionTableByKey
  • # evaluateDecisionTableByKeyAndVersion
"},{"location":"user-guide/support-matrix.html#runtimeservice-7173","title":"RuntimeService @ 7.17.3","text":"
  • # createEventSubscriptionQuery
  • # createExecutionQuery
"},{"location":"user-guide/support-matrix.html#repositoryservice-7202","title":"RepositoryService @ 7.20.2","text":"
  • # getBpmnModelInstance
"},{"location":"user-guide/support-matrix.html#externaltaskservice-7202","title":"ExternalTaskService @ 7.20.2","text":"
  • # createExernalTaskQuery
  • # fetchAndLock
  • # extendLock
  • # unlock
  • # lock
  • # getTopicNames
  • # getExternalTaskErrorDetails
  • # setPriority
  • # setRetries
  • # setRetriesAsync
  • # updateRetries
"}]} \ No newline at end of file +{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"index.html","title":"Home","text":""},{"location":"index.html#introduction","title":"Introduction","text":"

This library aims to provide a REST client for Camunda Platform 7 REST API for SpringBoot. In doing so it offers \"remote\" implementations of Camunda Platform 7 Engine Java API. This project is highly iterative and releases the functionality in small increments. Please check the support matrix to find out if the functionality you require is already supported by the library.

"},{"location":"index.html#quick-start","title":"Quick Start","text":"

If you just want to start using the library, please consult our Getting Started guide.

"},{"location":"index.html#working-example","title":"Working Example","text":"

We provide a working example demonstrating some features of the library. See our Examples section for usage and configuration.

"},{"location":"index.html#user-guide","title":"User Guide","text":"

If you have any questions regarding configuration of Camunda BPM Feign please have a look at our User Guide.

"},{"location":"index.html#contribution","title":"Contribution","text":"

If you want to contribute to this project, feel free to do so. Start with Contributing guide.

"},{"location":"getting-started.html","title":"Getting started","text":"

Note

If you are using the extension from an application containing Camunda BPM Engine classes on the classpath, please check the Working Example section of our user guide.

Note

You can also use the generated feign clients directly without using the Camunda Services. Please check out the Feign Example section of our user guide.

"},{"location":"getting-started.html#install-dependency","title":"Install Dependency","text":"

First install the extension dependency and configure Feign and Feign client:

<properties>\n  <camunda-platform-7-rest-client-spring-boot.version>7.21.2-SNAPSHOT</camunda-platform-7-rest-client-spring-boot.version>\n  <spring-cloud.version>2023.0.3</spring-cloud.version>\n</properties>\n\n<dependencyManagement>\n<dependencies>\n  <dependency>\n    <groupId>org.springframework.cloud</groupId>\n    <artifactId>spring-cloud-dependencies</artifactId>\n    <version>${spring-cloud.version}</version>\n    <type>pom</type>\n    <scope>import</scope>\n  </dependency>\n</dependencies>\n</dependencyManagement>\n<dependencies>\n<dependency>\n  <groupId>org.camunda.community.rest</groupId>\n  <artifactId>camunda-platform-7-rest-client-spring-boot-starter</artifactId>\n  <version>${camunda-platform-7-rest-client-spring-boot.version}</version>\n</dependency>\n<dependency>\n  <groupId>org.springframework.cloud</groupId>\n  <artifactId>spring-cloud-starter-openfeign</artifactId>\n</dependency>\n<dependency>\n  <groupId>io.github.openfeign</groupId>\n  <artifactId>feign-httpclient</artifactId>\n</dependency>\n</dependencies>\n

Note

Please make sure your Spring Cloud version matches your Spring Boot version as described in the Spring Cloud documentation

"},{"location":"getting-started.html#configuration","title":"Configuration","text":"

In your client code, activate the usage of REST client by adding the following annotation to your configuration:

@Configuration\n@EnableCamundaRestClient\npublic class MyClientConfiguration {\n\n}\n

In order to configure the Feign client, make sure to provide usual feign client configuration (e.g. using application.yml). To set up the engine base URL, please set up the properties:

feign:\n  client:\n    config:\n      default:\n        url: \"http://your-process-engine-host/engine-rest/\"\n

There is also the possibility to configure a different URL for each feign client (even though this is a very uncommon setup):

feign:\n  client:\n    config:\n      processInstance:\n        url: \"http://your-process-engine-host/engine-rest/\"\n      processDefinition:\n        url: \"http://your-process-engine-host/engine-rest/\"\n      message:\n        url: \"http://your-process-engine-host/engine-rest/\"\n      ...\n
"},{"location":"getting-started.html#usage","title":"Usage","text":"

To access the remote API, inject the remote API implementation:

@Component\npublic class MyClient {\n\n  private RuntimeService runtimeService;\n\n  public MyClient(@Qualifier(\"remote\") RuntimeService runtimeService) {\n    this.runtimeService = runtimeService;\n  }\n\n  public void start() {\n    this.runtimeService\n      .startProcessInstanceByKey(\"my_process_key\");\n  }\n\n  public void correlate() {\n    this.runtimeService\n      .createMessageCorrelation(\"message_received\")\n      .processInstanceBusinessKey(\"WAIT_FOR_MESSAGE\")\n      .correlateAllWithResult();\n  }\n}\n
"},{"location":"developer-guide/contribution.html","title":"Contributing","text":"

There are several ways in which you may contribute to this project.

  • File issues
  • Submit a pull requests
"},{"location":"developer-guide/contribution.html#found-a-bug-or-missing-feature","title":"Found a bug or missing feature?","text":"

Please file an issue in our issue tracking system.

"},{"location":"developer-guide/contribution.html#submit-a-pull-request","title":"Submit a Pull Request","text":"

If you found a solution to an open issue and implemented it, we would be happy to add your contribution in the code base. For doing so, please create a pull request. Prior to that, please make sure you

  • rebased against the develop branch
  • stick to project coding conventions
  • added test cases for the problem you are solving
  • added docs, describing the change
  • generally comply with codeacy report
"},{"location":"developer-guide/project-setup.html","title":"Project Setup","text":"

If you are interested in developing and building the project please read the following the instructions carefully.

"},{"location":"developer-guide/project-setup.html#version-control","title":"Version control","text":"

To get sources of the project, please execute:

git clone https://github.com/camunda-communit-hub/camunda-platform-7-rest-client-spring-boot.git\ncd camunda-platform-7-rest-client-spring-boot\n

We are using gitflow in our git SCM for naming b ranches. That means that you should start from master branch, create a feature/<name> out of it and once it is completed create a pull request containing it. Please squash your commits before submitting and use semantic commit messages, if possible.

"},{"location":"developer-guide/project-setup.html#project-build","title":"Project Build","text":"

Perform the following steps to get a development setup up and running.

./mvnw clean install\n
"},{"location":"developer-guide/project-setup.html#integration-tests","title":"Integration Tests","text":"

By default, the build command will ignore the run of failsafe Maven plugin executing the integration tests (usual JUnit tests with class names ending with ITest). In order to run integration tests, please call from your command line:

./mvnw -Pitest failsafe:verify\n
"},{"location":"developer-guide/project-setup.html#project-build-modes-and-profiles","title":"Project build modes and profiles","text":""},{"location":"developer-guide/project-setup.html#camunda-version","title":"Camunda Version","text":"

You can choose the used Camunda version by specifying the profile camunda-ee or camunda-ce. The default version is a Community Edition. Specify -Pcamunda-ee to switch to Camunda Enterprise edition. This will require a valid Camunda license. You can put it into a file ~/.camunda/license.txt and it will be detected automatically.

"},{"location":"developer-guide/project-setup.html#documentation","title":"Documentation","text":"

We are using MkDocs for generation of a static site documentation and rely on markdown as much as possible.

Note

If you want to develop your docs in 'live' mode, run mkdocs serve and access the http://localhost:8000/ from your browser.

For creation of documentation, please run:

"},{"location":"developer-guide/project-setup.html#generation-of-javadoc-and-sources","title":"Generation of JavaDoc and Sources","text":"

By default, the sources and javadoc API documentation are not generated from the source code. To enable this:

./mvnw clean install -Pcommunity-action-maven-release -Dgpg.skip=true\n
"},{"location":"developer-guide/project-setup.html#starting-example-applications","title":"Starting example applications","text":"

To start applications, either use your IDE and create run configuration for the class:

  • org.camunda.community.rest.example.standalone.CamundaRestClientExampleApplication
  • org.camunda.community.rest.example.processapplication.CamundaRestClientExampleApplicationWithEngineProvided

Alternatively, you can run them from the command line:

./mvn spring-boot:run -f examples/example\n./mvn spring-boot:run -f examples/example-provided\n
"},{"location":"developer-guide/project-setup.html#continuous-integration","title":"Continuous Integration","text":"

GitHub Actions are building all branches on commit hook (for codecov). In addition, a GitHub Actions are used to build PRs and all branches.

"},{"location":"developer-guide/project-setup.html#release-management","title":"Release Management","text":"

The release is produced by using the GitHub feature to \"Publish a Release\". To do so, please \"close a milestone\" and a special action will generate automatically collected issues and PRs to generate the Release notes. It will create a tag, which will be built if this release get published. Now \"Publish release\" and the GH action will create a new release and publish it into Camunda Artifactory and Maven Central Staging. To release it to the public, please create an issue and assign it to someone of Camunda @camunda-community-hub/devrel

"},{"location":"developer-guide/project-setup.html#what-modules-get-deployed-to-repository","title":"What modules get deployed to repository","text":"

Every Maven module is enabled by default. If you want to change this, please provide the property

<maven.deploy.skip>true</maven.deploy.skip>\n

inside the corresponding pom.xml. Currently, all examples are EXCLUDED from publication into Maven Central.

"},{"location":"introduction/index.html","title":"Start here","text":"

If you are visiting this project for the first time, please check the following sections:

  • Motivation
  • Features
  • Solution Strategy
  • Further Outlook
"},{"location":"introduction/features.html","title":"Features","text":"

The library supports the following features:

"},{"location":"introduction/features.html#general","title":"General","text":"
  • Usage of Open Feign library to allow for high-customizable REST client (generated from camunda openapi definition)
  • Provides a SpringBoot starter for usage in standalone client mode
  • Provides a SpringBoot starter for usage inside a process application
  • Decode HTTP error response and simulate exceptions, as if they are thrown locally by the service.
  • Implemented Services: RuntimeService, RepositoryService, TaskService, ExternalTaskService, HistoryService
"},{"location":"introduction/features.html#runtimeservice","title":"RuntimeService","text":"
  • Process start by key: #startProcessInstanceByKey()
  • Process start by id: #startProcessInstanceById()
  • Process instance query: #createProcessInstanceQuery()
  • Message correlation: #correlateMessage(), #createMessageCorrelation()
  • Signal event: #signalEventReceived(), #createSignalEvent()
  • Execution trigger: #signal()
  • Read variables: #getVariable(),#getVariables(), #getVariableTyped(), #getVariablesTyped()
  • Read local variables: #getVariableLocal(),#getVariablesLocal(), #getVariableLocalTyped(), #getVariablesLocalTyped()
  • Write variables: #setVariable(),#setVariables(), #setVariableTyped(), #setVariablesTyped()
  • Delete variables: #removeVariable(),#removeVariables()
  • Write local variables: #setVariableLocal(),#setVariablesLocal(), #setVariableLocalTyped(), #setVariablesLocalTyped()
  • Delete local variables: #removeVariableLocal(),#removeVariablesLocal()
  • Incident query: #createIncidentQuery()
  • Create/Resolve incidents: #createIncident(), #resolveIncident()
  • Annotations for incidents: #setAnnotationForIncidentById(), #clearAnnotationForIncidentById()
  • Activate/Suspend process instances by definition key: #suspendProcessInstanceByProcessDefinitionKey(), #activateProcessInstanceByProcessDefinitionKey()
  • Activate/Suspend process instances by definition id: #suspendProcessInstanceByProcessDefinitionId(), #activateProcessInstanceByProcessDefinitionId()
  • Activate/Suspend process instances: #suspendProcessInstanceById(), #activateProcessInstanceById()
  • Update process instance suspension state: #updateProcessInstanceSuspensionState()
  • Delete process instances: #deleteProcessInstance(), #deleteProcessInstanceIfExists(), #deleteProcessInstances(), #deleteProcessInstancesIfExists(), #deleteProcessInstancesAsync()
  • Create event subscription query: #createEventSubscriptionQuery()
  • Create execution query: #createExecutionQuery()
"},{"location":"introduction/features.html#repositoryservice","title":"RepositoryService","text":"
  • Query for process definitions: #createProcessDefinitionQuery()
  • History time to live: #updateDecisionDefinitionHistoryTimeToLive(), #updateProcessDefinitionHistoryTimeToLive()
  • Create deployment: #createDeployment()
  • Delete deployment: #deleteDeployment(), #deleteDeploymentCascade()
  • Deployment query: #createDeploymentQuery()
  • Delete process definition: #deleteProcessDefinition()
  • Update process definition suspension state: #updateProcessDefinitionSuspensionState()
  • Get bpmn model instance: #getBpmnModelInstance()
"},{"location":"introduction/features.html#taskservice","title":"TaskService","text":"
  • Query for tasks: #createTaskQuery()
  • Task assignment: #claim(), #defer(), #resolve(), #addCandidateGroup(), #deleteCandidateGroup(), #addCadidateUser(), #deleteCandidateUser()
  • Identity links: #addUserIdentityLink(), #addGroupIdentityLink(), #deleteUserIdentityLink(), #deleteGroupIdentityLink(),
  • Task completion: #complete()
  • Task deletion: #deleteTasks()
  • Task attributes: #setPriority(), #setOwner(), #setAssignee(), #saveTask()
  • Handling Errors and Escalation: #handleBpmnError(), #handleEscalation()
  • Read variables: #getVariable(),#getVariables(), #getVariableTyped(), #getVariablesTyped()
  • Read local variables: #getVariableLocal(),#getVariablesLocal(), #getVariableLocalTyped(), #getVariablesLocalTyped()
  • Write variables: #setVariable(),#setVariables(), #setVariableTyped(), #setVariablesTyped()
  • Delete variables: #removeVariable(),#removeVariables()
  • Write local variables: #setVariableLocal(),#setVariablesLocal(), #setVariableLocalTyped(), #setVariablesLocalTyped()
  • Delete local variables: #removeVariableLocal(),#removeVariablesLocal()
"},{"location":"introduction/features.html#externaltaskservice","title":"ExternalTaskService","text":"

We are not aiming to replace the existing External Task Client, but still provide an alternative implementation for some methods.

  • Complete a task by id: #complete()
  • Handle BPMN Errors: #handleBpmnError()
  • Handle failures: #handleFailure()
  • Fetch and lock: #fetchAndLock()
  • Handling locks: #extendLock(),#lock(),#unlock()
  • Setting priority: #setPriority()
  • Getting topic names: #getTopicNames()
  • Getting error details: #getExternalTaskErrorDetails()
  • Querying external tasks: #createExternalTaskQuery()
  • Setting retries: #setRetries(),#setRetriesAsync(),#updateRetries()
"},{"location":"introduction/features.html#historyservice","title":"HistoryService","text":"
  • Historic process instance query: #createHistoricProcessInstanceQuery()
"},{"location":"introduction/features.html#decisionservice","title":"DecisionService","text":"
  • Evaluate decision: #evaluateDecisionById(),#evaluateDecisionByKey()
  • Evaluate decision table: #evaluateDecisionTableById(),#evaluateDecisionTableByKey().#evaluateDecisionTableByKeyAndVersion()
"},{"location":"introduction/further-outlook.html","title":"Further Outlook","text":"

Support query methods of RuntimeService for:

  • executions
  • process instances

Support methods of ManagementService for:

  • jobs
  • batches

Is the library missing a feature important for you? Please report it.

"},{"location":"introduction/motivation.html","title":"Motivation","text":"

During the development of Camunda Platform 7 process applications you have to choose if your applications is either using Camunda Platform 7 Engine or is Camunda Platform 7 Engine. Depending on this decision, you are accessing Camunda Platform 7 via REST or Java API.

While Camunda Engine Core API provides well-designed and easy-accessible programming interface for Java, the usage of REST interface requires additional development. In order to enable the usage of REST API from Java and allow for easy integration into Spring Boot applications, the Camunda Platform 7 REST Client Spring-Boot library has been developed.

So instead of usage a hand-written or generated client, this library provides you the same access to a remote Camunda Platform 7 engine as the Java API provides to local Camunda. The difference between using and being disappears.

"},{"location":"introduction/solution.html","title":"Solution","text":"

The library uses the popular Java REST client OpenFeign embedded into Spring-Cloud-Feign-Starter and provides implementations of Java Camunda Platform 7 Engine Core API, accessing the remote engine via REST API.

In doing so, the remote version of the Camunda Engine API can be easily integrated in existing application using a SpringBoot Starter.

Depending on your usage scenario, you can choose from two starters shipped by the library.

"},{"location":"user-guide/index.html","title":"Overview","text":"

The user guide consists of several sections.

"},{"location":"user-guide/index.html#examples","title":"Examples","text":"
  • Standalone Usage
  • Usage inside a process application
"},{"location":"user-guide/index.html#configuration","title":"Configuration","text":"
  • Support Matrix
  • Logging
  • HTTP Error Decoding
"},{"location":"user-guide/error-decoding.html","title":"Error-Decoding","text":"

The camunda-platform-7-rest-client-spring-boot uses HTTP to access a remote Camunda Platform 7 REST API. If any errors occur on this access, Camunda Platform 7 REST API will send with corresponding HTTP error code and embed information about the error into http response. camunda-platform-7-rest-client-spring-boot tries to parse this response and throw an exception on the client side similar to the original exception thrown on the remote Camunda Platform 7 Engine.

By default, the library tries to decode HTTP codes and will throw a RemoteProcessEngineException. If the response decoding was successful, the cause of the thrown RemoteProcessEngineException will be the instance of the exception class thrown on remote Camunda Platform 7 engine and the reason of the latter exception will be the original reason from the server. This behavior can be changed by configuration, so that the remotely thrown exception will be thrown locally, if the decoding was successful. For this the property camunda.rest.client.error-decoding.wrap-exceptions has to be set to false.

If anything goes wrong on HTTP error decoding, the RemoteProcessEngineException will contain a generic message extracted from the REST call. If the error decoding is deactivated, FeignException is wrapping any exception occurring during the remote access.

"},{"location":"user-guide/error-decoding.html#configuration","title":"Configuration","text":"

By default, the HTTP error decoding is switched on and the library reacts on HTTP codes 400 and 500. Also by default all exceptions will be wrapped in a RemoteProcessEngineException. Those defaults can be changed by setting the following properties.

In order to configure it, a block of properties e.g. in application.yml is required. Here are the defaults:

camunda:\n  rest:\n    client:\n      error-decoding:\n        enabled: true\n        http-codes: 400, 500\n        wrap-exceptions: true\n

Info

If you are using the remote version of the ExternalTaskService this will report HTTP 404 if you try to complete a non-existing task. By changing the camunda.rest.client.error-decoding.http-codes property you can cover this response too.

"},{"location":"user-guide/examples.html","title":"Examples","text":""},{"location":"user-guide/examples.html#working-example","title":"Working example","text":"

We provide demonstrating the usage of the library, depending on the context.

"},{"location":"user-guide/examples.html#standalone-usage","title":"Standalone usage","text":"

The example demonstrates the usage of the library accessing a process engine via REST from an arbitrary SpringBoot application. The client executes the following steps:

"},{"location":"user-guide/examples.html#timing-overview-of-the-example","title":"Timing overview of the example","text":"Initial offset Repeat Invoked method 8.0 sec - Get deployed processes 10.0 sec 5 sec Start process 12.5 sec 5 sec Send signal 13.0 sec 5 sec Correlate message"},{"location":"user-guide/examples.html#how-does-it-work","title":"How does it work","text":"

The application uses the library by adding it to the classpath via Apache Maven dependency. That is:

<dependency>\n  <groupId>org.camunda.community.rest</groupId>\n  <artifactId>camunda-platform-7-rest-client-spring-boot-starter</artifactId>\n  <version>${project.version}</version>\n</dependency>\n

In order to activate the library, the @EnableCamundaRestClient has been put on the configuration class of the application. The interesting part is now the ProcessClient component. This Spring Component has several methods marked with @Scheduled annotation to demonstrate the time-based execution of desired functionality. To do so, the component has two injected resources, both marked with the @Qualifier(\"remote\") annotation. This annotation indicates that the remote version of the Camunda API services are used.

In order to configure the library, a block of properties e.g. in application.yml is required. The values specify the location of the remote process engine:

feign:\n  client:\n    config:\n      default:\n        url: \"http://localhost:8083/engine-rest/\"\n

To run this example, you will need the server part from the next example. To activate the server part only, please run from command line:

mvn clean install\nmvn -f examples/example -Prun\nmvn -f examples/example-provided -Prun-server-only\n
"},{"location":"user-guide/examples.html#usage-inside-a-process-application","title":"Usage inside a process application","text":"

The example demonstrates the usage of the library for accessing a process engine via REST from a Camunda Platform 7 process application. The key difference to the previous example is that the required Camunda classes are already present on the classpath and an engine is initialized and is running.

Imagine the process engine has the following process deployed:

The client (running technically in the same JVM, but accessing the engine via REST) again executes the following steps:

"},{"location":"user-guide/examples.html#timing-overview-of-the-example_1","title":"Timing overview of the example","text":"Initial offset Repeat Invoked method 8.0 sec - Get deployed processes 10.0 sec 5 sec Start process 12.5 sec 5 sec Send signal 13.0 sec 5 sec Correlate message"},{"location":"user-guide/examples.html#how-does-it-work_1","title":"How does it work","text":"

The application uses the library by adding it to the classpath via Apache Maven dependency. That is:

<dependency>\n  <groupId>org.camunda.community.rest</groupId>\n  <artifactId>camunda-platform-7-rest-client-spring-boot-starter-provided</artifactId>\n  <version>${project.version}</version>\n</dependency>\n

NOTE: Please note that we use a different starter. The suffix provided in the artifact name indicates that the engine is already a part of the application and doesn't need to be put on classpath.

In order to activate the library, the @EnableCamundaRestClient has been put on the configuration class of the application. The interesting part is now the ProcessClient component. This Spring Component has several methods marked with @Scheduled annotation to demonstrate the time-based execution of desired functionality. To do so, the component has two injected resources, both marked with the @Qualifier(\"remote\") annotation. This annotation indicates that the remote version of the Camunda API services are used.

In order to configure the library, a block of properties e.g. in application.yml is required:

feign:\n  client:\n    config:\n      default:\n        url: \"http://localhost:8083/engine-rest/\"\n
"},{"location":"user-guide/examples.html#usage-of-feign-clients","title":"Usage of feign clients","text":"

The example demonstrates the usage of the library for accessing the REST from a Camunda Platform 7 process application using the generated feign clients. The difference to the previous examples is that no Camunda dependency is required on the classpath, as the feign clients are used directly.

"},{"location":"user-guide/examples.html#how-does-it-work_2","title":"How does it work","text":"

The application uses the library by adding it to the classpath via Apache Maven dependency. That is:

<dependency>\n  <groupId>org.camunda.community.rest</groupId>\n  <artifactId>camunda-platform-7-rest-client-spring-boot-openapi</artifactId>\n  <version>${project.version}</version>\n</dependency>\n

In order to activate the library, the @EnableCamundaFeignClients has to be put on the configuration class of the application. The interesting part is now the ProcessClient component. This Spring Component has several methods marked with @Scheduled annotation to demonstrate the time-based execution of desired functionality. To do so, the component has injected the needed feign clients as resources.

In order to configure the library, the same block of properties e.g. in application.yml as before is required:

feign:\n  client:\n    config:\n      ...\n
"},{"location":"user-guide/logging.html","title":"Logging","text":"

OpenFeign library used in the camunda-platform-7-rest-client-spring-boot has a high-configurable logging facility. In order to configure it, a block of properties e.g. in application.yml is required:

logging:\n  level:\n    org.camunda.community.rest.client.RuntimeServiceClient: DEBUG\n    org.camunda.community.rest.client.RepositoryServiceClient: DEBUG\n    org.camunda.community.rest.client.ExternalTaskServiceClient: DEBUG\n

In order to enable Request/Response logging, you need to configure additional Feign logging by providing a factory bean:

import feign.Logger;\n\n@Configuration\npublic class MyConfiguration {\n    /**\n     * Full debug of feign client, including request/response\n     */\n    @Bean\n    public Logger.Level feignLoggerLevel() {\n        return Logger.Level.FULL;\n    }\n}\n
"},{"location":"user-guide/support-matrix.html","title":"Support Martix","text":"

Here are currently implemented methods. The version behind the service name denotes the last version in which the service has been touched.

"},{"location":"user-guide/support-matrix.html#task-service-006","title":"Task Service @ 0.0.6","text":"
  • # createTaskQuery
  • # claim
  • # deleteTask
  • # deleteTasks
  • # resolveTask
  • # complete
  • # saveTask
  • # setAssignee
  • # setPriority
  • # setVariable
  • # setVariables
  • # setVariableLocal
  • # setVariablesLocal
  • # getVariable
  • # getVariableLocal
  • # getVariableTyped
  • # getVariableLocal
  • # getVariableLocalTyped
  • # getVariables
  • # getVariablesLocal
  • # getVariablesTyped
  • # getVariablesLocalTyped
  • # removeVariable
  • # removeVariableLocal
  • # removeVariables
  • # removeVariablesLocal
  • # getIdentityLinksForTask
  • # addCandidateUser
  • # addCandidateGroup
  • # addUserIdentityLink
  • # addGroupIdentityLink
  • # deleteCandidateUser
  • # deleteCandidateGroup
  • # deleteUserIdentityLink
  • # deleteGroupIdentityLink
  • # handleBpmnError
  • # handleEscalation
"},{"location":"user-guide/support-matrix.html#runtime-service-007","title":"Runtime Service @ 0.0.7","text":"
  • # startProcessInstanceByKey
  • # startProcessInstanceById
  • # correlateMessage
  • # createMessageCorrelation
  • # createProcessInstanceQuery
  • # signal
  • # signalEventReceived
  • # createSignalEvent
  • # getVariable
  • # getVariables
  • # setVariable
  • # setVariables
  • # removeVariable
  • # removeVariables
  • # getVariableTyped
  • # getVariablesTyped
  • # setVariableTyped
  • # setVariablesTyped
  • # getVariableLocal
  • # getVariablesLocal
  • # setVariableLocal
  • # setVariablesLocal
  • # removeVariableLocal
  • # removeVariablesLocal
  • # getVariableTypedLocal
  • # getVariablesTypedLocal
  • # setVariableTypedLocal
  • # setVariablesTypedLocal
  • # createIncidentQuery
  • # createIncident
  • # resolveIncident
  • # setAnnotationForIncidentById
  • # clearAnnotationForIncidentById
  • # suspendProcessInstanceByProcessDefinitionKey
  • # activateProcessInstanceByProcessDefinitionKey
  • # suspendProcessInstanceByProcessDefinitionId
  • # activateProcessInstanceByProcessDefinitionId
  • # suspendProcessInstanceById
  • # activateProcessInstanceById
  • # updateProcessInstanceSuspensionState
  • # deleteProcessInstance
  • # deleteProcessInstanceIfExists
  • # deleteProcessInstances
  • # deleteProcessInstancesIfExists
  • # deleteProcessInstancesAsync
"},{"location":"user-guide/support-matrix.html#repositoryservice-007","title":"RepositoryService @ 0.0.7","text":"
  • # createProcessDefinitionQuery
  • # updateDecisionDefinitionHistoryTimeToLive
  • # updateProcessDefinitionHistoryTimeToLive
  • # createDeployment
  • # deleteDeployment
  • # deleteDeploymentCascade
  • # createDeploymentQuery
  • # deleteProcessDefinition
  • # updateProcessDefinitionSuspensionState
"},{"location":"user-guide/support-matrix.html#externaltaskservice-005","title":"ExternalTaskService @ 0.0.5","text":"
  • # complete
  • # handleBpmnError
  • # handleFailure
"},{"location":"user-guide/support-matrix.html#historyservice-007","title":"HistoryService @ 0.0.7","text":"
  • # createHistoricProcessInstanceQuery
"},{"location":"user-guide/support-matrix.html#decisionservice-7173","title":"DecisionService @ 7.17.3","text":"
  • # evaluateDecisionById
  • # evaluateDecisionByKey
  • # evaluateDecisionTableById
  • # evaluateDecisionTableByKey
  • # evaluateDecisionTableByKeyAndVersion
"},{"location":"user-guide/support-matrix.html#runtimeservice-7173","title":"RuntimeService @ 7.17.3","text":"
  • # createEventSubscriptionQuery
  • # createExecutionQuery
"},{"location":"user-guide/support-matrix.html#repositoryservice-7202","title":"RepositoryService @ 7.20.2","text":"
  • # getBpmnModelInstance
"},{"location":"user-guide/support-matrix.html#externaltaskservice-7202","title":"ExternalTaskService @ 7.20.2","text":"
  • # createExernalTaskQuery
  • # fetchAndLock
  • # extendLock
  • # unlock
  • # lock
  • # getTopicNames
  • # getExternalTaskErrorDetails
  • # setPriority
  • # setRetries
  • # setRetriesAsync
  • # updateRetries
"}]} \ No newline at end of file