package com.srs.flowable.listener.disciplinary;

import lombok.extern.slf4j.Slf4j;
import org.flowable.engine.delegate.DelegateExecution;
import org.flowable.engine.delegate.ExecutionListener;
import org.springframework.stereotype.Component;

/**
 * 设置处分学生审批参数
 */
@Component
@Slf4j
public class StuInfoListener implements ExecutionListener {

    @Override
    public void notify(DelegateExecution delegateExecution) {
        Long stuId = (Long)delegateExecution.getVariable("stuId");

        log.info("学生信息：{}",stuId);
        delegateExecution.setVariable("approval",stuId);
        // todo 企业微信推送消息

    }
}
