提交 a190a23f 编写于 作者: J Joram Barrez

Fix for ACT-1690: "NPE when converting to BPMN a model with boundary event...

Fix for ACT-1690: "NPE when converting to BPMN a model with boundary event that is not attached to a task"
上级 9679cd3b
......@@ -410,8 +410,13 @@ public class BpmnJsonConverter implements EditorJsonConstants, StencilConstants,
if (flowElement instanceof BoundaryEvent) {
BoundaryEvent boundaryEvent = (BoundaryEvent) flowElement;
Activity activity = retrieveAttachedRefObject(boundaryEvent.getAttachedToRefId(), process.getFlowElements());
boundaryEvent.setAttachedToRef(activity);
activity.getBoundaryEvents().add(boundaryEvent);
if (activity == null) {
LOGGER.warn("Boundary event " + boundaryEvent.getId() + " is not attached to any activity");
} else {
boundaryEvent.setAttachedToRef(activity);
activity.getBoundaryEvents().add(boundaryEvent);
}
} else if (flowElement instanceof SubProcess) {
SubProcess subProcess = (SubProcess) flowElement;
postProcessElements(process, subProcess.getFlowElements(), flowSourceMap, flowTargetMap);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册