org.apache.oodt.cas.workflow.system
Class XmlRpcWorkflowManager

java.lang.Object
  extended by org.apache.oodt.cas.workflow.system.XmlRpcWorkflowManager

public class XmlRpcWorkflowManager
extends Object

An XML RPC-based Workflow manager.

Author:
mattmann (Chris Mattmann), bfoster (Brian Foster)

Field Summary
static int DEFAULT_WEB_SERVER_PORT
           
static String ENGINE_RUNNER_FACTORY_PROPERTY
           
static String PROPERTIES_FILE_PROPERTY
           
static String WORKFLOW_ENGINE_FACTORY_PROPERTY
           
static String WORKFLOW_REPOSITORY_FACTORY_PROPERTY
           
static String XML_RPC_HANDLER_NAME
           
 
Constructor Summary
XmlRpcWorkflowManager()
           
XmlRpcWorkflowManager(int port)
           
 
Method Summary
 String executeDynamicWorkflow(Vector<String> taskIds, Hashtable metadata)
           
 Hashtable getConditionById(String conditionId)
           
 Hashtable getFirstPage()
           
 Hashtable getLastPage()
           
 Hashtable getNextPage(Hashtable currentPage)
           
 int getNumWorkflowInstances()
           
 int getNumWorkflowInstancesByStatus(String status)
           
 Hashtable getPrevPage(Hashtable currentPage)
           
 Vector getRegisteredEvents()
           
 Hashtable getTaskById(String taskId)
           
 Hashtable getWorkflowById(String workflowId)
           
 double getWorkflowCurrentTaskWallClockMinutes(String workflowInstId)
           
 Hashtable getWorkflowInstanceById(String wInstId)
           
 Hashtable getWorkflowInstanceMetadata(String wInstId)
           
 Vector getWorkflowInstances()
           
 Vector getWorkflowInstancesByStatus(String status)
           
 Vector getWorkflows()
           
 Vector getWorkflowsByEvent(String eventName)
           
 double getWorkflowWallClockMinutes(String workflowInstId)
           
 boolean handleEvent(String eventName, Hashtable metadata)
           
static void loadProperties()
           
static void main(String[] args)
           
 Hashtable paginateWorkflowInstances(int pageNum)
           
 Hashtable paginateWorkflowInstances(int pageNum, String status)
           
 boolean pauseWorkflowInstance(String workflowInstId)
           
 boolean resumeWorkflowInstance(String workflowInstId)
           
 boolean setWorkflowInstanceCurrentTaskEndDateTime(String wInstId, String endDateTimeIsoStr)
           
 boolean setWorkflowInstanceCurrentTaskStartDateTime(String wInstId, String startDateTimeIsoStr)
           
 boolean shutdown()
           
 boolean stopWorkflowInstance(String workflowInstId)
           
 boolean updateMetadataForWorkflow(String workflowInstId, Hashtable metadata)
           
 boolean updateWorkflowInstance(Hashtable workflowInst)
           
 boolean updateWorkflowInstanceStatus(String workflowInstanceId, String status)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_WEB_SERVER_PORT

public static final int DEFAULT_WEB_SERVER_PORT
See Also:
Constant Field Values

XML_RPC_HANDLER_NAME

public static final String XML_RPC_HANDLER_NAME
See Also:
Constant Field Values

PROPERTIES_FILE_PROPERTY

public static final String PROPERTIES_FILE_PROPERTY
See Also:
Constant Field Values

WORKFLOW_ENGINE_FACTORY_PROPERTY

public static final String WORKFLOW_ENGINE_FACTORY_PROPERTY
See Also:
Constant Field Values

ENGINE_RUNNER_FACTORY_PROPERTY

public static final String ENGINE_RUNNER_FACTORY_PROPERTY
See Also:
Constant Field Values

WORKFLOW_REPOSITORY_FACTORY_PROPERTY

public static final String WORKFLOW_REPOSITORY_FACTORY_PROPERTY
See Also:
Constant Field Values
Constructor Detail

XmlRpcWorkflowManager

public XmlRpcWorkflowManager()

XmlRpcWorkflowManager

public XmlRpcWorkflowManager(int port)
Method Detail

shutdown

public boolean shutdown()

executeDynamicWorkflow

public String executeDynamicWorkflow(Vector<String> taskIds,
                                     Hashtable metadata)
                              throws RepositoryException,
                                     EngineException
Throws:
RepositoryException
EngineException

getRegisteredEvents

public Vector getRegisteredEvents()
                           throws RepositoryException
Throws:
RepositoryException

getFirstPage

public Hashtable getFirstPage()

getNextPage

public Hashtable getNextPage(Hashtable currentPage)

getPrevPage

public Hashtable getPrevPage(Hashtable currentPage)

getLastPage

public Hashtable getLastPage()

paginateWorkflowInstances

public Hashtable paginateWorkflowInstances(int pageNum,
                                           String status)
                                    throws InstanceRepositoryException
Throws:
InstanceRepositoryException

paginateWorkflowInstances

public Hashtable paginateWorkflowInstances(int pageNum)
                                    throws InstanceRepositoryException
Throws:
InstanceRepositoryException

getWorkflowInstanceMetadata

public Hashtable getWorkflowInstanceMetadata(String wInstId)

getWorkflowsByEvent

public Vector getWorkflowsByEvent(String eventName)
                           throws RepositoryException
Throws:
RepositoryException

handleEvent

public boolean handleEvent(String eventName,
                           Hashtable metadata)
                    throws RepositoryException,
                           EngineException
Throws:
RepositoryException
EngineException

getWorkflowInstanceById

public Hashtable getWorkflowInstanceById(String wInstId)
                                  throws EngineException
Throws:
EngineException

stopWorkflowInstance

public boolean stopWorkflowInstance(String workflowInstId)

pauseWorkflowInstance

public boolean pauseWorkflowInstance(String workflowInstId)

resumeWorkflowInstance

public boolean resumeWorkflowInstance(String workflowInstId)

getWorkflowWallClockMinutes

public double getWorkflowWallClockMinutes(String workflowInstId)

getWorkflowCurrentTaskWallClockMinutes

public double getWorkflowCurrentTaskWallClockMinutes(String workflowInstId)

getNumWorkflowInstancesByStatus

public int getNumWorkflowInstancesByStatus(String status)
                                    throws InstanceRepositoryException
Throws:
InstanceRepositoryException

getNumWorkflowInstances

public int getNumWorkflowInstances()
                            throws InstanceRepositoryException
Throws:
InstanceRepositoryException

getWorkflowInstancesByStatus

public Vector getWorkflowInstancesByStatus(String status)
                                    throws EngineException
Throws:
EngineException

getWorkflowInstances

public Vector getWorkflowInstances()
                            throws EngineException
Throws:
EngineException

getWorkflows

public Vector getWorkflows()
                    throws RepositoryException
Throws:
RepositoryException

getTaskById

public Hashtable getTaskById(String taskId)
                      throws RepositoryException
Throws:
RepositoryException

getConditionById

public Hashtable getConditionById(String conditionId)
                           throws RepositoryException
Throws:
RepositoryException

getWorkflowById

public Hashtable getWorkflowById(String workflowId)
                          throws RepositoryException
Throws:
RepositoryException

updateMetadataForWorkflow

public boolean updateMetadataForWorkflow(String workflowInstId,
                                         Hashtable metadata)

updateWorkflowInstance

public boolean updateWorkflowInstance(Hashtable workflowInst)

setWorkflowInstanceCurrentTaskStartDateTime

public boolean setWorkflowInstanceCurrentTaskStartDateTime(String wInstId,
                                                           String startDateTimeIsoStr)

setWorkflowInstanceCurrentTaskEndDateTime

public boolean setWorkflowInstanceCurrentTaskEndDateTime(String wInstId,
                                                         String endDateTimeIsoStr)

updateWorkflowInstanceStatus

public boolean updateWorkflowInstanceStatus(String workflowInstanceId,
                                            String status)
                                     throws Exception
Throws:
Exception

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

loadProperties

public static void loadProperties()
                           throws FileNotFoundException,
                                  IOException
Throws:
FileNotFoundException
IOException


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