AnsweredAssumed Answered

BUG: Async executor behaviour on long duration tasks

Question asked by mteira on May 30, 2019

Hello,

I'm experimenting a behaviour with Activiti 6 that I believe it should be a bug. This is the use case:

 

  • Scenario:
    • ProcessEngineConfiguration with sane defaults and async executor activated.
    • Simple process with (start)->(java service task)->(end)
    • The java service task is marked as asynchronous and just sleeps for 6 minutes (or any time exceeding the async executor job lock time in milliseconds)

 

  • Expected result:
    • After about 6 minutes the process is finished.

 

  • Current behaviour:
    • The process never ends and the async task is restarted over indefinitely by the async executor, somehow "forgetting" about the current execution.

 

This is in my opinion a critical bug, since we don't know in advance how much time a given service task can take to execute. It is even worse because it's not the async node what is actually repeated, but the complete set of operations belonging to the whole "async continuation", as if it was completely forgot when the execution takes much time than the async executor job lock time.

Increasing this job lock time is not an option, because it severely impacts some other issue with continuations not being executed immediately, what is already described as the infamous 5 minutes wait problem: java - Activiti 6 sometime waits 5 minutes before starting async process instance - Stack Overflow 

 

Please provide feedback, thoughts, fixes...

 

Best regards,

Manuel

Outcomes