+ "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(); if (priority != 0) { xmlDump.append("priority=\"" + constraint.getPriority() + "\" "); xmlDump.append("type=\"" + constraint.getType() + "\" "); String dialect = constraint.getDialect(); if (dialect != null && !"".equals(dialect)) { xmlDump.append("dialect=\"" + dialect + "\" "); String constraintString = constraint.getConstraint(); if (constraintString != null) { xmlDump.append(">" + XmlDumper.replaceIllegalChars(constraintString) + "</constraint>" + EOL);
constraint.setName(name); final String priority = element.getAttribute("priority"); if (priority != null && priority.length() != 0) { constraint.setPriority(new Integer(priority)); constraint.setType(type); final String dialect = element.getAttribute("dialect"); constraint.setDialect(dialect); constraint.setConstraint(text); parent.addConstraint(connectionRef, constraint); return null;
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(); if (priority != 0) { xmlDump.append("priority=\"" + constraint.getPriority() + "\" "); String constraintString = constraint.getConstraint(); if (constraintString != null) { xmlDump.append(">" + XmlDumper.replaceIllegalChars(constraintString) + "</constraint>" + EOL);
String condition = (String) stateNode.getMetaData("Condition"); Constraint constraint = new ConstraintImpl(); constraint.setConstraint(condition); constraint.setType("rule"); for (org.kie.api.definition.process.Connection connection: stateNode.getDefaultOutgoingConnections()) { stateNode.setConstraint(connection, constraint);
public void addConstraint(ConnectionRef connection, Constraint constraint) { if (connection != null) { throw new IllegalArgumentException( "A constraint trigger only accepts one simple constraint"); } this.constraint = constraint.getConstraint(); }
for ( Connection connection : split.getDefaultOutgoingConnections() ) { Constraint constraint = split.getConstraint( connection ); if ( constraint != null && "rule".equals( constraint.getType() ) ) { builder.append( createSplitRule( process, connection, split.getConstraint( connection ).getConstraint() ) );
selected = true; } else if (((String) event).equals(constraint.getName())) { selected = true;
for (Connection connection: stateNode.getOutgoingConnections(NodeImpl.CONNECTION_DEFAULT_TYPE)) { Constraint constraint = stateNode.getConstraint(connection); if (constraint != null && constraint.getPriority() < priority) { String rule = "RuleFlowStateNode-" + getProcessInstance().getProcessId() + "-" + getStateNode().getUniqueId() + "-" + if (isActive) { selected = connection; priority = constraint.getPriority();
String condition = (String) stateNode.getMetaData("Condition"); Constraint constraint = new ConstraintImpl(); constraint.setConstraint(condition); constraint.setType("rule"); for (org.kie.api.definition.process.Connection connection : stateNode.getDefaultOutgoingConnections()) { stateNode.setConstraint(connection, constraint);
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(); if (priority != 0) { xmlDump.append("priority=\"" + constraint.getPriority() + "\" "); String constraintString = constraint.getConstraint(); if (constraintString != null) { xmlDump.append(">" + XmlDumper.replaceIllegalChars(constraintString) + "</constraint>" + EOL);
public void addConstraint(ConnectionRef connection, Constraint constraint) { if (connection != null) { throw new IllegalArgumentException( "A Milestone node only accepts one simple constraint"); } this.constraint = constraint.getConstraint(); }
for ( Connection connection : split.getDefaultOutgoingConnections() ) { Constraint constraint = split.getConstraint( connection ); if ( constraint != null && "rule".equals( constraint.getType() ) ) { builder.append( createSplitRule( process, connection, split.getConstraint( connection ).getConstraint() ) );
selected = true; } else if (((String) event).equals(constraint.getName())) { selected = true;
for (Connection connection: stateNode.getOutgoingConnections(NodeImpl.CONNECTION_DEFAULT_TYPE)) { Constraint constraint = stateNode.getConstraint(connection); if (constraint != null && constraint.getPriority() < priority) { String rule = "RuleFlowStateNode-" + getProcessInstance().getProcessId() + "-" + getStateNode().getUniqueId() + "-" + if (isActive) { selected = connection; priority = constraint.getPriority();
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; }
" <conditionExpression xsi:type=\"tFormalExpression\" />"); } else { if (constraint.getName() != null && constraint.getName().trim().length() > 0) { xmlDump.append("name=\"" + XmlBPMNProcessDumper.replaceIllegalCharsAttribute(constraint.getName()) + "\" "); if (constraint.getPriority() != 0) { xmlDump.append("tns:priority=\"" + constraint.getPriority() + "\" "); if ("code".equals(constraint.getType())) { if (JavaDialect.ID.equals(constraint.getDialect())) { xmlDump.append("language=\"" + JAVA_LANGUAGE + "\" "); } else if ("XPath".equals(constraint.getDialect())) { xmlDump.append("language=\"" + XPATH_LANGUAGE + "\" "); } else if ("JavaScript".equals(constraint.getDialect())) { xmlDump.append("language=\"" + JAVASCRIPT_LANGUAGE + "\" "); } else if ("FEEL".equals(constraint.getDialect())) { xmlDump.append("language=\"" + FEEL_LANGUAGE + "\" "); xmlDump.append("language=\"" + RULE_LANGUAGE + "\" "); String constraintString = constraint.getConstraint(); if (constraintString == null) { constraintString = "";
String condition = (String) stateNode.getMetaData("Condition"); Constraint constraint = new ConstraintImpl(); constraint.setConstraint(condition); constraint.setType("rule"); for (org.kie.api.definition.process.Connection connection: stateNode.getDefaultOutgoingConnections()) { stateNode.setConstraint(connection, constraint);
private String createStateRule(Process process, StateNode state, ConnectionRef key, Constraint constraint) { if (constraint.getConstraint() == null || constraint.getConstraint().trim().length() == 0) { return ""; } else { return "rule \"RuleFlowStateNode-" + process.getId() + "-" + state.getUniqueId() + "-" + key.getNodeId() + "-" + key.getToType() + "\" @Propagation(EAGER) \n" + " ruleflow-group \"DROOLS_SYSTEM\" \n" + " when \n" + " " + state.getConstraints().get(key).getConstraint() + "\n" + " then \n" + "end \n\n"; } }
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; }
+ "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(); if (priority != 0) { xmlDump.append("priority=\"" + constraint.getPriority() + "\" "); xmlDump.append("type=\"" + constraint.getType() + "\" "); String dialect = constraint.getDialect(); if (dialect != null && !"".equals(dialect)) { xmlDump.append("dialect=\"" + dialect + "\" "); String constraintString = constraint.getConstraint(); if (constraintString != null) { xmlDump.append(">" + XmlDumper.replaceIllegalChars(constraintString) + "</constraint>" + EOL);