提交 35af5f53 编写于 作者: B bernd.ruecker

added parsing error instead of NPE with unconfigured timer

上级 7763c8ee
...@@ -2202,18 +2202,20 @@ public class BpmnParse extends Parse { ...@@ -2202,18 +2202,20 @@ public class BpmnParse extends Parse {
// TimeDate // TimeDate
TimerDeclarationType type = TimerDeclarationType.DATE; TimerDeclarationType type = TimerDeclarationType.DATE;
Expression expression = parseExpression(timerEventDefinition, "timeDate"); Expression expression = parseExpression(timerEventDefinition, "timeDate");
// TimeCycle // TimeCycle
if (expression == null) { if (expression == null) {
type = TimerDeclarationType.CYCLE; type = TimerDeclarationType.CYCLE;
expression = parseExpression(timerEventDefinition, "timeCycle"); expression = parseExpression(timerEventDefinition, "timeCycle");
} }
// TimeDuration // TimeDuration
if (expression == null) { if (expression == null) {
type = TimerDeclarationType.DURATION; type = TimerDeclarationType.DURATION;
expression = parseExpression(timerEventDefinition, "timeDuration"); expression = parseExpression(timerEventDefinition, "timeDuration");
} }
// neither date, cycle or duration configured!
if (expression==null) {
addError("Timer needs configuration (either timeDate, timeCycle or timeDuration is needed).", timerEventDefinition);
}
// Parse the timer declaration // Parse the timer declaration
// TODO move the timer declaration into the bpmn activity or next to the // TODO move the timer declaration into the bpmn activity or next to the
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册