org.apache.oodt.cas.workflow.engine
Interface WorkflowEngine

All Known Implementing Classes:
NonBlockingThreadPoolWorkflowEngine, ThreadPoolWorkflowEngine

public interface WorkflowEngine

Version:
$Revision$

The engine that executes and monitors WorkflowInstances, which are the physical executing representation of the abtract Workflows provided.

Author:
mattmann

Field Summary
static String X_POINT_ID
           
 
Method Summary
 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.
 org.apache.oodt.cas.metadata.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 setWorkflowManagerUrl(URL url)
          Sets a pointer to the Workflow Manager that this WorkflowEngine belongs to.
 WorkflowInstance startWorkflow(Workflow workflow, org.apache.oodt.cas.metadata.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, org.apache.oodt.cas.metadata.Metadata met)
          Updates the Metadata context for the WorkflowInstance identified by the given workflowInstId
 

Field Detail

X_POINT_ID

static final String X_POINT_ID
Method Detail

startWorkflow

WorkflowInstance startWorkflow(Workflow workflow,
                               org.apache.oodt.cas.metadata.Metadata metadata)
                               throws EngineException

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.

Parameters:
workflow - The abstract representation of the Workflow to start.
metadata - Any metadata that needs to be shared between the tasks in the WorkflowInstance.
Returns:
A WorkflowInstance which can be used to monitor the execution of the Workflow through the Engine.
Throws:
EngineException - If any error occurs.

stopWorkflow

void stopWorkflow(String workflowInstId)
Stops the WorkflowInstance identified by the given workflowInstId.

Parameters:
workflowInstId - The identifier of the WorkflowInstance to stop.

pauseWorkflowInstance

void pauseWorkflowInstance(String workflowInstId)

Pauses the WorkflowInstance specified by its workflowInstId.

Parameters:
workflowInstId - The ID of the Workflow Instance to pause.

resumeWorkflowInstance

void resumeWorkflowInstance(String workflowInstId)

Resumes Execution of the specified WorkflowInstance identified by its workflowInstId.

Parameters:
workflowInstId - The ID of the WorkflowInstance to resume.

getInstanceRepository

WorkflowInstanceRepository getInstanceRepository()
Gets the WorkflowInstanceRepository used by this WorkflowEngine.

Returns:
The WorkflowInstanceRepository used by this WorkflowEngine.

updateMetadata

boolean updateMetadata(String workflowInstId,
                       org.apache.oodt.cas.metadata.Metadata met)
Updates the Metadata context for the WorkflowInstance identified by the given workflowInstId

Parameters:
workflowInstId - Identifies the WorkflowInstance whose Metadata context will be updated.
met - The new Metadata context.
Returns:
true if the update was successful, false otherwise.

setWorkflowManagerUrl

void setWorkflowManagerUrl(URL url)
Sets a pointer to the Workflow Manager that this WorkflowEngine belongs to.

Parameters:
url - The URL pointer to the Workflow Manager that this WorkflowEngine belongs to.

getWallClockMinutes

double getWallClockMinutes(String workflowInstId)
Gets the amount of wall clock minutes that a particular WorkflowInstance (identified by its workflowInst) has been executing. This includes time spent QUEUED, time spent WAITING, throughout its entire lifecycle.

Parameters:
workflowInstId - The identifier of the WorkflowInstance to measure wall clock time for.
Returns:
The amount of wall clock minutes that a particular WorkflowInstance has been executing for.

getCurrentTaskWallClockMinutes

double getCurrentTaskWallClockMinutes(String workflowInstId)
Gets the amount of wall clock minutes that the particular WorkflowTask within a WorkflowInstance has been executing for.

Parameters:
workflowInstId - The identifier of the WorkflowInstance to measure wall clock time for its current WorkflowTask.
Returns:
The amount of wall clock minutes that a particular WorkflowInstance's current WorkflowTask has been executing for.

getWorkflowInstanceMetadata

org.apache.oodt.cas.metadata.Metadata getWorkflowInstanceMetadata(String workflowInstId)
Gets the Metadata associated with the WorkflowInstance identified by the given identifier.

Parameters:
workflowInstId - The identifier of the WorkflowInstance to obtain the Metadata for.
Returns:
The Metadata shared context of the WorkflowInstance with the given identifier.


Copyright © 1999-2011 Apache OODT. All Rights Reserved.