public class ThreadPoolWorkflowEngine extends Object implements WorkflowEngine, WorkflowStatus
X_POINT_IDCREATED, ERROR, FINISHED, METADATA_MISSING, PAUSED, QUEUED, RESMGR_SUBMIT, STARTED| Constructor and Description | 
|---|
| ThreadPoolWorkflowEngine(WorkflowInstanceRepository instRep,
                        int queueSize,
                        int maxPoolSize,
                        int minPoolSize,
                        long threadKeepAliveTime,
                        boolean unlimitedQueue,
                        URL resUrl)Default Constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| double | getCurrentTaskWallClockMinutes(String workflowInstId)Gets the amount of wall clock minutes that the particular
  WorkflowTaskwithin aWorkflowInstancehas been executing
 for. | 
| protected static double | getCurrentTaskWallClockMinutes(WorkflowInstance inst) | 
| WorkflowInstanceRepository | getInstanceRepository()Gets the  WorkflowInstanceRepositoryused by thisWorkflowEngine. | 
| double | getWallClockMinutes(String workflowInstId)Gets the amount of wall clock minutes that a particular
  WorkflowInstance(identified by itsworkflowInst)
 has been executing. | 
| protected static double | getWallClockMinutes(WorkflowInstance inst) | 
| Metadata | getWorkflowInstanceMetadata(String workflowInstId)Gets the  Metadataassociated with theWorkflowInstanceidentified by the given identifier. | 
| void | pauseWorkflowInstance(String workflowInstId)
 Pauses the  WorkflowInstancespecified by itsworkflowInstId. | 
| void | resumeWorkflowInstance(String workflowInstId)
 Resumes Execution of the specified  WorkflowInstanceidentified by
 itsworkflowInstId. | 
| void | setWorkflowManagerUrl(URL url)Sets a pointer to the Workflow Manager that this  WorkflowEnginebelongs to. | 
| WorkflowInstance | startWorkflow(Workflow workflow,
             Metadata metadata)
 Starts the specified  Workflowby creating aWorkflowInstance, and then running that instance. | 
| void | stopWorkflow(String workflowInstId)Stops the  WorkflowInstanceidentified by the givenworkflowInstId. | 
| boolean | updateMetadata(String workflowInstId,
              Metadata met) | 
public ThreadPoolWorkflowEngine(WorkflowInstanceRepository instRep, int queueSize, int maxPoolSize, int minPoolSize, long threadKeepAliveTime, boolean unlimitedQueue, URL resUrl)
instRep - The WorkflowInstanceRepository to be used by this engine.queueSize - The size of the queue that the workflow engine should use
          (irrelevant if unlimitedQueue is set to true)maxPoolSize - The minimum thread pool size.minPoolSize - The maximum thread pool size.threadKeepAliveTime - The amount of minutes that each thread in the pool should be kept
          alive.unlimitedQueue - Whether or not to use a queue whose bounds are dictated by the
          physical memory of the underlying hardware.resUrl - A URL pointer to a resource manager. If this is set Tasks will be
          wrapped as Resource Manager Jobs and sent through the
          Resource Manager. If this parameter is not set, local execution
          (the default) will be usedpublic void pauseWorkflowInstance(String workflowInstId)
WorkflowEngine
 Pauses the WorkflowInstance specified by its
 workflowInstId.
 
pauseWorkflowInstance in interface WorkflowEngineworkflowInstId - 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 WorkflowEngineworkflowInstId - The ID of the WorkflowInstance to resume.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 WorkflowEngineworkflow - 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 WorkflowInstanceRepository getInstanceRepository()
WorkflowEngineWorkflowInstanceRepository used by this
 WorkflowEngine.getInstanceRepository in interface WorkflowEngineWorkflowInstanceRepository used by this
         WorkflowEngine.public boolean updateMetadata(String workflowInstId, Metadata met)
WorkflowEngineupdateMetadata in interface WorkflowEngineworkflowInstId - Identifies the WorkflowInstance whose Metadata
            context will be updated.met - The new Metadata context.public void setWorkflowManagerUrl(URL url)
WorkflowEngineWorkflowEngine
 belongs to.setWorkflowManagerUrl in interface WorkflowEngineurl - The URL pointer to the Workflow Manager that this
            WorkflowEngine belongs to.public void stopWorkflow(String workflowInstId)
WorkflowEngineWorkflowInstance identified by the given
 workflowInstId.stopWorkflow in interface WorkflowEngineworkflowInstId - The identifier of the WorkflowInstance to stop.public double getCurrentTaskWallClockMinutes(String workflowInstId)
WorkflowEngineWorkflowTask within a WorkflowInstance has been executing
 for.getCurrentTaskWallClockMinutes in interface WorkflowEngineworkflowInstId - 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)
WorkflowEngineMetadata associated with the WorkflowInstance
 identified by the given identifier.getWorkflowInstanceMetadata in interface WorkflowEngineworkflowInstId - The identifier of the WorkflowInstance to obtain the
            Metadata for.Metadata shared context of the
         WorkflowInstance with the given identifier.public double getWallClockMinutes(String workflowInstId)
WorkflowEngineWorkflowInstance (identified by its workflowInst)
 has been executing. This includes time spent QUEUED, time
 spent WAITING, throughout its entire lifecycle.getWallClockMinutes in interface WorkflowEngineworkflowInstId - The identifier of the WorkflowInstance to measure wall
            clock time for.WorkflowInstance has been executing for.protected static double getWallClockMinutes(WorkflowInstance inst)
protected static double getCurrentTaskWallClockMinutes(WorkflowInstance inst)
Copyright © 1999–2017 Apache OODT. All rights reserved.