WRENCH  1.10
Cyberinfrastructure Simulation Workbench
Overview Installation Getting Started WRENCH 101 WRENCH 102
WorkflowJob.h
1 
10 #ifndef WRENCH_WORKFLOWJOB_H
11 #define WRENCH_WORKFLOWJOB_H
12 
13 
14 #include <string>
15 #include <stack>
16 #include <map>
17 #include <memory>
18 
19 //#include "wrench/services/compute/ComputeService.h"
20 
21 namespace wrench {
22 
23 
24  class Workflow;
25  class ComputeService;
26 
27  /***********************/
29  /***********************/
30 
34  class WorkflowJob {
35 
36  public:
37 
38 // /** @brief Job types */
39 // enum Type {
40 // /** @brief A standard job that can be submitted directly to a ComputeService for execution */
41 // STANDARD,
42 // /** @brief A pilot job that can be submitted to a ComputeService and that, once started, will act as a ComputeService
43 // * (likely a bare_metal) with an expiration date */
44 // PILOT
45 // };
46 
47 // Type getType();
48 
49 // std::string getTypeAsString();
50 
51  std::string getName();
52 
53  double getSubmitDate();
54  double getEndDate();
55 
56  /***********************/
58  /***********************/
59 
60  std::string popCallbackMailbox();
61 
62  void pushCallbackMailbox(std::string);
63 
64  std::string getCallbackMailbox();
65 
66  std::string getOriginCallbackMailbox();
67 
68  void setParentComputeService(std::shared_ptr<ComputeService> compute_service);
69 
70  std::shared_ptr<ComputeService> getParentComputeService();
71 
72  std::map<std::string, std::string> getServiceSpecificArguments();
73 
74  virtual unsigned long getPriority();
75 
76  virtual ~WorkflowJob();
77 
78  protected:
79 
80  friend class JobManager;
81 
82  WorkflowJob();
83 
84  unsigned long getNewUniqueNumber();
85 
87  std::map<std::string, std::string> service_specific_args;
88 
90  std::stack<std::string> callback_mailbox_stack;
92  Workflow *workflow;
94  std::string name;
96  double submit_date;
98  double end_date;
100  std::shared_ptr<ComputeService> parent_compute_service;
101 
102 
103  private:
104 // bool forward_notification_to_original_source;
105 
106  /***********************/
108  /***********************/
109  };
110 
111  /***********************/
113  /***********************/
114 
115 };
116 
117 
118 #endif //WRENCH_WORKFLOWJOB_H
wrench::JobManager
A helper daemon (co-located with and explicitly started by a WMS), which is used to handle all job ex...
Definition: JobManager.h:48
wrench::WorkflowJob::getEndDate
double getEndDate()
Get the date at which the job ended (<0 means "never submitted")
Definition: WorkflowJob.cpp:135
wrench::WorkflowJob::getSubmitDate
double getSubmitDate()
Get the date at which the job was last submitted (<0 means "never submitted")
Definition: WorkflowJob.cpp:127
wrench
Definition: Alarm.cpp:20
wrench::Workflow
A workflow (to be executed by a WMS)
Definition: Workflow.h:34
wrench::WorkflowJob
Abstraction of a job used for executing tasks in a Workflow.
Definition: WorkflowJob.h:34
wrench::WorkflowJob::getName
std::string getName()
Get the job's name.
Definition: WorkflowJob.cpp:44