Added support for callbacks on the tasks

Signed-off-by: Malte Sussdorff <malte.sussdorff@cognovis.com>