This project provides a Quarkus Extension that allows you to implement an External Task Worker for Camunda. It is based on the official java-client provided by Camunda BPM.
- Automatic topic subscription for all implementations of
ExternalTaskHanlder
annotated with@ExternalTaskSubscription
- Provision of a configurable
ExternalTaskClient
bean
- To use the external task client Quarkus extension, the following dependency has to be added to your pom.xml.
<dependency>
<groupId>de.viadee</groupId>
<artifactId>quarkus-camunda-external-task-client</artifactId>
<version>0.0.1</version>
</dependency>
- Configure the
ExternalTaskClient
bean which handles the overhead of external task subscriptions by extending yourapplication.properties
:
de.viadee.camunda.client.base-url=http://localhost:8080/engine-rest
de.viadee.camunda.client.worker-id=my-worker
For a full list of properties check out the ClientConfiguration
class.
- Annotate your
ExternalTaskHandler
implementations withExternalTaskSubscription
to have them be automatically subscribed with the engine.
@ApplicationScoped
@ExternalTaskSubscription(topicName = "LogOnConsole")
public class LogOnConsoleHandler implements ExternalTaskHandler {
private static final Logger LOG = Logger.getLogger(LogOnConsoleHandler.class.getName());
@Override
public void execute(ExternalTask externalTask, ExternalTaskService externalTaskService) {
LOG.info("This is an ExternalTaskHandler build with Quarkus");
externalTaskService.complete(externalTask);
}
}
This tool was build by viadee Unternehmensberatung AG. If you are interested to find out what else we are doing, check out our website viadee.de. If you have any feedback, ideas or extensions feel free to contact or create a GitHub issue.