anchor.diff:  		  }
   }
   
  -function executeGetCountQuery(queryId,executionLogId)
  -{
  -	var ID=queryId;//document.getElementById("selectedqueryId_"+queryId).value;
  -	//var identifier=(document.getElementById("selectedqueryId_"+queryId).childNode).value;
  +function executeGetCountQuery(queryTitle,executionLogId)
  +{
  +	if(document.getElementById("isdone").value=='false')
  +	{
  +		var rows=document.getElementById("table1").rows.length;
  +		var operators="";
  +		var workflowName=document.getElementById("name").value;
  +		var operands="";
  +		var workflowName=document.getElementById("name").value;
  +		var identifier="";
  +		var displayQueryTitle="";
  +		for(i=0;i<rows;i++)
  +		{
  +			operands=operands+document.getElementById("operands_"+i).value+",";
  +			operators=operators+document.getElementById("operators_"+i).value+",";
  +			displayQueryTitle=displayQueryTitle+document.getElementById("displayQueryTitle_"+i).value+",";
  +			
  +			var title=document.getElementById("identifier_"+i);
  +			var object=title.parentNode;
  +			var tdChildCollection=object.getElementsByTagName('input');
  +			var queryId=tdChildCollection[2].id;
  +			
  +			identifier=identifier+document.getElementById(queryId).value+",";
  +		}
  +		var url="SaveWorkflowAjaxHandler.do?operands="+operands+"&operators="+operators+"&workflowName="+workflowName+"&displayQueryTitle="+displayQueryTitle+"&workflowId="+document.getElementById("id").value+"&queryTitle="+queryTitle+"&identifier="+identifier;
  +
  +		var request=newXMLHTTPReq();
  +		if(request == null)
  +		{
  +			alert ("Your browser does not support AJAX!");
  +			return;
  +		}
  +		var handlerFunction = getReadyStateHandler(request,responseHandler,true); 
  +		request.onreadystatechange = handlerFunction; 
  +		request.open("POST",url,true);    
  +		request.setRequestHeader("Content-Type","application/x-www-form-urlencoded");	
  +		request.send("");
  +
  +	}
  +	else
  +	{
  +		var nameIdentifier=document.getElementsByName("identifier");
  +		var numOfRows =nameIdentifier.length;
  +			for(var count = 0; count < numOfRows; count++)
  +			{
  +				var title=document.getElementById("identifier_"+count);
  +				if(title.value==queryTitle)
  +				{
  +							var object=title.parentNode;
  +							var tdChildCollection=object.getElementsByTagName('input');
  +							var queryId=tdChildCollection[2].id;//object.childNodes[0].id;//object.id;
  +							
  +							workflowExecuteGetCountQuery(document.getElementById(queryId).value,executionLogId);
  +				}
  +			}
  +	}
  +
  +}
  +
  +function responseHandler(response)
  +{
  +	var jsonResponse = eval('('+ response+')');
  +    var hasValue = false;
  +
  +		//set error message 
  +	 if(jsonResponse.errormessage!=null)
  +     {
  +           document.getElementById("errormessage").innerHTML=jsonResponse.errormessage;
  +	 }
  +
  +	//set workflow id 
  +	 if(jsonResponse.workflowId!="")
  +     {
  +		 document.getElementById("id").value=jsonResponse.workflowId;
  +		  document.getElementById("operation").value="edit";
  +
  +	 }
  +	 if((jsonResponse.workflowId!=null||jsonResponse.workflowId!="")&&(jsonResponse.errormessage==null||
  +		jsonResponse.errormessage==""))
  +	{
  +		document.getElementById("isdone").value=true;
  +	   
  +	}
  +
  +
  +	//set the name identifier mapping 
  +	if(jsonResponse.executionQueryResults!=null)
  +	  {
  +		 var num = jsonResponse.executionQueryResults.length; 
  +			for(var i=0;i<num;i++)
  +			{
  +				 var queryTitle = jsonResponse.executionQueryResults[i].queryTitle;
  +
  +
  +				var nameIdentifier=document.getElementsByName("identifier");
  +				var numOfRows =nameIdentifier.length;
  +				for(var count = 0; count < numOfRows; count++)
  +				{
  +					var title=document.getElementById("identifier_"+count);
  +					if(title.value==queryTitle)
  +					{
  +						var object=title.parentNode;
  +						var tdChildCollection=object.getElementsByTagName('input');
  +
  +						var queryId=tdChildCollection[2].id;
  +						document.getElementById(queryId).value=jsonResponse.executionQueryResults[i].queryId;
  +						document.getElementById(queryId).id="queryIdForRow_"+jsonResponse.executionQueryResults[i].queryId;
  +					
  +					}
  +				}
  +
  +				
  +					if((jsonResponse.workflowId!=null||jsonResponse.workflowId!="")&&(jsonResponse.errormessage==null||
  +						jsonResponse.errormessage==""))
  +					{
  +					
  +					   if(jsonResponse.queryTitle!=null&&jsonResponse.queryTitle==queryTitle)
  +					   {
  +							workflowExecuteGetCountQuery(jsonResponse.executionQueryResults[i].queryId,0);
  +						
  +					   }
  +					}
  +
  +			}
  +	   }
  +
  +}
  +
  +function workflowExecuteGetCountQuery(queryId,executionLogId)
  +{
  +
   	var projectId=document.getElementById("selectedProject").value;
  -	var url="WorkflowAjaxHandler.do?operation=execute&queryId="+queryId+'&state='+'start'+"&ID="+ID+"&executionLogId="+executionLogId+"&selectedProject="+projectId;
  +	var url="WorkflowAjaxHandler.do?operation=execute&state=start&executionLogId="+executionLogId+"&selectedProject="+projectId+"&workflowId="+document.getElementById("id").value+"&queryId="+queryId;
   	
   
   	var request=newXMLHTTPReq();
  
positive.code: 										<td class="content_txt">
  											
  											<input type="hidden" name="selectedqueryId" id="selectedqueryId_${queryIndex}" value="${workflowForm.selectedqueryId[queryIndex]}"/>						
  											<input type="hidden" name="identifier" id="identifier_${workflowForm.identifier[queryIndex]}" value="${workflowForm.identifier[queryIndex]}"/>
  
  										</td>
  										<td width="100">
  										<table >
  										<tbody>
  										<tr>
  										  <logic:equal name="query_type_data" value="${qtype}">
  										  <td width="30">
  											<html:link styleId="execute_${queryIndex}" href="javascript:executeGetDataQuery('${workflowForm.identifier[queryIndex]}')" styleClass="bluelink"
  											>
  												View Results
  											</html:link>
  										</td>
  										</logic:equal>
  										
  										<logic:notEqual name="query_type_data" value="${qtype}">
  										<td>
  											<html:link styleId="execute_${queryIndex}" href="javascript:executeGetCountQuery('${workflowForm.identifier[queryIndex]}','0')" styleClass="bluelink"
  											>
  												Execute
  											</html:link>
  										</td>
  										</logic:notEqual>
  										<td>
  											<html:hidden property="operands" styleId="operands_${queryIndex}"  value="${workflowForm.operands[queryIndex]}"/>
  											<html:hidden property="operators" styleId="operators_${queryIndex}" value="${workflowForm.operators[queryIndex]}"/>
  											<html:hidden property="displayQueryType" styleId="displayQueryType_${queryIndex}" value="${workflowForm.displayQueryType[queryIndex]}"/>
  										</td>
  											<td>
  											<html:link styleId="delete_${queryIndex}" href="javascript:deleteWorkflowItem(${queryIndex})" styleClass="bluelink">
  
negative.code: <html:hidden property="forwardTo"/>
  <c:set var="query_type_data" value="<%=qType_GetData%>" scope="page"/>
  <c:set var="query_type_count" value="<%=qType_GetCount%>" scope="page"/>
  <input type="hidden" name="isdone" value="true" id="isdone">
   <input type="button" name="btn" id="btn" onclick="updateUI()" style="display:none">
  
  <table width="99%" border="0" valign="top"  cellpadding="0" cellspacing="0" style="padding-left:10px;">
  