private int buildTransition(int fromJobNodeId, String jobExitStatus, String targetJobName) {
			boolean createdNewTarget = false;
			if (targetJobName.equals(Transition.FAIL)) {
				targetJobName = "FAIL";
			}
			else if (targetJobName.equals(Transition.END)) {
				targetJobName = "END";
			}
			Node targetNode = contexts.peek().nodesSharedInFlow.get(targetJobName);//scope.peek().get(targetJobName);
			int transitionTargetId;
			if (targetNode == null) {
				transitionTargetId = id++;
				targetNode = new Node(Integer.toString(transitionTargetId), targetJobName);
				nodes.add(targetNode);
				createdNewTarget = true;
			}
			else {
				transitionTargetId = Integer.parseInt(targetNode.id);
			}
			links.add(new Link(fromJobNodeId, transitionTargetId, jobExitStatus));
			//scope.peek().put(targetJobName, targetNode);
			contexts.peek().nodesSharedInFlow.put(targetJobName, targetNode);
			return createdNewTarget ? transitionTargetId : -1;
		}
Construct a transition link, and possibly a new node if a suitable candidate does not already exist.
If a transition has already referenced a particular job in the same flow, reuse it. If not then
create a new node and link to it.

@param fromJobNodeId the id of the jobnode from which the transition is occurring
@param jobExitStatus the job exit status attached to this transition
@param targetJobName the transition target
@return the ID of the transition target node if a new node created, otherwise -1
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/job/dsl/JobSpecification.java