public Constraint getConstraint(final Connection connection) { if ( connection == null ) { throw new IllegalArgumentException( "connection is null" ); } if ( this.type == TYPE_OR || this.type == TYPE_XOR ) { ConnectionRef ref = new ConnectionRef((String)connection.getMetaData().get("UniqueId"), connection.getTo().getId(), connection.getToType()); return this.constraints.get(ref); } throw new UnsupportedOperationException( "Constraints are " + "only supported with XOR or OR split types, not with: " + getType() ); }
public boolean isDefault(final Connection connection) { if ( connection == null ) { throw new IllegalArgumentException( "connection is null" ); } if ( this.type == TYPE_OR || this.type == TYPE_XOR ) { ConnectionRef ref = new ConnectionRef((String)connection.getMetaData().get("UniqueId"), connection.getTo().getId(), connection.getToType()); Constraint constraint = this.constraints.get(ref); String defaultConnection = (String) getMetaData().get("Default"); String connectionId = (String) connection.getMetaData().get("UniqueId"); if (constraint != null) { return constraint.isDefault(); } else if (constraint == null && connectionId.equals(defaultConnection)) { return true; } else { return false; } } throw new UnsupportedOperationException( "Constraints are " + "only supported with XOR or OR split types, not with: " + getType() ); }
public void setConstraint(final Connection connection, final Constraint constraint) { if ( this.type == TYPE_OR || this.type == TYPE_XOR ) { if ( connection == null ) { throw new IllegalArgumentException( "connection is null" ); } if (!getDefaultOutgoingConnections().contains(connection)) { throw new IllegalArgumentException("connection is unknown:" + connection); } addConstraint( new ConnectionRef((String)connection.getMetaData().get("UniqueId"), connection.getTo().getId(), connection.getToType()), constraint); } else { throw new UnsupportedOperationException( "Constraints are " + "only supported with XOR or OR split types, not with type:" + getType() ); } }
public void writeNode(Node node, StringBuilder xmlDump, boolean includeMeta) { Split splitNode = (Split) node; writeNode("split", splitNode, xmlDump, includeMeta); int type = splitNode.getType(); if (type != 0) { xmlDump.append("type=\"" + type + "\" ");
public void writeNode(Node node, StringBuilder xmlDump, int metaDataType) { Split split = (Split) node; String type = null; switch (split.getType()) { case Split.TYPE_AND: type = "parallelGateway";
if (currentNode instanceof Split && ((Split) currentNode).getType() == Split.TYPE_XOR) { if (vistedNodes.contains(startAt.getId())) { return false;
if (split.getType() == Split.TYPE_UNDEFINED) { addErrorMessage(process, node, "Split does not have more than one outgoing connection: " + split.getOutgoingConnections().size() + "."); if (split.getType() == Split.TYPE_XOR || split.getType() == Split.TYPE_OR) { for (final Iterator<Connection> it = split.getDefaultOutgoingConnections().iterator(); it.hasNext(); ) { final Connection connection = it.next();
public Constraint getConstraint(final Connection connection) { if ( connection == null ) { throw new IllegalArgumentException( "connection is null" ); } if ( this.type == TYPE_OR || this.type == TYPE_XOR ) { ConnectionRef ref = new ConnectionRef((String)connection.getMetaData().get("UniqueId"), connection.getTo().getId(), connection.getToType()); return this.constraints.get(ref); } throw new UnsupportedOperationException( "Constraints are " + "only supported with XOR or OR split types, not with: " + getType() ); }
public void setConstraint(final Connection connection, final Constraint constraint) { if ( this.type == TYPE_OR || this.type == TYPE_XOR ) { if ( connection == null ) { throw new IllegalArgumentException( "connection is null" ); } if (!getDefaultOutgoingConnections().contains(connection)) { throw new IllegalArgumentException("connection is unknown:" + connection); } addConstraint( new ConnectionRef((String)connection.getMetaData().get("UniqueId"), connection.getTo().getId(), connection.getToType()), constraint); } else { throw new UnsupportedOperationException( "Constraints are " + "only supported with XOR or OR split types, not with type:" + getType() ); } }
public boolean isDefault(final Connection connection) { if ( connection == null ) { throw new IllegalArgumentException( "connection is null" ); } if ( this.type == TYPE_OR || this.type == TYPE_XOR ) { ConnectionRef ref = new ConnectionRef((String)connection.getMetaData().get("UniqueId"), connection.getTo().getId(), connection.getToType()); Constraint constraint = this.constraints.get(ref); String defaultConnection = (String) getMetaData().get("Default"); String connectionId = (String) connection.getMetaData().get("UniqueId"); if (constraint != null) { return constraint.isDefault(); } else if (constraint == null && connectionId.equals(defaultConnection)) { return true; } else { return false; } } throw new UnsupportedOperationException( "Constraints are " + "only supported with XOR or OR split types, not with: " + getType() ); }
public void writeNode(Node node, StringBuilder xmlDump, boolean includeMeta) { Split splitNode = (Split) node; writeNode("split", splitNode, xmlDump, includeMeta); int type = splitNode.getType(); if (type != 0) { xmlDump.append("type=\"" + type + "\" ");
public void writeNode(Node node, StringBuilder xmlDump, int metaDataType) { Split split = (Split) node; String type = null; switch (split.getType()) { case Split.TYPE_AND: type = "parallelGateway";
if (currentNode instanceof Split && ((Split) currentNode).getType() == Split.TYPE_XOR) { if (vistedNodes.contains(startAt.getId())) { return false;