Add task state verification

Change-Id: I85abee2a1112ce1b9bb708cb9129f06c794f83b1
Merge "Add task state verification"