public void validateAddIncomingConnection(final String type, final Connection connection) { super.validateAddIncomingConnection(type, connection); if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) { throw new IllegalArgumentException( "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName() + "] only accepts default incoming connection type!"); } }
public Constraint getConstraint(final Connection connection) { if (connection == null) { throw new IllegalArgumentException("connection is null"); } ConnectionRef ref = new ConnectionRef((String)connection.getMetaData().get("UniqueId"), connection.getTo().getId(), connection.getToType()); return this.constraints.get(ref); }
public Constraint getConstraint(final Connection connection) { if ( connection == null ) { throw new IllegalArgumentException( "connection is null" ); } ConnectionRef ref = new ConnectionRef((String)connection.getMetaData().get("UniqueId"), connection.getTo().getId(), connection.getToType()); return this.constraints.get(ref); }
public void validateAddIncomingConnection(final String type, final Connection connection) { super.validateAddIncomingConnection(type, connection); if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) { throw new IllegalArgumentException( "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName() + "] only accepts default incoming connection type!"); } if (getFrom() != null && !"true".equals(System.getProperty("jbpm.enable.multi.con"))) { throw new IllegalArgumentException( "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName() + "] cannot have more than one incoming connection!"); } }
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 validateAddIncomingConnection(final String type, final Connection connection) { super.validateAddIncomingConnection(type, connection); if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) { throw new IllegalArgumentException( "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName() + "] only accepts default incoming connection type!"); } if (getFrom() != null && !"true".equals(System.getProperty("jbpm.enable.multi.con"))) { throw new IllegalArgumentException( "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName() + "] cannot have more than one incoming connection!"); } }
public void setConstraint(final Connection connection, final Constraint constraint) { 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); }
public void validateAddIncomingConnection(final String type, final Connection connection) { super.validateAddIncomingConnection(type, connection); if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) { throw new IllegalArgumentException( "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName() + "] only accepts default incoming connection type!"); } if (getFrom() != null) { throw new IllegalArgumentException( "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName() + "] cannot have more than one incoming connection!"); } }
public void setConstraint(final Connection connection, final Constraint constraint) { 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); }
public void validateAddIncomingConnection(final String type, final Connection connection) { super.validateAddIncomingConnection(type, connection); if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) { throw new IllegalArgumentException( "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName() + "] only accepts default incoming connection type!"); } if (getFrom() != null && !"true".equals(System.getProperty("jbpm.enable.multi.con"))) { throw new IllegalArgumentException( "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName() + "] cannot have more than one incoming connection!"); } }
public void removeConstraint(Connection connection) { ConnectionRef ref = new ConnectionRef((String)connection.getMetaData().get("UniqueId"), connection.getTo().getId(), connection.getToType()); internalRemoveConstraint(ref); }
public void validateAddIncomingConnection(final String type, final Connection connection) { super.validateAddIncomingConnection(type, connection); if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) { throw new IllegalArgumentException( "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName() + "] only accepts default incoming connection type!"); } if (!getIncomingConnections(org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE).isEmpty()) { throw new IllegalArgumentException( "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName() + "] cannot have more than one incoming connection!"); } }
private String createSplitRule(Process process, Connection connection, String constraint) { return "rule \"RuleFlow-Split-" + process.getId() + "-" + ((org.jbpm.workflow.core.Node) connection.getFrom()).getUniqueId() + "-" + ((org.jbpm.workflow.core.Node) connection.getTo()).getUniqueId() + "-" + connection.getToType() + "\" @Propagation(EAGER) \n" + " ruleflow-group \"DROOLS_SYSTEM\" \n" + " when \n" + " " + constraint + "\n" + " then \n" + "end \n\n"; }
public void validateAddIncomingConnection(final String type, final Connection connection) { super.validateAddIncomingConnection(type, connection); if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) { throw new IllegalArgumentException( "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName() + "] only accepts default incoming connection type!"); } if (getFrom() != null && !"true".equals(System.getProperty("jbpm.enable.multi.con"))) { throw new IllegalArgumentException( "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName() + "] cannot have more than one incoming connection!"); } }
public boolean evaluate(NodeInstance instance, Connection connection, Constraint constraint) { WorkflowProcessInstance processInstance = instance.getProcessInstance(); InternalAgenda agenda = (InternalAgenda) ((ProcessInstance) processInstance).getKnowledgeRuntime().getAgenda(); String rule = "RuleFlow-Split-" + processInstance.getProcessId() + "-" + ((Node) instance.getNode()).getUniqueId() + "-" + ((Node) connection.getTo()).getUniqueId() + "-" + connection.getToType(); return agenda.isRuleActiveInRuleFlowGroup( "DROOLS_SYSTEM", rule, processInstance.getId() ); }
public void validateAddIncomingConnection(final String type, final Connection connection) { super.validateAddIncomingConnection(type, connection); if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) { throw new IllegalArgumentException( "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName() + "] only accepts default incoming connection type!"); } if (getFrom() != null && !"true".equals(System.getProperty("jbpm.enable.multi.con"))) { throw new IllegalArgumentException( "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName() + "] cannot have more than one incoming connection!"); } }
public void validateAddIncomingConnection(final String type, final Connection connection) { super.validateAddIncomingConnection(type, connection); if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) { throw new IllegalArgumentException( "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName() + "] only accepts default incoming connection type!"); } if (getFrom() != null && !"true".equals(System.getProperty("jbpm.enable.multi.con"))) { throw new IllegalArgumentException( "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName() + "] cannot have more than one incoming connection!"); } }
public void validateAddIncomingConnection(final String type, final Connection connection) { super.validateAddIncomingConnection(type, connection); if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) { throw new IllegalArgumentException( "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName() + "] only accepts default incoming connection type!"); } if (getFrom() != null && !"true".equals(System.getProperty("jbpm.enable.multi.con"))) { throw new IllegalArgumentException( "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName() + "] cannot have more than one incoming connection!"); } }
public void validateAddIncomingConnection(final String type, final Connection connection) { super.validateAddIncomingConnection(type, connection); if (!org.jbpm.workflow.core.Node.CONNECTION_DEFAULT_TYPE.equals(type)) { throw new IllegalArgumentException( "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName() + "] only accepts default incoming connection type!"); } if (getFrom() != null && !"true".equals(System.getProperty("jbpm.enable.multi.con"))) { throw new IllegalArgumentException( "This type of node [" + connection.getTo().getMetaData().get("UniqueId") + ", " + connection.getTo().getName() + "] cannot have more than one incoming 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"); } }