Hi Jack,
I think that the problem is related with the fact that the thread that start the process with ksession.startProcess("com.sample.humantask");
Died and it's not up when you complete the task. So the listener that you register died with it. You need to make sure that the listener is still active in order to be called on taskCompletion.
Cheers