anchor.diff:  
   	circles[circles.length - 1].joint(cEnd, fsa.arrow).registerForever(all);
   
  -
  -		}
  -        , cache: false
  -        , contentType: false
  -        , processData: false
  -    });
  -};
  +}
   
   $(function() {
   
   	$("#submitButton").click(submitButtonClicked);
  -	Joint.paper("myfsa", 1000, 200);
  -	var fsa = Joint.dia.fsa;
  -//	var s0 = fsa.StartState.create({ position: {x: 50, y: 50} });
  -	var se = fsa.EndState.create({ position: {x: 450, y: 150} });
  -	var s1 = fsa.State.create({ position: {x: 120, y: 120}, label: "state 1" });
  -	var s2 = fsa.State.create({ position: {x: 300, y: 50}, label: "state 2" });
  -
  -//	var all = [s0, s1, s2, se];
  -	var all = [s1, s2, se];
  -//	s0.joint(s1, fsa.arrow).registerForever(all);
  -	s1.joint(s2, fsa.arrow).registerForever(all);
  -	s2.joint(se, fsa.arrow).registerForever(all);
  -
  -//	var json = {"any":null,"credentials":null,"decisionOrForkOrJoin":[{"anyUnderChoice":null,"anyUnderSequence":null,"cred":null,"error":{"to":"fail"},"fs":null,"java":{"archive":[],"arg":["Hello","Oozie!"],"captureOutput":null,"configuration":{"property":[{"description":null,"name":"mapred.job.queue.name","value":"${queueName}"}]},"file":[],"javaOpt":[],"javaOpts":null,"jobTracker":"${jobTracker}","jobXml":[],"mainClass":"org.apache.oozie.example.DemoJavaMain","nameNode":"${nameNode}","prepare":null},"mapReduce":null,"name":"java-node","ok":{"to":"end"},"pig":null,"retryInterval":null,"retryMax":null,"subWorkflow":null},{"message":"Java failed, error","name":"fail"}],"end":{"name":"end"},"global":null,"name":"java-main-wf","parameters":null,"start":{"to":"java-node"}};
   
   }); // End of JQuery Initialization
   
  
positive.code:         , data: formData
  		, complete: function(jqXHR, textStatus){
  			var res = $.parseJSON(jqXHR.responseText);
  
  
  	Joint.paper("myfsa1", 1000, 200);
  	var fsa = Joint.dia.fsa;
  
  	var cStart = fsa.State.create({ position: {x: 120, y: 120}, label: "Start" });
  	var cEnd = fsa.State.create({ position: {x: 500, y: 120}, label: "End" });
  	var circles = [];
  	var xPos = 300;
  
  	var all = [cStart, cEnd];
  	for(var i = 0; i < res.decisionOrForkOrJoin.length; i++){
  		var circle;
  			circle = fsa.State.create({ position: {x: xPos, y: 50}, label: res.decisionOrForkOrJoin[i].name });
  //		if(res.decisionOrForkOrJoin[i].java !=null){
  //			var java = res.decisionOrForkOrJoin[i].java;
  //		}
  
  		all.push(circle);
  		circles.push(circle);
  		xPos += 100;
  	}
  //	var s2 = fsa.State.create({ position: {x: 300, y: 50}, label: "state 2" });
  
  	
  	cStart.joint(circles[0], fsa.arrow).registerForever(all);
  
  
negative.code: 		
  	</div>
  
  	<div id="myfsa1"></div>
  
  
  
  </body>
  