package ink.wgink.module.activiti.listener.task;

import ink.wgink.module.activiti.handler.IOaUserTaskDeleteHandler;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.DelegateTask;
import org.activiti.engine.delegate.JavaDelegate;
import org.activiti.engine.delegate.TaskListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @ClassName: OaUserTaskDeleteListener
 * @Description: OA用户任务节点删除监听器
 * @Author: wanggeng
 * @Date: 2022/3/28 10:31
 * @Version: 1.0
 */
@Component
public class OaUserTaskDeleteListener implements TaskListener, JavaDelegate {

    @Autowired(required = false)
    private IOaUserTaskDeleteHandler oaUserTaskDeleteHandler;

    @Override
    public void notify(DelegateTask delegateTask) {
        if (oaUserTaskDeleteHandler != null) {
            oaUserTaskDeleteHandler.handle(delegateTask);
        }
    }

    @Override
    public void execute(DelegateExecution execution) {

    }
}
