private void printTransitions(StringBuilder graphText, List<Node> unvisitedNodes, List<Link> unfollowedLinks,
			List<Link> toFollow, Node nodeToFinishFollowingAt) {
		for (Iterator<Link> iterator = toFollow.iterator(); iterator.hasNext();) {
			Link l = iterator.next();
			if (l.hasTransitionSet()) {
				// capture the target of this link as a simple transition
				String transitionName = l.getTransitionName();
				Node transitionTarget = findNodeById(l.to);
				String transitionTargetName = transitionTarget.name;
				if (transitionTargetName.equals("FAIL")) {
					transitionTargetName = Transition.FAIL;
				}
				else if (transitionTargetName.equals("END")) {
					transitionTargetName = Transition.END;
				}
				graphText.append(" | ").append(transitionName).append(" = ").append(transitionTargetName);
				unfollowedLinks.remove(l);
				// We only want to consider it 'visited' if this node doesn't go anywhere after this
				List<Link> linksFromTheTransitionTarget = findLinksFrom(transitionTarget, false);
				if (linksFromTheTransitionTarget.isEmpty()
						|| allLinksTarget(linksFromTheTransitionTarget, nodeToFinishFollowingAt)) {
					unvisitedNodes.remove(transitionTarget);
				}
				iterator.remove();
			}
		}
	}
Walk a specified link to see if it ever hits the candidate node.

@param link points to the head of a chain of nodes
@param candidate the node possibly found on the chain of nodes
@return true if the candidate is found down the specified chain
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/job/dsl/Graph.java