Add getReward implementation in task.