Support cancelling an activity

Signed-off-by: Kaustav Das Modak <kaustav.dasmodak@yahoo.co.in>