{"id":41723990,"url":"https://github.com/flowable/flowable-external-client-java","last_synced_at":"2026-01-24T22:58:19.918Z","repository":{"id":204694929,"uuid":"712421455","full_name":"flowable/flowable-external-client-java","owner":"flowable","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-04T08:23:11.000Z","size":154,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-07-04T09:33:33.912Z","etag":null,"topics":["bpmn","cmmn","flowable","java","workflow","workflow-engine"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flowable.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-10-31T12:47:16.000Z","updated_at":"2025-07-04T08:23:15.000Z","dependencies_parsed_at":"2023-12-20T17:52:07.171Z","dependency_job_id":null,"html_url":"https://github.com/flowable/flowable-external-client-java","commit_stats":null,"previous_names":["flowable/flowable-external-client-java"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/flowable/flowable-external-client-java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowable%2Fflowable-external-client-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowable%2Fflowable-external-client-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowable%2Fflowable-external-client-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowable%2Fflowable-external-client-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flowable","download_url":"https://codeload.github.com/flowable/flowable-external-client-java/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowable%2Fflowable-external-client-java/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28738979,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T22:12:27.248Z","status":"ssl_error","status_checked_at":"2026-01-24T22:12:10.529Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bpmn","cmmn","flowable","java","workflow","workflow-engine"],"created_at":"2026-01-24T22:58:18.963Z","updated_at":"2026-01-24T22:58:19.887Z","avatar_url":"https://github.com/flowable.png","language":null,"readme":"# Flowable External Worker Library for Java\n\n[![Java](https://img.shields.io/maven-central/v/org.flowable.client/flowable-external-worker-client-java.svg?label=Java)](https://central.sonatype.com/search?namespace=org.flowable.client)\n[![Spring](https://img.shields.io/maven-central/v/org.flowable.client/flowable-external-worker-client-java.svg?label=Spring)](https://central.sonatype.com/search?namespace=org.flowable.client.spring)\n[![license](https://img.shields.io/hexpm/l/plug.svg)](https://github.com/flowable/flowable-engine/blob/main/LICENSE)\n\n![Flowable Actions CI](https://github.com/flowable/flowable-external-client-java/actions/workflows/main.yml/badge.svg?branch=main)\n\nAn _External Worker Task_ in BPMN or CMMN is a task where the custom logic of that task is executed externally to Flowable, i.e. on another server.\nWhen the process or case engine arrives at such a task, it will create an **external job**, which is exposed over the REST API.\nThrough this REST API, the job can be acquired and locked. Once locked, the custom logic is responsible for signalling over REST that the work is done and the process or case can continue.\n\nThis project makes implementing such custom logic in Java easy by not having the worry about the low-level details of the REST API and focus on the actual custom business logic. Integrations for other languages are available, too.\n\n## Spring Boot Sample\n\nThe following dependency needs to be added to start using Flowable workers.\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.flowable.client.spring\u003c/groupId\u003e\n    \u003cartifactId\u003eflowable-external-worker-spring-boot-starter\u003c/artifactId\u003e\n    \u003cversion\u003e${flowable-worker-client.version}\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nThe following is an example Flowable Worker that is retrieving jobs from the `myTopic` topic\n\n```java\nimport org.springframework.stereotype.Component;\n\nimport org.flowable.external.client.AcquiredExternalWorkerJob;\nimport org.flowable.external.worker.annotation.FlowableWorker;\n\n@Component\npublic class ExampleWorker {\n\n    @FlowableWorker(topic = \"myTopic\")\n    public void processJob(AcquiredExternalWorkerJob job) {\n        System.out.println(\"Executed job: \" + job.getId());\n    }\n\n}\n```\n\nUsing the example above the job will be completed if the method completes successfully, and it will fail if the method throws an exception.\n\nIn order to pass additional data for a failure or a completion the following example can be used:\n\n```java\nimport org.springframework.stereotype.Component;\n\nimport org.flowable.external.client.AcquiredExternalWorkerJob;\nimport org.flowable.external.worker.annotation.FlowableWorker;\nimport org.flowable.external.worker.WorkerResult;\nimport org.flowable.external.worker.WorkerResultBuilder;\n\n@Component\npublic class ExampleWorker {\n\n    @FlowableWorker(topic = \"myTopic\")\n    public WorkerResult processJob(AcquiredExternalWorkerJob job, WorkerResultBuilder resultBuilder) {\n        System.out.println(\"Executed job: \" + job.getId());\n        Object errorMessage = job.getVariables().get(\"errorMessage\");\n        if (errorMessage != null) {\n            return resultBuilder.failure()\n                    .message(errorMessage.toString())\n                    .details(\"Error message details\");\n        }\n        \n        return resultBuilder.success()\n                .variable(\"message\", \"Job has been executed\");\n    }\n}\n```\n\n\n### Connection properties\n\nThe following properties show how you can connect to a Flowable instance running at `http://host.docker.internal:8090` using basic authentication:\n\n```properties\nflowable.external.worker.rest.base-url=http://host.docker.internal:8090\nflowable.external.worker.rest.authentication.basic.username=admin\nflowable.external.worker.rest.authentication.basic.password=test\n```\n\nThe context path can also be changed, if necessary:\n\n```properties\nflowable.external.worker.rest.context-path=/external-job-api\n```\n\n## Authentication\n\nThere are two ways that the application can be authenticated with a Flowable installation:\n\n* Using HTTP Basic authentication with a provided username and password, as shown in the example above.\n* Using HTTP Bearer authentication with a provided access token. In that case the `.basic` properties are replaced by the `flowable.external.worker.rest.authentication.bearer.token=myTokenValue` property.\n\n### Flowable Trial\n\nConnecting an external worker to the Flowable Trial is simpler, since everything is pre-configured.\nIt's required to either use the user credentials or to pre-configure a personal access token, for example:\n\n\n```properties\nflowable.external.worker.rest.authentication.bearer.token=\u003cpersonal-access-token\u003e\n```\n\n### Advanced Properties\n\nThe following properties are for advanced usage. Only change these if you understand the consequences and the concept of the external worker properly.\n\n* `flowable.external.worker.workerId` : gives the external worker a custom identifier, which is used to identify which external worker has locked an external worker job.\n* `flowable.external.worker.concurrency` : The amount of threads available to poll and execute external worker jobs. By default `1`.\n* `flowable.external.worker.lock-duration` : The amount of time an external job will be locked when acquired. If this time limit is reached, other external workers will be able to acquire the same job. By default 5 minutes.\n* `flowable.external.worker.number-of-retries` : The number of times to retry acquiring new jobs on the Flowable server-side before giving up. By default, 5.\n* `flowable.external.worker.number-of-tasks` : The amount of external worker tasks to acquire and lock in one go. The default is `1`.\n* `flowable.external.worker.polling-interval` : The amount of time between polling for new external worker jobs. By default, 30 seconds.\n\n\n## Plain Java\n\nThe following dependency needs to be added to start in a plain Java project without Spring Boot:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.flowable.client\u003c/groupId\u003e\n    \u003cartifactId\u003eflowable-external-worker-client-java\u003c/artifactId\u003e\n    \u003cversion\u003e${flowable-worker-client.version}\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nThe following is an example Flowable Worker that is retrieving jobs from the `myTopic` topic\n\n```java\nExternalWorkerClient externalWorkerClient = RestExternalWorkerClient.create(\n        \"my-worker\",\n        JavaHttpClientRestInvoker.withBasicAuth(\"http://localhost:8090/external-job-api\", \"admin\", \"test\"),\n        new ObjectMapper()\n);\nList\u003cAcquiredExternalWorkerJob\u003e jobs = externalWorkerClient.createJobAcquireBuilder()\n        .topic(\"myTopic\")\n        .lockDuration(Duration.ofMinutes(1L))\n        .acquireAndLock();\n\nfor (AcquiredExternalWorkerJob job : jobs) {\n    System.out.println(\"Executed job: \" + job.getId());\n    externalWorkerClient.createCompletionBuilder(job)\n            .complete();\n}\n```\n\n### Authentication\n\nThere are two ways that the application can be authenticated with a Flowable installation:\n\n* Using HTTP Basic authentication with a provided username and password, as shown in the example above.\n* Using HTTP Bearer authentication with a provided access token. In this case the `RestInvoker` can be created like this: `JavaHttpClientRestInvoker.withAccessToken(\"http://localhost:8090/external-job-api\", \"\u003cyour-access-token\u003e\")`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowable%2Fflowable-external-client-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflowable%2Fflowable-external-client-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowable%2Fflowable-external-client-java/lists"}