package com.ruoyi.project.listener;

import com.alibaba.fastjson.JSON;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.ExecutionListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.Map;

@Service("endSucessListener")
public class EndSucessListener implements Serializable, ExecutionListener {
    protected Logger logger = LoggerFactory.getLogger(getClass());

    private static final long serialVersionUID = -3759054058055401826L;

    @Override
    public void notify(DelegateExecution delegateExecution) {
        String id = delegateExecution.getProcessInstanceBusinessKey();

        Map variableInstances = delegateExecution.getVariableInstances();
        logger.debug("参数--------------------------------" + JSON.toJSONString(variableInstances));
        logger.debug("审批id--------------------------------" + id);

    }
}
