protected void validateAddNode(Node node) { super.validateAddNode(node); StartNode startNode = getStart(null); if ((node instanceof StartNode) && (startNode != null && startNode.getTriggers() == null && startNode.getTimer() == null)) { // ignore start nodes that are event based if ((((StartNode) node).getTriggers() == null || ((StartNode) node).getTriggers().isEmpty()) && ((StartNode) node).getTimer() == null) { throw new IllegalArgumentException( "A RuleFlowProcess cannot have more than one start node!"); } } }
public void internalStart(String trigger) { StartNode startNode = getRuleFlowProcess().getStart(trigger); if (startNode != null) { ((NodeInstance) getNodeInstance(startNode)).trigger(null, null); } else if (!getRuleFlowProcess().isDynamic()) { throw new IllegalArgumentException("There is no start node that matches the trigger " + (trigger == null ? "none" : trigger)); } // activate ad hoc fragments if they are marked as such List<Node> autoStartNodes = getRuleFlowProcess().getAutoStartNodes(); autoStartNodes .forEach(austoStartNode -> signalEvent(austoStartNode.getName(), null)); }
protected void validateAddNode(Node node) { super.validateAddNode(node); StartNode startNode = getStart(null); if ((node instanceof StartNode) && (startNode != null && startNode.getTriggers() == null && startNode.getTimer() == null)) { // ignore start nodes that are event based if ((((StartNode) node).getTriggers() == null || ((StartNode) node).getTriggers().isEmpty()) && ((StartNode) node).getTimer() == null) { throw new IllegalArgumentException( "A RuleFlowProcess cannot have more than one start node!"); } } }
public void internalStart(String trigger) { StartNode startNode = getRuleFlowProcess().getStart(trigger); if (startNode != null) { ((NodeInstance) getNodeInstance(startNode)).trigger(null, null); } else if (!getRuleFlowProcess().isDynamic()) { throw new IllegalArgumentException("There is no start node that matches the trigger " + (trigger == null ? "none" : trigger)); } // activate ad hoc fragments if they are marked as such List<Node> autoStartNodes = getRuleFlowProcess().getAutoStartNodes(); autoStartNodes .forEach(austoStartNode -> signalEvent(austoStartNode.getName(), null)); }
boolean done = processNodes("", process.getStart(null), "", cases, ongoingCases); if (!done) { if (ongoingCases.size() == 1) {