Also i have designed a sample workflow with only one service task that is implemented using external worker. Now in this worker i did not complete the task( did not use taskservice.complete() method), now this task is polled again and again and again, I did not understand is the task retries are not decrementing??
Q1: If an external worker fails to complete or renew its claim before the timeout, another worker can claim and complete the task.
Q2: The lock duration is specified when the worker claims the task. It must be larger than 0 and is measured in milliseconds.
Q3: Why are task retries not decreasing when a worker fails to complete a task in time?
A3: If a BPMN Error or Java Error is not returned to the server, then it’s not considered to be retried. It was simply claimed by a different worker that was more available.
Q1 )So if i have to run a long external task say which will take 1hr -2hr ,what needs to be done.
a) did external worker which is working on long task has to reclaim it after every x seconds, or
B) is there a way I can just specify the lock time when i am fetching the task,
c) or is there a way where i can specify the timeout for a particular task, like for this long task i would want to set timeout to be 2 hr.
Q2) If a worker that is doing long polling , how long it can do long polling, what is time out of long polling, how to set this timeout.
Q3 And if timeout occur in longpolling what happen does worker goes down, or it makes another request.
If you how to do these things in javascript would be more helpfull.
For Q1 that you answered “What happen when an external worker goes down after taking a job, what is the time until that work is again taken by new worker.”
I also want to ask that if there is only one worker which is failing again and again unhadling the failure ,then this worker will fetch the task and does not complete it ,then again fetch it after some time again does not complete it, and so on this work is fetched unlimited times and not completed.
If the task is not completed during this time, the engine assumes that the worker died and the task can be fetched by a worker again. (Could be the same worker, or a different instance working on the same topic).
asyncResponseTimeout is the configuration for long polling. If the timeout is reached without a new task created during the time, an empty list is returned to the worker and the next fetch request is sent.