package com.xtd.project.activiti.event.listener;

import org.activiti.engine.HistoryService;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.ExecutionListener;
import org.activiti.engine.history.HistoricProcessInstance;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class ProcessEventListener implements ExecutionListener {

    @Autowired
    private HistoryService historyService;
    @Override
    public void notify(DelegateExecution delegateExecution) {
        String eventName = delegateExecution.getEventName();
        String processInstanceId = delegateExecution.getProcessInstanceId();
        System.out.print("测试 : "+eventName);
    }
}
