errors.add(new ProcessValidationErrorImpl(process,
"Dynamic node '" + node.getName() + "' [" + node.getId() + "] has no outgoing connection"));
}
validateNodes(dynamicNode.getNodes(), errors, process);
} else if (node instanceof CompositeNode) {
final CompositeNode compositeNode = (CompositeNode) node;
for (Map.Entry<String, NodeAndType> inType: compositeNode.getLinkedIncomingNodes().entrySet()) {
if (compositeNode.getIncomingConnections(inType.getKey()).size() == 0 && !acceptsNoIncomingConnections(node)) {
errors.add(new ProcessValidationErrorImpl(process,
"Composite node '" + node.getName() + "' [" + node.getId() + "] has no incoming connection for type " + inType.getKey()));
}
if (inType.getValue().getNode() == null && !acceptsNoOutgoingConnections(node)) {
errors.add(new ProcessValidationErrorImpl(process,
"Composite node '" + node.getName() + "' [" + node.getId() + "] has invalid linked incoming node for type " + inType.getKey()));
}
}
for (Map.Entry<String, NodeAndType> outType: compositeNode.getLinkedOutgoingNodes().entrySet()) {
if (compositeNode.getOutgoingConnections(outType.getKey()).size() == 0) {
errors.add(new ProcessValidationErrorImpl(process,
"Composite node '" + node.getName() + "' [" + node.getId() + "] has no outgoing connection for type " + outType.getKey()));
}
if (outType.getValue().getNode() == null) {
errors.add(new ProcessValidationErrorImpl(process,
"Composite node '" + node.getName() + "' [" + node.getId() + "] has invalid linked outgoing node for type " + outType.getKey()));
}
}
validateNodes(compositeNode.getNodes(), errors, process);
} else if (node instanceof EventNode) {
final EventNode eventNode = (EventNode) node;
if (eventNode.getEventFilters().size() == 0) {
errors.add(new ProcessValidationErrorImpl(process,
"Event node '" + node.getName() + "' [" + node.getId() + "] should specify an event type"));