diff --git a/workflow-engine-core/src/main/java/cn/axzo/workflow/core/service/support/forecast/AbstractForecast.java b/workflow-engine-core/src/main/java/cn/axzo/workflow/core/service/support/forecast/AbstractForecast.java index 96e9af494..9392a1898 100644 --- a/workflow-engine-core/src/main/java/cn/axzo/workflow/core/service/support/forecast/AbstractForecast.java +++ b/workflow-engine-core/src/main/java/cn/axzo/workflow/core/service/support/forecast/AbstractForecast.java @@ -4,6 +4,8 @@ import cn.axzo.workflow.core.service.support.forecast.impl.SequenceFlowForecasti import cn.axzo.workflow.core.service.support.spring.FlowableConditionEvaluatorAware; import org.flowable.bpmn.model.FlowElement; import org.flowable.engine.runtime.ProcessInstance; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.util.CollectionUtils; import java.util.ArrayList; @@ -24,6 +26,7 @@ import static cn.axzo.workflow.core.service.support.FlowNodeForecastService.FORE public abstract class AbstractForecast implements Forecast, FlowableConditionEvaluatorAware { private FlowableConditionEvaluator conditionEvaluator; + private static final Logger log = LoggerFactory.getLogger(AbstractForecast.class); @Override public final List nextFlowElement(FlowElement sourceFlowElement, ProcessInstance instance) { @@ -85,6 +88,11 @@ public abstract class AbstractForecast implements Forecas * @see SequenceFlowForecasting#calcRealOutgoingNodes(List, ProcessInstance) 参考这里的用法 */ protected final Boolean conditionOn(String exp, String processInstanceId) { - return conditionEvaluator.conditionOn(exp, processInstanceId); + try { + return conditionEvaluator.conditionOn(exp, processInstanceId); + } catch (Exception e) { + log.warn("条件评估发生异常: {}", e.getMessage()); + return false; + } } }