diff --git a/plugins/org.obeonetwork.dsl.bpmn2.design/src/org/obeonetwork/bpmn2/design/ServiceHelper.java b/plugins/org.obeonetwork.dsl.bpmn2.design/src/org/obeonetwork/bpmn2/design/ServiceHelper.java index 8c82f098..37db351f 100644 --- a/plugins/org.obeonetwork.dsl.bpmn2.design/src/org/obeonetwork/bpmn2/design/ServiceHelper.java +++ b/plugins/org.obeonetwork.dsl.bpmn2.design/src/org/obeonetwork/bpmn2/design/ServiceHelper.java @@ -198,23 +198,31 @@ public List getFlowNodeElements(EObject container, String className) { public List getDataInputs(EObject container) { List result = List.of(); if (container instanceof Lane && ((Lane) container).getPartitionElement() instanceof InputOutputSpecification) { - InputOutputSpecification ioSepc = (InputOutputSpecification) ((Lane) container).getPartitionElement(); - result = ioSepc.getDataInputs(); + InputOutputSpecification ioSpec = (InputOutputSpecification) ((Lane) container).getPartitionElement(); + if (ioSpec != null) { + result = ioSpec.getDataInputs(); + } } else if (container instanceof SubProcess) { - InputOutputSpecification ioSepc = ((SubProcess) container).getIoSpecification(); - result = ioSepc.getDataInputs(); + InputOutputSpecification ioSpec = ((SubProcess) container).getIoSpecification(); + if (ioSpec != null) { + result = ioSpec.getDataInputs(); + } } return result; } - + public List getDataOutputs(EObject container) { List result = List.of(); if (container instanceof Lane && ((Lane) container).getPartitionElement() instanceof InputOutputSpecification) { - InputOutputSpecification ioSepc = (InputOutputSpecification) ((Lane) container).getPartitionElement(); - result = ioSepc.getDataOutputs(); + InputOutputSpecification ioSpec = (InputOutputSpecification) ((Lane) container).getPartitionElement(); + if (ioSpec != null) { + result = ioSpec.getDataOutputs(); + } } else if (container instanceof SubProcess) { - InputOutputSpecification ioSepc = ((SubProcess) container).getIoSpecification(); - result = ioSepc.getDataOutputs(); + InputOutputSpecification ioSpec = ((SubProcess) container).getIoSpecification(); + if (ioSpec != null) { + result = ioSpec.getDataOutputs(); + } } return result; }