package com.yanzhu.flowable.listener;

import com.yanzhu.common.redis.service.RedisService;
import lombok.extern.slf4j.Slf4j;
import org.flowable.common.engine.api.delegate.event.FlowableEngineEntityEvent;
import org.flowable.engine.RepositoryService;
import org.flowable.engine.RuntimeService;
import org.flowable.engine.TaskService;
import org.flowable.engine.delegate.event.AbstractFlowableEngineEventListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * Flowable全局监听器
 *
 * @author JiangYuQi
 */
@Slf4j
@Component
public class GlobalEventListener extends AbstractFlowableEngineEventListener {

    @Autowired
    private RedisService redisService;

    @Autowired
    private TaskService taskService;

    @Autowired
    private RuntimeService runtimeService;

    @Autowired
    private RepositoryService repositoryService;

    @Override
    protected void processCompleted(FlowableEngineEntityEvent event) {
        log.info("任务流程审批完成...{}",event.getProcessInstanceId());
        super.processCompleted(event);
    }

}


