Skip to content

Commit 46a84c3

Browse files
jbarrezfiliphr
authored andcommitted
Enhance docs
1 parent c08b0a7 commit 46a84c3

File tree

1 file changed

+34
-15
lines changed

1 file changed

+34
-15
lines changed

README.md

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
# Flowable External Worker Library for Java
22

3-
To use Flowable together with a Java application external workers can be used.
4-
This project allows to connect a Java library to Flowable.
5-
To connect to a Flowable installation it is required [to authenticate](#authentication).
6-
With the client it is possible to specify a callback method which is called for every job executed.
3+
An _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.
4+
When the process or case engine arrives at such a task, it will create an **external job**, which is exposed over the REST API.
5+
Through 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.
76

8-
## Authentication
9-
10-
There are 2 ways that the application can be authenticated with a Flowable installation.
11-
12-
* Using HTTP Basic authentication with a provided username and password
13-
* Using HTTP Bearer authentication with a provided access token
7+
This 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.
148

159
## Spring Boot Sample
1610

@@ -75,22 +69,47 @@ public class ExampleWorker {
7569
```
7670

7771

78-
### Local
72+
### Connection properties
7973

80-
The following properties are example how you can connect to a Flowable instance running at `http://host.docker.internal:8090`
74+
The following properties show how you can connect to a Flowable instance running at `http://host.docker.internal:8090` using basic authentication:
8175

8276
```properties
8377
flowable.external.worker.rest.base-url=http://host.docker.internal:8090
8478
flowable.external.worker.rest.authentication.basic.username=admin
8579
flowable.external.worker.rest.authentication.basic.password=test
8680
```
8781

88-
### Cloud
82+
The context path can also be changed, if necessary:
83+
84+
```properties
85+
flowable.external.worker.rest.context-path=/external-job-api
86+
```
87+
88+
## Authentication
8989

90-
The usage with Flowable Cloud is simpler, since everything is pre-configured.
91-
However, it's required to either use the user credentials or to pre-configure a personal access token.
90+
There are two ways that the application can be authenticated with a Flowable installation:
91+
92+
* Using HTTP Basic authentication with a provided username and password, as shown in the example above.
93+
* 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.
94+
95+
### Flowable Cloud
96+
97+
Connecting an external worker to the Flowable Cloud is simpler, since everything is pre-configured.
98+
It's required to either use the user credentials or to pre-configure a personal access token, for example:
9299

93100

94101
```properties
95102
flowable.external.worker.rest.authentication.bearer.token=<personal-access-token>
96103
```
104+
105+
### Advanced Properties
106+
107+
The following properties are for advanced usage. Only change these if you understand the consequences and the concept of the external worker properly.
108+
109+
* `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.
110+
* `flowable.external.worker.concurrency` : The amount of threads available to poll and execute external worker jobs. By default `1`.
111+
* `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.
112+
* `flowable.external.worker.number-of-retries` : The number of times to retry acquiring new jobs on the Floable server-side before giving up. By default 5.
113+
* `flowable.external.worker.number-of-tasks` : The amount of external worker tasks to acquire and lock in one go. The default is `1`.
114+
* `flowable.external.worker.polling-interval` : The amount of time between polling for new external worker jobs. By default 5 seconds.
115+

0 commit comments

Comments
 (0)