xmlDump.append(" <in-ports>" + EOL); for (Map.Entry<String, CompositeNode.NodeAndType> entry: inPorts.entrySet()) { xmlDump.append(" <in-port type=\"" + entry.getKey() + "\" nodeId=\"" + entry.getValue().getNodeId() + "\" nodeInType=\"" + entry.getValue().getType() + "\" />" + EOL); xmlDump.append(" <out-ports>" + EOL); for (Map.Entry<String, CompositeNode.NodeAndType> entry: outPorts.entrySet()) { xmlDump.append(" <out-port type=\"" + entry.getKey() + "\" nodeId=\"" + entry.getValue().getNodeId() + "\" nodeOutType=\"" + entry.getValue().getType() + "\" />" + EOL);
public void validateAddIncomingConnection(final String type, final Connection connection) { CompositeNode.NodeAndType nodeAndType = internalGetLinkedIncomingNode(type); if (connection.getFrom().getNodeContainer() == this) { if (nodeAndType != null) { throw new IllegalArgumentException("Cannot link incoming connection type more than once: " + type); } } else { if (nodeAndType != null) { NodeImpl node = (NodeImpl) nodeAndType.getNode(); if (node != null) { node.validateAddIncomingConnection(nodeAndType.getType(), connection); } } } }
public void validateAddOutgoingConnection(final String type, final Connection connection) { CompositeNode.NodeAndType nodeAndType = internalGetLinkedOutgoingNode(type); if (connection.getTo().getNodeContainer() == this) { if (nodeAndType != null) { throw new IllegalArgumentException("Cannot link outgoing connection type more than once: " + type); } } else { if (nodeAndType != null) { NodeImpl node = (NodeImpl) nodeAndType.getNode(); if (node != null) { ((NodeImpl) nodeAndType.getNode()).validateAddOutgoingConnection(nodeAndType.getType(), connection); } } } }
public void addOutgoingConnection(String type, Connection connection) { if (connection.getTo().getNodeContainer() == this) { linkIncomingConnections( org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE, connection.getTo().getId(), connection.getToType()); } else { super.addOutgoingConnection(type, connection); CompositeNode.NodeAndType outNode = internalGetLinkedOutgoingNode(type); if (outNode != null) { CompositeNodeEnd end = new CompositeNodeEnd(this, connection.getTo(), type); internalAddNode(end); NodeImpl node = (NodeImpl) outNode.getNode(); if (node != null) { new ConnectionImpl( outNode.getNode(), outNode.getType(), end, org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE); } } } }
public void addIncomingConnection(String type, Connection connection) { if (connection.getFrom().getNodeContainer() == this) { linkOutgoingConnections(connection.getFrom().getId(), connection.getFromType(), org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE); } else { super.addIncomingConnection(type, connection); CompositeNode.NodeAndType inNode = internalGetLinkedIncomingNode(type); if (inNode != null) { CompositeNodeStart start = new CompositeNodeStart(this, connection.getFrom(), type); internalAddNode(start); NodeImpl node = (NodeImpl) inNode.getNode(); if (node != null) { new ConnectionImpl( start, org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE, inNode.getNode(), inNode.getType()); } } } }
public void removeIncomingConnection(String type, Connection connection) { super.removeIncomingConnection(type, connection); CompositeNode.NodeAndType nodeAndType = internalGetLinkedIncomingNode(type); if (nodeAndType != null) { for (Connection inConnection: nodeAndType.getNode().getIncomingConnections(nodeAndType.getType())) { if (((CompositeNodeStart) inConnection.getFrom()).getInNodeId() == connection.getFrom().getId()) { Node compositeNodeStart = inConnection.getFrom(); ((ConnectionImpl) inConnection).terminate(); internalRemoveNode(compositeNodeStart); return; } } throw new IllegalArgumentException( "Could not find internal incoming connection for node"); } }
public void validateAddOutgoingConnection(final String type, final Connection connection) { CompositeNode.NodeAndType nodeAndType = internalGetLinkedOutgoingNode(type); if (connection.getTo().getNodeContainer() == this) { if (nodeAndType != null) { throw new IllegalArgumentException("Cannot link outgoing connection type more than once: " + type); } } else { if (nodeAndType != null) { NodeImpl node = (NodeImpl) nodeAndType.getNode(); if (node != null) { ((NodeImpl) nodeAndType.getNode()).validateAddOutgoingConnection(nodeAndType.getType(), connection); } } } }
public void validateAddIncomingConnection(final String type, final Connection connection) { CompositeNode.NodeAndType nodeAndType = internalGetLinkedIncomingNode(type); if (connection.getFrom().getNodeContainer() == this) { if (nodeAndType != null) { throw new IllegalArgumentException("Cannot link incoming connection type more than once: " + type); } } else { if (nodeAndType != null) { NodeImpl node = (NodeImpl) nodeAndType.getNode(); if (node != null) { node.validateAddIncomingConnection(nodeAndType.getType(), connection); } } } }
public void validateRemoveOutgoingConnection(final String type, final Connection connection) { CompositeNode.NodeAndType nodeAndType = internalGetLinkedOutgoingNode(type); if (nodeAndType != null) { for (Connection outConnection: nodeAndType.getNode().getOutgoingConnections(nodeAndType.getType())) { if (((CompositeNodeEnd) outConnection.getTo()).getOutNodeId() == connection.getTo().getId()) { ((NodeImpl) nodeAndType.getNode()).validateRemoveOutgoingConnection(nodeAndType.getType(), outConnection); return; } } throw new IllegalArgumentException( "Could not find internal outgoing connection for node"); } }
public void removeOutgoingConnection(String type, Connection connection) { super.removeOutgoingConnection(type, connection); CompositeNode.NodeAndType nodeAndType = internalGetLinkedOutgoingNode(type); if (nodeAndType != null) { for (Connection outConnection: nodeAndType.getNode().getOutgoingConnections(nodeAndType.getType())) { if (((CompositeNodeEnd) outConnection.getTo()).getOutNodeId() == connection.getTo().getId()) { Node compositeNodeEnd = outConnection.getTo(); ((ConnectionImpl) outConnection).terminate(); internalRemoveNode(compositeNodeEnd); return; } } throw new IllegalArgumentException( "Could not find internal outgoing connection for node"); } }
public void validateRemoveIncomingConnection(final String type, final Connection connection) { CompositeNode.NodeAndType nodeAndType = internalGetLinkedIncomingNode(type); if (nodeAndType != null) { for (Connection inConnection: nodeAndType.getNode().getIncomingConnections(nodeAndType.getType())) { if (((CompositeNodeStart) inConnection.getFrom()).getInNodeId() == connection.getFrom().getId()) { ((NodeImpl) nodeAndType.getNode()).validateRemoveIncomingConnection(nodeAndType.getType(), inConnection); return; } } throw new IllegalArgumentException( "Could not find internal incoming connection for node"); } }
List<Connection> connections = nodeAndType.getNode().getIncomingConnections(nodeAndType.getType()); for (Iterator<Connection> iterator = connections.iterator(); iterator.hasNext(); ) { Connection connection = iterator.next(); ((CompositeNode.CompositeNodeStart) connection.getFrom()).getInNode().getId() == from.getNodeId())) { NodeInstance nodeInstance = getNodeInstance(connection.getFrom()); ((org.jbpm.workflow.instance.NodeInstance) nodeInstance).trigger(null, nodeAndType.getType()); return;
oldNodeAndType.getNode().getOutgoingConnections(oldNodeAndType.getType()); for (Connection connection: new ArrayList<Connection>(oldOutConnections)) { if (connection.getTo() instanceof CompositeNodeEnd) { if (outNode.getNode() != null) { new ConnectionImpl( outNode.getNode(), outNode.getType(), end, org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE);
public void addOutgoingConnection(String type, Connection connection) { if (connection.getTo().getNodeContainer() == this) { linkIncomingConnections( org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE, connection.getTo().getId(), connection.getToType()); } else { super.addOutgoingConnection(type, connection); CompositeNode.NodeAndType outNode = internalGetLinkedOutgoingNode(type); if (outNode != null) { CompositeNodeEnd end = new CompositeNodeEnd(this, connection.getTo(), type); internalAddNode(end); NodeImpl node = (NodeImpl) outNode.getNode(); if (node != null) { new ConnectionImpl( outNode.getNode(), outNode.getType(), end, org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE); } } } }
public void addIncomingConnection(String type, Connection connection) { if (connection.getFrom().getNodeContainer() == this) { linkOutgoingConnections(connection.getFrom().getId(), connection.getFromType(), org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE); } else { super.addIncomingConnection(type, connection); CompositeNode.NodeAndType inNode = internalGetLinkedIncomingNode(type); if (inNode != null) { CompositeNodeStart start = new CompositeNodeStart(this, connection.getFrom(), type); internalAddNode(start); NodeImpl node = (NodeImpl) inNode.getNode(); if (node != null) { new ConnectionImpl( start, org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE, inNode.getNode(), inNode.getType()); } } } }
public void removeOutgoingConnection(String type, Connection connection) { super.removeOutgoingConnection(type, connection); CompositeNode.NodeAndType nodeAndType = internalGetLinkedOutgoingNode(type); if (nodeAndType != null) { for (Connection outConnection: nodeAndType.getNode().getOutgoingConnections(nodeAndType.getType())) { if (((CompositeNodeEnd) outConnection.getTo()).getOutNodeId() == connection.getTo().getId()) { Node compositeNodeEnd = outConnection.getTo(); ((ConnectionImpl) outConnection).terminate(); internalRemoveNode(compositeNodeEnd); return; } } throw new IllegalArgumentException( "Could not find internal outgoing connection for node"); } }
public void removeIncomingConnection(String type, Connection connection) { super.removeIncomingConnection(type, connection); CompositeNode.NodeAndType nodeAndType = internalGetLinkedIncomingNode(type); if (nodeAndType != null) { for (Connection inConnection: nodeAndType.getNode().getIncomingConnections(nodeAndType.getType())) { if (((CompositeNodeStart) inConnection.getFrom()).getInNodeId() == connection.getFrom().getId()) { Node compositeNodeStart = inConnection.getFrom(); ((ConnectionImpl) inConnection).terminate(); internalRemoveNode(compositeNodeStart); return; } } throw new IllegalArgumentException( "Could not find internal incoming connection for node"); } }
public void validateRemoveIncomingConnection(final String type, final Connection connection) { CompositeNode.NodeAndType nodeAndType = internalGetLinkedIncomingNode(type); if (nodeAndType != null) { for (Connection inConnection: nodeAndType.getNode().getIncomingConnections(nodeAndType.getType())) { if (((CompositeNodeStart) inConnection.getFrom()).getInNodeId() == connection.getFrom().getId()) { ((NodeImpl) nodeAndType.getNode()).validateRemoveIncomingConnection(nodeAndType.getType(), inConnection); return; } } throw new IllegalArgumentException( "Could not find internal incoming connection for node"); } }
public void validateRemoveOutgoingConnection(final String type, final Connection connection) { CompositeNode.NodeAndType nodeAndType = internalGetLinkedOutgoingNode(type); if (nodeAndType != null) { for (Connection outConnection: nodeAndType.getNode().getOutgoingConnections(nodeAndType.getType())) { if (((CompositeNodeEnd) outConnection.getTo()).getOutNodeId() == connection.getTo().getId()) { ((NodeImpl) nodeAndType.getNode()).validateRemoveOutgoingConnection(nodeAndType.getType(), outConnection); return; } } throw new IllegalArgumentException( "Could not find internal outgoing connection for node"); } }