class CompleteActivity implements AfterCompleteTaskListener {
    @Override
    public int sort() {
        return 0;
    }

    @Autowired
    private TaskService taskService;
    @Autowired
    private ProcessActivityService processActivityService;

    @Override
    public void execute(OaTask task) {<FILL_FUNCTION_BODY>}
}

        //尝试激活下一个任务，如果激活成功则不继续执行
        boolean a = taskService.activeTaskByActivityId(task.getActivityId());
        if(a) {
            return;
        }
        processActivityService.complete(task.getActivityId());
    
<no_super_class>