mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-11-26 10:39:23 +08:00
update 增加流程定义发布检查,确保流程在执行前已发布
This commit is contained in:
@@ -137,6 +137,9 @@ public class FlwTaskServiceImpl implements IFlwTaskService {
|
|||||||
|
|
||||||
// 将流程定义内的扩展参数设置到变量中
|
// 将流程定义内的扩展参数设置到变量中
|
||||||
Definition definition = FlowEngine.defService().getPublishByFlowCode(startProcessBo.getFlowCode());
|
Definition definition = FlowEngine.defService().getPublishByFlowCode(startProcessBo.getFlowCode());
|
||||||
|
if (ObjectUtil.isNull(definition)) {
|
||||||
|
throw new ServiceException("流程【" + startProcessBo.getFlowCode() + "】未发布,请先在流程设计器中发布流程定义");
|
||||||
|
}
|
||||||
Dict dict = JsonUtils.parseMap(definition.getExt());
|
Dict dict = JsonUtils.parseMap(definition.getExt());
|
||||||
boolean autoPass = !ObjectUtil.isNull(dict) && dict.getBool(FlowConstant.AUTO_PASS);
|
boolean autoPass = !ObjectUtil.isNull(dict) && dict.getBool(FlowConstant.AUTO_PASS);
|
||||||
variables.put(FlowConstant.AUTO_PASS, autoPass);
|
variables.put(FlowConstant.AUTO_PASS, autoPass);
|
||||||
|
|||||||
Reference in New Issue
Block a user