handle task completion via callback

[#83638698]

Signed-off-by: Atul Kshirsagar <atul.kshirsagar@gmail.com>