public class PrioritizedQueueBasedWorkflowEngine extends Object implements WorkflowEngine
X_POINT_ID
Constructor and Description |
---|
PrioritizedQueueBasedWorkflowEngine(WorkflowInstanceRepository repo,
PrioritySorter prioritizer,
WorkflowLifecycleManager lifecycle,
EngineRunner runner,
WorkflowRepository modelRepo,
long querierWaitSeconds) |
Modifier and Type | Method and Description |
---|---|
double |
getCurrentTaskWallClockMinutes(String workflowInstId)
Gets the amount of wall clock minutes that the particular
WorkflowTask within a WorkflowInstance has been executing
for. |
WorkflowInstanceRepository |
getInstanceRepository()
Gets the
WorkflowInstanceRepository used by this
WorkflowEngine . |
double |
getWallClockMinutes(String workflowInstId)
Gets the amount of wall clock minutes that a particular
WorkflowInstance (identified by its workflowInst )
has been executing. |
Metadata |
getWorkflowInstanceMetadata(String workflowInstId)
Gets the
Metadata associated with the WorkflowInstance
identified by the given identifier. |
void |
pauseWorkflowInstance(String workflowInstId)
Pauses the
WorkflowInstance specified by its
workflowInstId . |
void |
resumeWorkflowInstance(String workflowInstId)
Resumes Execution of the specified
WorkflowInstance identified by
its workflowInstId . |
void |
setEngineRunner(EngineRunner runner) |
void |
setWorkflowManagerUrl(URL url)
Sets a pointer to the Workflow Manager that this
WorkflowEngine
belongs to. |
WorkflowInstance |
startWorkflow(Workflow workflow,
Metadata metadata)
Starts the specified
Workflow by creating a
WorkflowInstance , and then running that instance. |
void |
stopWorkflow(String workflowInstId)
Stops the
WorkflowInstance identified by the given
workflowInstId . |
boolean |
updateMetadata(String workflowInstId,
Metadata met)
|
public PrioritizedQueueBasedWorkflowEngine(WorkflowInstanceRepository repo, PrioritySorter prioritizer, WorkflowLifecycleManager lifecycle, EngineRunner runner, WorkflowRepository modelRepo, long querierWaitSeconds)
public void setEngineRunner(EngineRunner runner)
public WorkflowInstance startWorkflow(Workflow workflow, Metadata metadata) throws EngineException
WorkflowEngine
Starts the specified Workflow
by creating a
WorkflowInstance
, and then running that instance. The started
WorkflowInstance
which is returned, will have its status updated
by the workflow engine, including its status field, and its
currentTaskId.
startWorkflow
in interface WorkflowEngine
workflow
- The abstract representation of the Workflow
to start.metadata
- Any metadata that needs to be shared between the tasks in the
WorkflowInstance
.WorkflowInstance
which can be used to monitor the
execution of the Workflow
through the Engine.EngineException
- If any error occurs.public void stopWorkflow(String workflowInstId)
WorkflowEngine
WorkflowInstance
identified by the given
workflowInstId
.stopWorkflow
in interface WorkflowEngine
workflowInstId
- The identifier of the WorkflowInstance
to stop.public void pauseWorkflowInstance(String workflowInstId)
WorkflowEngine
Pauses the WorkflowInstance
specified by its
workflowInstId
.
pauseWorkflowInstance
in interface WorkflowEngine
workflowInstId
- The ID of the Workflow Instance to pause.public void resumeWorkflowInstance(String workflowInstId)
WorkflowEngine
Resumes Execution of the specified WorkflowInstance
identified by
its workflowInstId
.
resumeWorkflowInstance
in interface WorkflowEngine
workflowInstId
- The ID of the WorkflowInstance
to resume.public WorkflowInstanceRepository getInstanceRepository()
WorkflowEngine
WorkflowInstanceRepository
used by this
WorkflowEngine
.getInstanceRepository
in interface WorkflowEngine
WorkflowInstanceRepository
used by this
WorkflowEngine
.public boolean updateMetadata(String workflowInstId, Metadata met)
WorkflowEngine
updateMetadata
in interface WorkflowEngine
workflowInstId
- Identifies the WorkflowInstance
whose Metadata
context will be updated.met
- The new Metadata
context.public void setWorkflowManagerUrl(URL url)
WorkflowEngine
WorkflowEngine
belongs to.setWorkflowManagerUrl
in interface WorkflowEngine
url
- The URL
pointer to the Workflow Manager that this
WorkflowEngine
belongs to.public double getWallClockMinutes(String workflowInstId)
WorkflowEngine
WorkflowInstance
(identified by its workflowInst
)
has been executing. This includes time spent QUEUED
, time
spent WAITING
, throughout its entire lifecycle.getWallClockMinutes
in interface WorkflowEngine
workflowInstId
- The identifier of the WorkflowInstance
to measure wall
clock time for.WorkflowInstance
has been executing for.public double getCurrentTaskWallClockMinutes(String workflowInstId)
WorkflowEngine
WorkflowTask
within a WorkflowInstance
has been executing
for.getCurrentTaskWallClockMinutes
in interface WorkflowEngine
workflowInstId
- The identifier of the WorkflowInstance
to measure wall
clock time for its current WorkflowTask
.WorkflowInstance
's current WorkflowTask
has been
executing for.public Metadata getWorkflowInstanceMetadata(String workflowInstId)
WorkflowEngine
Metadata
associated with the WorkflowInstance
identified by the given identifier.getWorkflowInstanceMetadata
in interface WorkflowEngine
workflowInstId
- The identifier of the WorkflowInstance
to obtain the
Metadata
for.Metadata
shared context of the
WorkflowInstance
with the given identifier.Copyright © 1999–2017 Apache OODT. All rights reserved.