A Zeebe worker to make HTTP calls (e.g. invoking a REST service). It is based on the built-in Java HttpClient.
Requirements: Java 11
Example BPMN with service task:
<bpmn:serviceTask id="http-get" name="stargazers check">
<bpmn:extensionElements>
<zeebe:taskDefinition type="http" />
<zeebe:taskHeaders>
<zeebe:header key="url" value="https://api.github.com/user/starred/zeebe-io/zeebe-http-worker" />
</zeebe:taskHeaders>
</bpmn:extensionElements>
</bpmn:serviceTask>
- the worker is registered for the type
http
- required custom headers/variable:
url
- the url to invoke
- optional custom headers:
method
- the HTTP method to use (default:GET
)
- optional variables:
body
- the request body as JSONauthorization
- the value of the authorization header (e.g.token 6bac4..
)
- jobs are completed with variables:
statusCode
- the response status codebody
- the response body, if present
-
Download the JAR file
-
Execute the JAR via
java -jar target/zeebe-http-worker-{VERSION}.jar
The connection can be changed by setting the environment variables:
zeebe.client.broker.contactPoint
(default:127.0.0.1:26500
).
Build with Maven:
mvn clean install
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].