simplify the onDone behaviour
do not set the job to done too early
updated to use dsm library method
codebase used to migrate to java8 the production system