I have the following setup:
- Camunda 7.10 on apache server
- Process definition with about 20 external tasks
- ~ 20 external workers on a separate machine. External worker is built using guide from official site. Long polling timeout - 10000, lock duration - 10000.
Running process usually results in 2 errors on external worker side.
Error when trying to complete task using API
externalTaskService.complete(externalTask, vars);
[TopicSubscriptionManager] ERROR com.netcracker.solutions.om.extworker.ExternalWorkerStub - #5: complete FAILED
org.camunda.bpm.client.exception.NotResumedException: TASK/CLIENT-01009 Exception while completing the external task: The corresponding process instance could not be resumed
at org.camunda.bpm.client.impl.ExternalTaskClientLogger.externalTaskServiceException(ExternalTaskClientLogger.java:117)
at org.camunda.bpm.client.task.impl.ExternalTaskServiceImpl.complete(ExternalTaskServiceImpl.java:60)
at org.camunda.bpm.client.task.impl.ExternalTaskServiceImpl.complete(ExternalTaskServiceImpl.java:52)
at com.netcracker.solutions.om.extworker.ExternalWorkerStub$StubClient.lambda$run$0(ExternalWorkerStub.java:69)
at org.camunda.bpm.client.topic.impl.TopicSubscriptionManager.handleExternalTask(TopicSubscriptionManager.java:143)
at org.camunda.bpm.client.topic.impl.TopicSubscriptionManager.lambda$acquire$0(TopicSubscriptionManager.java:102)
at java.util.Arrays$ArrayList.forEach(Arrays.java:3880)
at org.camunda.bpm.client.topic.impl.TopicSubscriptionManager.acquire(TopicSubscriptionManager.java:97)
at org.camunda.bpm.client.topic.impl.TopicSubscriptionManager.run(TopicSubscriptionManager.java:81)
at java.lang.Thread.run(Thread.java:748)
This task is fetched second time by another worker again and completed normally.
Also I’ve added try-catch clause, and in case of error try to complete task once again in the same transaction - this works.
It would be preferrable to avoid such exceptions and understand why do they occur, due to some misconfiguration, bug or smth else.
Could you please advise?
Thanks