Package org.drools.workflow.core.impl

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


            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() + "\" "
                    + "toType=\"" + connection.getToType() + "\" ");
                String name = constraint.getName();
                if (name != null && !"".equals(name)) {
                    xmlDump.append("name=\"" + XmlDumper.replaceIllegalChars(constraint.getName()) + "\" ");
                }
                int priority = constraint.getPriority();
View Full Code Here


        }
        writeTimers(stateNode.getTimers(), xmlDump);
        if (!stateNode.getConstraints().isEmpty()) {
          xmlDump.append("      <constraints>" + EOL);
          for (Map.Entry<ConnectionRef, Constraint> entry: stateNode.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

          }
          if (connection.getExpression() != null) {
            constraint.setConstraint(connection.getExpression());
          }
          split.addConstraint(
            new ConnectionRef(target.getId(), NodeImpl.CONNECTION_DEFAULT_TYPE),
            constraint);
        }
      }
    }
  }
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

        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

      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.getExpression() != null) {
            constraint.setConstraint(connection.getExpression());
          }
          split.addConstraint(
            new ConnectionRef(target.getId(), NodeImpl.CONNECTION_DEFAULT_TYPE),
            constraint);
        }
      }
    }
  }
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.