public class WorkflowInstance extends Object
Workflow
class. WorkflowInstances have
status, and in general are data structures intended to be used as a means for
monitoring the status of an executing Workflow
.
As of Apache OODT 0.4, the internal Workflow
implementation uses
ParentChildWorkflow
, introduced as part of OODT-70, and the
PackagedWorkflowRepository. Workflow
instances given to the class
will automatically convert to ParentChildWorkflow
implementations
internally, and the existing getWorkflow()
and
setWorkflow(Workflow)
methods have been deprecated in favor of
getParentChildWorkflow()
and
setParentChildWorkflow(ParentChildWorkflow)
which will supersede
those methods, and eventually turn into their concrete implementations.
In addition, as of Apache OODT 0.4 the internal state
member
variable now uses WorkflowState
for representation. This requires the
use of WorkflowLifecycle
which has now moved from being simply a UI
utility class for the Worklow Monitor web application to actually being fully
integrated with the Workflow Manager. For backwards compatibility the
setStatus(String)
and getStatus()
methods are still
supported, but are deprecated. Developers using this class should move
towards using setState(WorkflowState)
and getState()
.Constructor and Description |
---|
WorkflowInstance()
Default Constructor.
|
WorkflowInstance(Workflow workflow,
String id,
WorkflowState state,
String currentTaskId,
Date startDate,
Date endDate,
Metadata sharedContext,
int timesBlocked,
Priority priority) |
Modifier and Type | Method and Description |
---|---|
Date |
getCreationDate()
Convenience method to format and return the
#currentTaskStartDateTimeIsoStr as a Date . |
WorkflowTask |
getCurrentTask()
Returns the currently executing
WorkflowTask
part of this instance. |
String |
getCurrentTaskEndDateTimeIsoStr()
Deprecated.
|
String |
getCurrentTaskId() |
String |
getCurrentTaskStartDateTimeIsoStr()
Deprecated.
|
Date |
getEndDate() |
String |
getEndDateTimeIsoStr()
Deprecated.
|
Date |
getFinishDate()
Convenience method to format and return the
#currentTaskEndDateTimeIsoStr as a Date . |
String |
getId() |
ParentChildWorkflow |
getParentChildWorkflow() |
Priority |
getPriority() |
Metadata |
getSharedContext() |
Date |
getStartDate() |
String |
getStartDateTimeIsoStr()
Deprecated.
|
WorkflowState |
getState() |
String |
getStatus()
Deprecated.
|
int |
getTimesBlocked() |
Workflow |
getWorkflow()
Deprecated.
|
void |
setCurrentTaskEndDateTimeIsoStr(String currentTaskEndDateTimeIsoStr)
Deprecated.
|
void |
setCurrentTaskId(String currentTaskId) |
void |
setCurrentTaskStartDateTimeIsoStr(String currentTaskStartDateTimeIsoStr)
Deprecated.
|
void |
setEndDate(Date endDate) |
void |
setEndDateTimeIsoStr(String endDateTimeIsoStr)
Deprecated.
|
void |
setId(String id) |
void |
setParentChildWorkflow(ParentChildWorkflow workflow)
Sets the Parent Child workflow.
|
void |
setPriority(Priority priority) |
void |
setSharedContext(Metadata sharedContext) |
void |
setStartDate(Date startDate) |
void |
setStartDateTimeIsoStr(String startDateTimeIsoStr)
Deprecated.
|
void |
setState(WorkflowState state) |
void |
setStatus(String status)
Deprecated.
|
void |
setTimesBlocked(int timesBlocked) |
void |
setWorkflow(Workflow workflow)
Deprecated.
|
public String getId()
public void setId(String id)
id
- the id to set@Deprecated public String getStatus()
@Deprecated public void setStatus(String status)
WorkflowState
to the provided status.status
- The provided status to set.public WorkflowState getState()
public void setState(WorkflowState state)
state
- the state to set@Deprecated public Workflow getWorkflow()
@Deprecated public void setWorkflow(Workflow workflow)
workflow
- the workflow to setpublic ParentChildWorkflow getParentChildWorkflow()
public void setParentChildWorkflow(ParentChildWorkflow workflow)
workflow
- The workflow to set.public String getCurrentTaskId()
public void setCurrentTaskId(String currentTaskId)
currentTaskId
- the currentTaskId to setpublic Metadata getSharedContext()
public void setSharedContext(Metadata sharedContext)
sharedContext
- the sharedContext to setpublic Priority getPriority()
public void setPriority(Priority priority)
priority
- the priority to setpublic Date getCreationDate()
#currentTaskStartDateTimeIsoStr
as a Date
.Date
representation of
getCurrentTaskStartDateTimeIsoStr()
.public Date getFinishDate()
#currentTaskEndDateTimeIsoStr
as a Date
.Date
representation of
getCurrentTaskEndDateTimeIsoStr()
.public Date getStartDate()
public void setStartDate(Date startDate)
startDate
- the startDate to setpublic Date getEndDate()
public void setEndDate(Date endDate)
endDate
- the endDate to set@Deprecated public String getEndDateTimeIsoStr()
@Deprecated public void setEndDateTimeIsoStr(String endDateTimeIsoStr)
endDateTimeIsoStr
- the endDateTimeIsoStr to set@Deprecated public String getStartDateTimeIsoStr()
@Deprecated public void setStartDateTimeIsoStr(String startDateTimeIsoStr)
startDateTimeIsoStr
- the startDateTimeIsoStr to set@Deprecated public String getCurrentTaskEndDateTimeIsoStr()
@Deprecated public void setCurrentTaskEndDateTimeIsoStr(String currentTaskEndDateTimeIsoStr)
currentTaskEndDateTimeIsoStr
- the currentTaskEndDateTimeIsoStr to set@Deprecated public String getCurrentTaskStartDateTimeIsoStr()
@Deprecated public void setCurrentTaskStartDateTimeIsoStr(String currentTaskStartDateTimeIsoStr)
currentTaskStartDateTimeIsoStr
- the currentTaskStartDateTimeIsoStr to setpublic WorkflowTask getCurrentTask()
WorkflowTask
part of this instance.WorkflowTask
part of this instance.public int getTimesBlocked()
public void setTimesBlocked(int timesBlocked)
timesBlocked
- the timesBlocked to setCopyright © 1999-2014 Apache OODT. All Rights Reserved.