1
2
3
4
5
6
7
8
9
10
11 package org.astrogrid.portal.workflow.intf;
12
13 import org.astrogrid.community.beans.v1.Account;
14 import org.astrogrid.jes.delegate.JobSummary;
15 import org.astrogrid.workflow.beans.v1.Workflow;
16 import org.astrogrid.workflow.beans.v1.execution.JobURN;
17 import org.astrogrid.workflow.beans.v1.execution.WorkflowSummaryType;
18
19 /*** A component that can execute and manage jobs
20 * @author Noel Winstanley nw@jb.man.ac.uk 01-Mar-2004
21 *
22 */
23 public interface JobExecutionService {
24 /*** submit a workflow to the job controller
25 *
26 * @param workflow workflow document to submit (contains user credentials to execute under)
27 * @return new unique identifier for the job. never null
28 * @throws WorkflowInterfaceException if job cannot be submitted
29 */
30 JobURN submitWorkflow( Workflow workflow ) throws WorkflowInterfaceException;
31
32 /***
33 * delete a job - remove all record of it from the jes store
34 * <p>does nothing at the moment
35 * @param jobURN unique identifier of the job to delete
36 */
37 void deleteJob(JobURN jobURN) throws WorkflowInterfaceException;
38 /***cancel a job - halt the execution of it
39 * <p> does nothing at the momenr
40 * @param jobURN unique identifier of the job
41 * @throws WorkflowInterfaceException
42 */
43 void cancelJob(JobURN jobURN) throws WorkflowInterfaceException;
44 /*** Retreive an annotated workflow document from the jes store
45 *
46 * @param jobURN unique job id
47 * @return workflow document, plus annotations. never null
48 * @throws WorkflowInterfaceException if document cannot be retreived.
49 */
50 Workflow readJob(JobURN jobURN) throws WorkflowInterfaceException;
51 /*** retreive list of jobs for a particular user
52 *
53 * @param account identifies a user
54 * @return array of job summaries
55 * @throws WorkflowInterfaceException
56 * @deprecated - use {@link #listJobs}
57 */
58 JobSummary[] readJobList(Account account) throws WorkflowInterfaceException;
59
60 /*** list jobs for a particulat user.
61 *
62 * @param account identifies the user
63 * @return array of workflow summaries
64 * @throws WorkflowInterfaceException
65 */
66 WorkflowSummaryType[] listJobs(Account account) throws WorkflowInterfaceException;
67
68
69 }
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95