What if the server has to restart and the engine was waiting for a timer to complete
Closed this issue · 1 comments
BaluprasathSBP commented
bpmn-engine is synchronous in nature. For an instance, Engine is executing the intermediate timer workflow. It has to wait for 2 days to start the next activity. Assume the state is saved when the workflow reaches timer. What if the server is down now and restarted, we would have lost the engine now but we have state saved in database. How does the timer works now? will it start from again 0? How will it continue?
paed01 commented
The timer event has a started at state that will be compared with Date.now()
when it resumes. Hence, when the workflow is resumed and the timer has expired the timer event will complete immediately.