Process Instance status wrong showing not completed when its all tasks completed

Dear expert,
I encountered a weird issue when I use the activiti-engine with 5.21.0. in my project.
I found the one process instance status was not completed, but all related tasks were completed.
Then, I look into the log. It is supposed that the endEvent is executed at the end of the sequence, but it seemed endEvent had been executed before as opposed to the flow itself.
I attached the screenshot.

Is there anyone who knows this issue can help me out?

Thank you

Regards,
Mike