Project

General

Profile

« Previous | Next » 

Revision 4971

Added by daigle almost 15 years ago

Beef up comments

View differences:

WorkflowJob.java
42 42
public class WorkflowJob implements InterruptableJob {
43 43
	
44 44
	private static Logger logMetacat = Logger.getLogger(WorkflowJob.class);
45
	
45
    	
46
	/**
47
	 * Required method that is called when the job is run by the scheduler.
48
	 * 
49
	 * @param executionContext
50
	 *            the context information for this job
51
	 */
46 52
	public void execute(JobExecutionContext executionContext) throws JobExecutionException {
47 53
		try {
54
			// have to be able to get the job detail
48 55
			JobDetail jobDetail = executionContext.getJobDetail();
49 56
			if (jobDetail == null) {
50 57
				throw new JobExecutionException("WorkflowJob.execute - Could not get job detail from execution context"); 
51 58
			}
52 59
			
60
			// have to be able to get the job data map from the job detail
53 61
			JobDataMap jobDataMap = jobDetail.getJobDataMap();
54 62
			if (jobDataMap == null) {
55 63
				throw new JobExecutionException("WorkflowJob.execute - Could not get job data map from job detail"); 
56 64
			}
57 65
			
66
			// the kar lsid must be part of the job data map
58 67
			String karLSID = jobDataMap.getString("karid");
59 68
			if (karLSID == null) {
60 69
				throw new JobExecutionException("WorkflowJob.execute - Could not get kar LSID from job data map");
61 70
			}
62 71
			
72
			// Locate service
63 73
			logMetacat.debug("WorkflowJob.execute - Getting serviceLocator");
64 74
			KeplerWebServiceLocator serviceLocator = new KeplerWebServiceLocator();
65 75
			
76
			// get endpoint service
66 77
			logMetacat.debug("WorkflowJob.execute - Getting service");
67 78
			KeplerWebServicePortType serviceEndpoint = serviceLocator.getKeplerWebServiceHttpSoap11Endpoint();
68 79
			
80
			// call execute against remote endpoint
69 81
			logMetacat.debug("WorkflowJob.execute - Executing with kar lsid:" + karLSID);
70 82
			String status = serviceEndpoint.execute(karLSID);
71 83
			//String status = serviceEndpoint.getStatus(karLSID);		

Also available in: Unified diff