Source:
public void execute() { connectionDeletedInfosMap = new HashMap<Connection, ConnectionDeleteCommand.ConnectionDeletedInfo>(); Process process = (Process) connectionList.get(0).getSource().getProcess(); for (Connection connection : connectionList) { boolean re = deleteExpendNode(connection); if (re) { return; } ConnectionDeletedInfo deletedInfo = new ConnectionDeletedInfo(); connectionDeletedInfosMap.put(connection, deletedInfo); INode source = connection.getSource(); if (source != null && source instanceof Node && !(((Node) source).isELTMapComponent())) { deletedInfo.metadataTable = connection.getMetadataTable(); List<IMetadataTable> metaList = source.getMetadataList(); if (metaList != null && deletedInfo.metadataTable != null) { deletedInfo.metadataTableIndex = metaList.indexOf(deletedInfo.metadataTable); metaList.remove(deletedInfo.metadataTable); } } connection.disconnect(); final INode target = connection.getTarget(); if (source.isExternalNode()) { ((AbstractNode) source.getExternalNode()).removeOutput(connection); } if (target.isExternalNode()) { ((AbstractNode) target.getExternalNode()).removeInput(connection); } INodeConnector nodeConnectorSource, nodeConnectorTarget; nodeConnectorSource = connection.getSourceNodeConnector(); if (nodeConnectorSource != null) { nodeConnectorSource.setCurLinkNbOutput(nodeConnectorSource.getCurLinkNbOutput() - 1); } nodeConnectorTarget = connection.getTargetNodeConnector(); nodeConnectorTarget.setCurLinkNbInput(nodeConnectorTarget.getCurLinkNbInput() - 1); } process.checkStartNodes(); process.checkProcess(); }

Target:
public void execute() { connectionDeletedInfosMap = new HashMap<Connection, ConnectionDeleteCommand.ConnectionDeletedInfo>(); Process process = (Process) connectionList.get(0).getSource().getProcess(); for (Connection connection : connectionList) { boolean re = deleteExpendNode(connection); if (re) { return; } ConnectionDeletedInfo deletedInfo = new ConnectionDeletedInfo(); connectionDeletedInfosMap.put(connection, deletedInfo); INode source = connection.getSource(); if (source != null && source instanceof Node && !(((Node) source).isELTMapComponent())) { deletedInfo.metadataTable = connection.getMetadataTable(); List<IMetadataTable> metaList = source.getMetadataList(); if (metaList != null && deletedInfo.metadataTable != null) { deletedInfo.metadataTableIndex = metaList.indexOf(deletedInfo.metadataTable); } } connection.disconnect(); final INode target = connection.getTarget(); if (source.isExternalNode()) { IExternalNode externalNode = ExternalUtilities.getExternalNodeReadyToOpen((Node)source); externalNode.removeOutput(connection); ExternalNodeChangeCommand cmd = new ExternalNodeChangeCommand((Node) source, externalNode); cmd.execute(); externalNodeChangeCommands.add(cmd); } if (target.isExternalNode()) { IExternalNode externalNode = ExternalUtilities.getExternalNodeReadyToOpen((Node)target); externalNode.removeInput(connection); ExternalNodeChangeCommand cmd = new ExternalNodeChangeCommand((Node) target, externalNode); cmd.execute(); externalNodeChangeCommands.add(cmd); } INodeConnector nodeConnectorSource, nodeConnectorTarget; nodeConnectorSource = connection.getSourceNodeConnector(); if (nodeConnectorSource != null) { nodeConnectorSource.setCurLinkNbOutput(nodeConnectorSource.getCurLinkNbOutput() - 1); } nodeConnectorTarget = connection.getTargetNodeConnector(); nodeConnectorTarget.setCurLinkNbInput(nodeConnectorTarget.getCurLinkNbInput() - 1); } process.checkStartNodes(); process.checkProcess(); }