MasterExecThread类
runProcess方法
if(!sendTimeWarning && checkProcessTimeOut(processInstance) ){
alertManager.sendProcessTimeoutAlert(processInstance,processService.findProcessDefineById(processInstance.getProcessDefinitionId()));
sendTimeWarning = true;
}
判断当前时间和起始时间是否大于设置的超时时间
private boolean checkProcessTimeOut(ProcessInstance processInstance) {
if(processInstance.getTimeout() == 0 ){
return false;
}
Date now = new Date();
//按照单位为M的
// long runningTime = DateUtils.diffMin(now, processInstance.getStartTime());
long runningTime = DateUtils.diffSec(now, processInstance.getStartTime());
return runningTime > processInstance.getTimeout();
}
涉及到的表和字段
t_ds_process_definition 中的 timeout
总结
告警只是告诉你这东西超时了有问题了,给你一个邮件告诉你一声,系统的任务该有问题还是有问题并不会停止