DEPL-5367 changed state checks for new TaskExecutionState

Please merge after deployit 3.10.0 has been released. It depends on the new API.

Todo: copy new binary dependencies of the 3.10.0 release to the REPO folder.