fix(engine) historic process instance deleted flag and additional tests