private String createStateRules(Process process, StateNode state) { String result = ""; for (Map.Entry<ConnectionRef, Constraint> entry: state.getConstraints().entrySet()) { result += createStateRule(process, state, entry.getKey(), entry.getValue()); } return result; }
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"; } }
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();
private String createStateRules(Process process, StateNode state) { String result = ""; for (Map.Entry<ConnectionRef, Constraint> entry: state.getConstraints().entrySet()) { result += createStateRule(process, state, entry.getKey(), entry.getValue()); } return result; }
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"; } }
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();