This project provides a Spring Boot Starter that allows you to implement an External Task Worker for Camunda. It uses the Camunda REST API to fetch, lock, and complete External Service Tasks. It is based on the Java External Task Client.
You need this dependency to get started:
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-external-task-client</artifactId>
<version>...</version>
</dependency>
You can configure the Camunda Platform Runtime REST API endpoint and other properties in the application.yml
file:
camunda.bpm.client:
base-url: http://localhost:8080/engine-rest
subscriptions:
creditScoreChecker:
process-definition-key: loan_process
include-extension-properties: true
variable-names: defaultScore
@Configuration
@ExternalTaskSubscription("creditScoreChecker")
public class CreditScoreCheckerHandler implements ExternalTaskHandler {
@Override
public void execute(ExternalTask externalTask,
ExternalTaskService externalTaskService) {
// add your business logic here
}
}
You can also use the basic Spring integration without the Spring Boot Starter:
<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-external-task-client-spring</artifactId>
<version>...</version>
</dependency>
To enable the External Task Subscriptions and bootstrap the Client, add the EnableExternalTaskClient
annotation and configure the REST API endpoint and other configuration options.
@Configuration
@EnableExternalTaskClient(baseUrl = "http://localhost:8080/engine-rest")
public class SimpleConfiguration {
}
The Camunda External Task Client Spring Boot Starter project used to be a community extension initially created by Oliver Steinhauer.