I spent two days try complete a task and update process state, and the solution I've found was register listener to the task client. Suppose you are using a TaskClient c. If you use c to complete the task, you must configure c like are configure in CommandBasedWSHumanTaskHandler.connect().
Juan