Constraint constraint = new ConstraintImpl();
throw new IllegalArgumentException("Could not find outgoing connection"); if ( "rule".equals( constraint.getType() )) { RuleConstraintEvaluator ruleConstraint = new RuleConstraintEvaluator(); ruleConstraint.setDialect( constraint.getDialect() ); ruleConstraint.setName( constraint.getName() ); ruleConstraint.setPriority( constraint.getPriority() ); ruleConstraint.setDefault( constraint.isDefault() ); ((NodeImpl) node).setConstraint( outgoingConnection, ruleConstraint ); } else if ( "code".equals( constraint.getType() ) ) { ReturnValueConstraintEvaluator returnValueConstraint = new ReturnValueConstraintEvaluator(); returnValueConstraint.setDialect( constraint.getDialect() ); returnValueConstraint.setName( constraint.getName() ); returnValueConstraint.setPriority( constraint.getPriority() ); returnValueConstraint.setDefault( constraint.isDefault() ); ((NodeImpl) node).setConstraint( outgoingConnection, returnValueConstraint ); returnValueDescr.setText( constraint.getConstraint() ); returnValueDescr.setResource(processDescr.getResource()); ProcessDialect dialect = ProcessDialectRegistry.getDialect( constraint.getDialect() ); dialect.getReturnValueEvaluatorBuilder().build( context, returnValueConstraint, returnValueDescr, (NodeImpl) node );
public SplitFactory constraint(long toNodeId, String name, String type, String dialect, String constraint, int priority) { ConstraintImpl constraintImpl = new ConstraintImpl(); constraintImpl.setName(name); constraintImpl.setType(type); constraintImpl.setDialect(dialect); constraintImpl.setConstraint(constraint); constraintImpl.setPriority(priority); getSplit().addConstraint( new ConnectionRef(toNodeId, Node.CONNECTION_DEFAULT_TYPE), constraintImpl); return this; }
public SplitFactory constraint(long toNodeId, String name, String type, String dialect, String constraint, int priority) { ConstraintImpl constraintImpl = new ConstraintImpl(); constraintImpl.setName(name); constraintImpl.setType(type); constraintImpl.setDialect(dialect); constraintImpl.setConstraint(constraint); constraintImpl.setPriority(priority); getSplit().addConstraint( new ConnectionRef(toNodeId, Node.CONNECTION_DEFAULT_TYPE), constraintImpl); return this; }
StateNode stateNode = (StateNode) node; String condition = (String) stateNode.getMetaData("Condition"); Constraint constraint = new ConstraintImpl(); constraint.setConstraint(condition); constraint.setType("rule");
} else if (constraint != null && "rule".equals( constraint.getType() )) { RuleConstraintEvaluator ruleConstraint = new RuleConstraintEvaluator(); ruleConstraint.setDialect( constraint.getDialect() ); ruleConstraint.setName( constraint.getName() ); ruleConstraint.setPriority( constraint.getPriority() ); ruleConstraint.setDefault( constraint.isDefault() ); ruleConstraint.setType(constraint.getType()); ruleConstraint.setConstraint(constraint.getConstraint()); splitNode.setConstraint( outgoingConnection, ruleConstraint ); } else if (constraint != null && "code".equals( constraint.getType() ) ) { ReturnValueConstraintEvaluator returnValueConstraint = new ReturnValueConstraintEvaluator(); returnValueConstraint.setDialect( constraint.getDialect() ); returnValueConstraint.setName( constraint.getName() ); returnValueConstraint.setPriority( constraint.getPriority() ); returnValueConstraint.setDefault( constraint.isDefault() ); returnValueConstraint.setType(constraint.getType()); returnValueConstraint.setConstraint(constraint.getConstraint()); splitNode.setConstraint( outgoingConnection, returnValueConstraint ); returnValueDescr.setText( constraint.getConstraint() ); returnValueDescr.setResource(processDescr.getResource()); ProcessDialect dialect = ProcessDialectRegistry.getDialect( constraint.getDialect() ); dialect.getReturnValueEvaluatorBuilder().build( context, returnValueConstraint, returnValueDescr, (NodeImpl) node );
StateNode stateNode = (StateNode) node; String condition = (String) stateNode.getMetaData("Condition"); Constraint constraint = new ConstraintImpl(); constraint.setConstraint(condition); constraint.setType("rule");
throw new IllegalArgumentException("Could not find outgoing connection"); if ( "rule".equals( constraint.getType() )) { RuleConstraintEvaluator ruleConstraint = new RuleConstraintEvaluator(); ruleConstraint.setDialect( constraint.getDialect() ); ruleConstraint.setName( constraint.getName() ); ruleConstraint.setPriority( constraint.getPriority() ); ruleConstraint.setDefault( constraint.isDefault() ); ((NodeImpl) node).setConstraint( outgoingConnection, ruleConstraint ); } else if ( "code".equals( constraint.getType() ) ) { ReturnValueConstraintEvaluator returnValueConstraint = new ReturnValueConstraintEvaluator(); returnValueConstraint.setDialect( constraint.getDialect() ); returnValueConstraint.setName( constraint.getName() ); returnValueConstraint.setPriority( constraint.getPriority() ); returnValueConstraint.setDefault( constraint.isDefault() ); ((NodeImpl) node).setConstraint( outgoingConnection, returnValueConstraint ); returnValueDescr.setText( constraint.getConstraint() ); returnValueDescr.setResource(processDescr.getResource()); ProcessDialect dialect = ProcessDialectRegistry.getDialect( constraint.getDialect() ); dialect.getReturnValueEvaluatorBuilder().build( context, returnValueConstraint, returnValueDescr, (NodeImpl) node );
private static Constraint buildConstraint(SequenceFlow connection, NodeImpl node) { if (connection.getExpression() == null) { return null; } Constraint constraint = new ConstraintImpl(); String defaultConnection = (String) node.getMetaData("Default"); if (defaultConnection != null && defaultConnection.equals(connection.getId())) { constraint.setDefault(true); } if (connection.getName() != null) { constraint.setName(connection.getName()); } else { constraint.setName(""); } if (connection.getType() != null) { constraint.setType(connection.getType()); } else { constraint.setType("code"); } if (connection.getLanguage() != null) { constraint.setDialect(connection.getLanguage()); } if (connection.getExpression() != null) { constraint.setConstraint(connection.getExpression()); } constraint.setPriority(connection.getPriority()); return constraint; }
} else if (constraint != null && "rule".equals( constraint.getType() )) { RuleConstraintEvaluator ruleConstraint = new RuleConstraintEvaluator(); ruleConstraint.setDialect( constraint.getDialect() ); ruleConstraint.setName( constraint.getName() ); ruleConstraint.setPriority( constraint.getPriority() ); ruleConstraint.setDefault( constraint.isDefault() ); ruleConstraint.setType(constraint.getType()); ruleConstraint.setConstraint(constraint.getConstraint()); splitNode.setConstraint( outgoingConnection, ruleConstraint ); } else if (constraint != null && "code".equals( constraint.getType() ) ) { ReturnValueConstraintEvaluator returnValueConstraint = new ReturnValueConstraintEvaluator(); returnValueConstraint.setDialect( constraint.getDialect() ); returnValueConstraint.setName( constraint.getName() ); returnValueConstraint.setPriority( constraint.getPriority() ); returnValueConstraint.setDefault( constraint.isDefault() ); returnValueConstraint.setType(constraint.getType()); returnValueConstraint.setConstraint(constraint.getConstraint()); splitNode.setConstraint( outgoingConnection, returnValueConstraint ); returnValueDescr.setText( constraint.getConstraint() ); returnValueDescr.setResource(processDescr.getResource()); ProcessDialect dialect = ProcessDialectRegistry.getDialect( constraint.getDialect() ); dialect.getReturnValueEvaluatorBuilder().build( context, returnValueConstraint, returnValueDescr, (NodeImpl) node );
private static Constraint buildConstraint(SequenceFlow connection, NodeImpl node) { if (connection.getExpression() == null) { return null; } Constraint constraint = new ConstraintImpl(); String defaultConnection = (String) node.getMetaData("Default"); if (defaultConnection != null && defaultConnection.equals(connection.getId())) { constraint.setDefault(true); } if (connection.getName() != null) { constraint.setName(connection.getName()); } else { constraint.setName(""); } if (connection.getType() != null) { constraint.setType(connection.getType()); } else { constraint.setType("code"); } if (connection.getLanguage() != null) { constraint.setDialect(connection.getLanguage()); } if (connection.getExpression() != null) { constraint.setConstraint(connection.getExpression()); } constraint.setPriority(connection.getPriority()); return constraint; }
split.setType(Split.TYPE_XOR); Connection connection = new ConnectionImpl(split, Node.CONNECTION_DEFAULT_TYPE, actionNode, Node.CONNECTION_DEFAULT_TYPE); Constraint constraint = new ConstraintImpl(); constraint.setName("constraint1 ><&&"); constraint.setPriority(1); split.setConstraint(connection, constraint); connection = new ConnectionImpl(split, Node.CONNECTION_DEFAULT_TYPE, ruleSetNode, Node.CONNECTION_DEFAULT_TYPE); constraint = new ConstraintImpl(); constraint.setName("constraint2"); constraint.setPriority(2); new ConnectionImpl(compositeNode, Node.CONNECTION_DEFAULT_TYPE, stateNode, Node.CONNECTION_DEFAULT_TYPE); connection = new ConnectionImpl(stateNode, Node.CONNECTION_DEFAULT_TYPE, join, Node.CONNECTION_DEFAULT_TYPE); constraint = new ConstraintImpl(); constraint.setName("constraint1 ><&&"); constraint.setPriority(1); stateNode.setConstraint(connection, constraint); connection = new ConnectionImpl(stateNode, Node.CONNECTION_DEFAULT_TYPE, endNode, Node.CONNECTION_DEFAULT_TYPE); constraint = new ConstraintImpl(); constraint.setName("constraint2"); constraint.setPriority(2);
Constraint constraint = new ConstraintImpl();
StateNode stateNode = (StateNode) node; String condition = (String) stateNode.getMetaData("Condition"); Constraint constraint = new ConstraintImpl(); constraint.setConstraint(condition); constraint.setType("rule");
StateNode stateNode = (StateNode) node; String condition = (String) stateNode.getMetaData("Condition"); Constraint constraint = new ConstraintImpl(); constraint.setConstraint(condition); constraint.setType("rule");
private static Constraint buildConstraint(SequenceFlow connection, NodeImpl node) { if (connection.getExpression() == null) { return null; } Constraint constraint = new ConstraintImpl(); String defaultConnection = (String) node.getMetaData("Default"); if (defaultConnection != null && defaultConnection.equals(connection.getId())) { constraint.setDefault(true); } if (connection.getName() != null) { constraint.setName(connection.getName()); } else { constraint.setName(""); } if (connection.getType() != null) { constraint.setType(connection.getType()); } else { constraint.setType("code"); } if (connection.getLanguage() != null) { constraint.setDialect(connection.getLanguage()); } if (connection.getExpression() != null) { constraint.setConstraint(connection.getExpression()); } constraint.setPriority(connection.getPriority()); return constraint; }
private static Constraint buildConstraint(SequenceFlow connection, NodeImpl node) { if (connection.getExpression() == null) { return null; } Constraint constraint = new ConstraintImpl(); String defaultConnection = (String) node.getMetaData("Default"); if (defaultConnection != null && defaultConnection.equals(connection.getId())) { constraint.setDefault(true); } if (connection.getName() != null) { constraint.setName(connection.getName()); } else { constraint.setName(""); } if (connection.getType() != null) { constraint.setType(connection.getType()); } else { constraint.setType("code"); } if (connection.getLanguage() != null) { constraint.setDialect(connection.getLanguage()); } if (connection.getExpression() != null) { constraint.setConstraint(connection.getExpression()); } constraint.setPriority(connection.getPriority()); return constraint; }