Package org.drools.workflow.core.impl

Examples of org.drools.workflow.core.impl.ConnectionRef


    private static void updateSplitNode(SplitTransferNode stn,
                                        Split splitNode) {
        for ( ConnectionRef connection : splitNode.getConstraints().keySet() ) {

            final ConnectionRef ref1 = new ConnectionRef( connection.getNodeId(),
                                                          connection.getToType() );

            SplitNode.ConnectionRef ref2 = new SplitNode.ConnectionRef();
            ref2.setNodeId( connection.getNodeId() );
            ref2.setToType( connection.getToType() );
View Full Code Here


    private static void updateSplitNode(SplitTransferNode stn,
                                        Split splitNode) {
        for ( ConnectionRef connection : splitNode.getConstraints().keySet() ) {

            final ConnectionRef ref1 = new ConnectionRef( connection.getNodeId(),
                                                          connection.getToType() );

            SplitNode.ConnectionRef ref2 = new SplitNode.ConnectionRef();
            ref2.setNodeId( connection.getNodeId() );
            ref2.setToType( connection.getToType() );
View Full Code Here

        constraintImpl.setType(type);
        constraintImpl.setDialect(dialect);
        constraintImpl.setConstraint(constraint);
        constraintImpl.setPriority(priority);
        getSplit().addConstraint(
        new ConnectionRef(toNodeId, Node.CONNECTION_DEFAULT_TYPE), constraintImpl);
        return this;
    }
View Full Code Here

      throw new IllegalArgumentException("connection is null");
    }
    if (!getDefaultOutgoingConnections().contains(connection)) {
      throw new IllegalArgumentException("connection is unknown:"  + connection);
    }
    addConstraint(new ConnectionRef(
      connection.getTo().getId(), connection.getToType()), constraint);
  }
View Full Code Here

    public Constraint getConstraint(final Connection connection) {
        if (connection == null) {
            throw new IllegalArgumentException("connection is null");
        }
        ConnectionRef ref = new ConnectionRef(connection.getTo().getId(), connection.getToType());
        return this.constraints.get(ref);
    }
View Full Code Here

        if ( connection == null ) {
            throw new IllegalArgumentException( "connection is null" );
        }

        if ( this.type == TYPE_OR || this.type == TYPE_XOR ) {
            ConnectionRef ref = new ConnectionRef(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() );
    }
View Full Code Here

            }
            if (!getDefaultOutgoingConnections().contains(connection)) {
                throw new IllegalArgumentException("connection is unknown:" + connection);
            }
            addConstraint(
                new ConnectionRef(connection.getTo().getId(), connection.getToType()),
                constraint);
        } else {
            throw new UnsupportedOperationException( "Constraints are " +
            "only supported with XOR or OR split types, not with type:" + getType() );
        }
View Full Code Here

        super.removeOutgoingConnection(type, connection);
        removeConstraint(connection);
    }
   
    public void removeConstraint(Connection connection) {
      ConnectionRef ref = new ConnectionRef(connection.getTo().getId(), connection.getToType());
        internalRemoveConstraint(ref);
    }
View Full Code Here

      Constrainable parent = (Constrainable) parser.getParent();
        Constraint constraint = new ConstraintImpl();

        final String toNodeIdString = element.getAttribute("toNodeId");
        String toType = element.getAttribute("toType");
        ConnectionRef connectionRef = null;
        if (toNodeIdString != null && toNodeIdString.trim().length() > 0) {
          int toNodeId = new Integer(toNodeIdString);
          if (toType == null || toType.trim().length() == 0) {
            toType = NodeImpl.CONNECTION_DEFAULT_TYPE;
          }
          connectionRef = new ConnectionRef(toNodeId, toType);
        }

        final String name = element.getAttribute("name");
        constraint.setName(name);
        final String priority = element.getAttribute("priority");
View Full Code Here

            endNode(xmlDump);
        } else {
            xmlDump.append(">" + EOL);
            xmlDump.append("      <constraints>" + EOL);
            for (Map.Entry<ConnectionRef, Constraint> entry: splitNode.getConstraints().entrySet()) {
                ConnectionRef connection = entry.getKey();
                Constraint constraint = entry.getValue();
                xmlDump.append("        <constraint "
                        + "toNodeId=\"" + connection.getNodeId() + "\" ");
                String name = constraint.getName();
                if (name != null && !"".equals(name)) {
                    xmlDump.append("name=\"" + XmlDumper.replaceIllegalChars(constraint.getName()) + "\" ");
                }
                int priority = constraint.getPriority();
View Full Code Here

TOP

Related Classes of org.drools.workflow.core.impl.ConnectionRef

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.