1
votes

An external service can receive a message from Camunda process engine using below piece of code. Does client polling Camunda process engine periodically to get messages ?

ExternalTaskClient client = ExternalTaskClient.create().baseUrl(“http://localhost:8080/engine-rest”)
.asyncResponseTimeout(10000)
.build();
client.subscribe(“AdlDMNOtherClient”).lockDuration(1000)…
2

2 Answers

2
votes

It uses "long polling", so it does not open new requests but tries to keep a single connection as long as possible, see https://github.com/camunda/camunda-external-task-client-java/blob/master/examples/order-handling/src/main/java/org/camunda/bpm/App.java

So if your question is: "will my code get notified automatically when a new task is created", the answer is YES.
If your question is: Will I have many HTTP request, the answer is NO, normally not.

0
votes

Yes. The architecture, interaction patter (incl. long polling) and ways to communicate errors or results back to the process engine are described with a few diagrams here:

https://docs.camunda.org/manual/latest/user-guide/process-engine/external-tasks/

and here:

https://docs.camunda.org/manual/latest/user-guide/ext-client/