Project

General

Profile

« Previous | Next » 

Revision 5011

Added by daigle over 15 years ago

Propagate the kar id throughout the configuration screens.

View differences:

lib/style/common/scheduleWorkflowRun.js
1
/*
2
 */
3

  
4
function getWorkflowRunSection(url, workflowId, divId) {
5
	var requestUrl = url + '?action=getScheduledWorkflow&workflowid=' + workflowId + '&qformat=' + 'sanparks';
6
	var submitResults = submitUrlIntoDiv(requestUrl, divId);
7
}
8

  
9
function showSchedulePage(workflowId, schedulePage, qformat) {
10
	url = document.URL + '/../' + workflowRunPage + '?workflowid=' + workflowId + '?qformat=' + qformat;
11
	//alert('new url: ' + url);
12
	window.location = url;
13
}
14

  
15
function scheduleWorkflowRun(url, workflowId, startTime, interval, karId) {	
16
	requestUrl = 
17
		url + '?action=scheduleWorkflow&starttime=' + startTime 
18
			+ '&interval=' + interval + '&jobparam_karId=' + karId;
19
	//alert('new url: ' + url);
20
	window.location = url;
21
}
22

  
23
	
24 0

  
src/edu/ucsb/nceas/metacat/workflow/WorkflowScheduler.java
114 114

  
115 115
			// get start time or delay.  Start time takes precedence if both exist.
116 116
			if (startTimes != null && startTimes.length > 0) {
117
				startCal = DateUtil.humanReadableToCalendar(startTimes[0], "MM/dd/yyyy HH:mm:ss z");
117
				startCal = DateUtil.humanReadableToCalendar(startTimes[0], "MM/dd/yyyy HH:mm:ss");
118 118
			} else if (delays != null && delays.length > 0) {
119 119
				startCal = schedulerService.getStartDateFromDelay(delays[0]);
120 120
			} else {
......
187 187
				}
188 188
				
189 189
				String destination = "/style/skins/" + qformat + "/" + forwardto
190
					+ "?workflowid=" + jobParams.get("workflowid");			
191
				RequestUtil.forwardRequest(request, response, destination.toString());
190
					+ "?workflowid=" + jobParams.get("workflowid") + "&karid=" 
191
					+ jobParams.get("karid");			
192
				RequestUtil.forwardRequest(request, response, destination);
192 193
			} else {
193 194
				ResponseUtil.sendSuccessXML(response, xmlResult);
194 195
			}
......
260 261
				ScheduledJobParamDAO jobParamDAO = jobDAO.getJobParam("workflowid");
261 262
				if (jobParamDAO != null) {
262 263
					workflowId = jobParamDAO.getValue();
263
				}				 
264
				}	
264 265
				
266
				// we need to include the workflow id in the forward url
267
				String karId = null;
268
				ScheduledJobParamDAO karJobParamDAO = jobDAO.getJobParam("karid");
269
				if (karJobParamDAO != null) {
270
					karId = karJobParamDAO.getValue();
271
				}
272
				
265 273
				String destination = "/style/skins/" + qformat + "/" + forwardto
266
					+ "?workflowid=" + workflowId;			
274
					+ "?workflowid=" + workflowId + "&karid=" + karId;			
267 275
				RequestUtil.forwardRequest(request, response, destination.toString());
268 276
			} else {
269 277
				ResponseUtil.sendSuccessXML(response, xmlResult);
......
336 344
					workflowId = jobParamDAO.getValue();
337 345
				}
338 346
				
347
				// we need to include the workflow id in the forward url
348
				String karId = null;
349
				ScheduledJobParamDAO karJobParamDAO = jobDAO.getJobParam("karid");
350
				if (karJobParamDAO != null) {
351
					karId = karJobParamDAO.getValue();
352
				}
353
				
339 354
				String destination = "/style/skins/" + qformat + "/" + forwardto
340
					+ "?workflowid=" + workflowId;			
355
					+ "?workflowid=" + workflowId + "&karid=" + karId;			
341 356
				RequestUtil.forwardRequest(request, response, destination.toString());
342 357
			} else {
343 358
				ResponseUtil.sendSuccessXML(response, result);

Also available in: Unified diff