flowable / flowable-engine

A compact and highly efficient workflow and Business Process Management (BPM) platform for developers, system admins and business users.
https://www.flowable.org
Apache License 2.0
7.59k stars 2.54k forks source link

Timer job never unlocked after an exception #3913

Open silentjesse126 opened 1 week ago

silentjesse126 commented 1 week ago

Describe the bug please refer to https://github.com/flowable/flowable-engine/issues/2354

Expected behavior I think there's still a possibility to have a lock, now UnlockTimerJobsCmd is run in the catch code block, but there is no chance to execute this code block when the app process is closed by exception.

Additional context Need a thread "ResetExpiredTimerJobsRunnable" run on an independent Thread just like ResetExpiredJobsRunnable, the lock happens in any exception will be unlocked.