提交 7ea4cb76 编写于 作者: tangyaolong's avatar tangyaolong

超时监听器

上级 e78ace6d
package cn.ibizlab.core.workflow.extensions.listener;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import lombok.extern.slf4j.Slf4j;
import org.flowable.engine.delegate.DelegateExecution;
import org.flowable.engine.delegate.ExecutionListener;
import org.flowable.engine.impl.persistence.entity.CommentEntity;
import org.flowable.engine.impl.persistence.entity.CommentEntityImpl;
import java.util.Date;
@Slf4j
public class ProcessDueTimeListener implements ExecutionListener {
@Override
public void notify(DelegateExecution execution) {
CommentEntity comment = new CommentEntityImpl();
comment.setId(IdWorker.getIdStr());
comment.setProcessInstanceId(execution.getProcessInstanceId());
comment.setAction(execution.getCurrentFlowElement().getName()+"超时自动跳过");
comment.setTime(new Date());
log.debug(comment.toString());
}
}
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册