atg.workflow.servlet
Class WorkflowInstanceQueryDroplet

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.nucleus.TimedOperationService
              extended by atg.nucleus.servlet.ServletService
                  extended by atg.nucleus.servlet.HttpServletService
                      extended by atg.servlet.DynamoServlet
                          extended by atg.workflow.servlet.WorkflowInstanceQueryDroplet
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, ParameterServlet, java.util.EventListener, javax.servlet.Servlet

public class WorkflowInstanceQueryDroplet
extends DynamoServlet

A droplet used to perform workflow instance queries.

This droplet performs an instance query, sets the output instances parameter to the resulting Collection of ProcessInstanceInfo objects, and renders its output parameter. It is typically used in conjunction with another droplet, such as ForEach or Range, which specifies the formatting of each of the ProcessInstanceInfo objects. In addition, the information contained in each ProcessInstanceInfo (namely, the subjectId, processName, and segmentName properties) can be passed as input parameters to WorkflowTaskQueryDroplet, in order to obtain the tasks corresponding to the workflow instance.

Here is the complete description of the parameters to the WorkflowInstanceQueryDroplet:

subjectId
Repository id of the workflow subject whose instances should be returned. If not set, instances for all workflow subjects will be returned.
processName
Name of the workflow process whose instances should be returned. If not set, instances for all workflow processes will be returned.
segmentName
Name of the workflow process segment whose instances should be returned. This parameter only takes effect if the processName parameter is set. If not set, instances for all segments of the specified workflow process will be returned.
taskElementId
Process element id of the workflow task where the returned instances must be waiting - i.e., in order for an instance to be returned by the query, the specified task must be active for the instance. This parameter only takes effect if both the processName and segmentName parameters are set. If not set, and if taskElementIds, taskName, and taskNames are also not set, all instances for the specified workflow segment will be returned.
taskElementIds
Process element ids of the workflow tasks where the returned instances must be waiting - i.e., in order for an instance to be returned by the query, at least one of the specified tasks must be active for the instance. This parameter only takes effect if both the processName and segmentName parameters are set, and if taskElementId is not set. If not set, and if taskName and taskNames are also not set, all instances for the specified workflow segment will be returned.
taskName
Name of the workflow task where the returned instances must be waiting - i.e., in order for an instance to be returned by the query, the specified task must be active for the instance. This parameter only takes effect if both the processName and segmentName parameters are set, and if taskElementId and taskElementIds are not set. If not set, and if taskNames is also not set, all instances for the specified workflow segment will be returned.
taskNames
Names of the workflow tasks where the returned instances must be waiting - i.e., in order for an instance to be returned by the query, at least one of the specified tasks must be active for the instance. This parameter only takes effect if both the processName and segmentName parameters are set, and if taskElementId, taskElementIds, and taskName are not set. If not set, all instances for the specified workflow segment will be returned.
output
Rendered after the instance query has been completed, and the results have been placed into the instances parameter.
empty
Rendered if no instances are returned from the query.
error
Rendered if an error occurs while executing the query. The corresponding error message will be placed into the errorMessage parameter.
instances
Set to the results of the instance query, a Collection of ProcessInstanceInfo objects.
errorMessage
Set to the error message if an error occurs in the course of executing the query.

The following properties of WorkflowInstanceQueryDroplet should be set in the properties file for this component:

processManager
ProcessManager used to find the workflow instances
workflowManager
WorkflowManager used to access workflow information

See Also:
ProcessInstanceInfo, ForEach, Range

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static ParameterName EMPTY
           
static ParameterName ERROR
           
static java.lang.String ERROR_MESSAGE
           
static java.lang.String INSTANCES
           
static ParameterName OUTPUT
           
static ParameterName PROCESS_NAME
           
static ParameterName SEGMENT_NAME
           
static ParameterName SUBJECT_ID
           
static ParameterName TASK_ELEMENT_ID
           
static ParameterName TASK_ELEMENT_IDS
           
static ParameterName TASK_NAME
           
static ParameterName TASK_NAMES
           
 
Fields inherited from class atg.servlet.DynamoServlet
mAllowCleanupRequest, mParameters
 
Fields inherited from class atg.nucleus.servlet.ServletService
SERVLET_INFO_KEY
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
WorkflowInstanceQueryDroplet()
           
 
Method Summary
 void doStartService()
          Called after the service has been created, placed into the naming hierarchy, and initialized with its configured property values.
protected  java.util.Collection getProcessInstances(DynamoHttpServletRequest pRequest)
          Performs the process instance query, and returns a Collection of ProcessInstanceInfo objects which satisfy the given criteria.
 ProcessManager getProcessManager()
          Returns the ProcessManager which will be used to find workflow instances.
 WorkflowManager getWorkflowManager()
          Returns the WorkflowManager which provides access to workflow information.
 void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Called when a request needs to be processed.
 void setProcessManager(ProcessManager pProcessManager)
          Sets the ProcessManager which will be used to find workflow instances.
 void setWorkflowManager(WorkflowManager pWorkflowManager)
          Sets the WorkflowManager which provides access to workflow information.
 
Methods inherited from class atg.servlet.DynamoServlet
doDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, service, service, setParameter
 
Methods inherited from class atg.nucleus.servlet.ServletService
destroy, getServletConfig, getServletInfo, init, setServletInfo
 
Methods inherited from class atg.nucleus.TimedOperationService
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


SUBJECT_ID

public static final ParameterName SUBJECT_ID

PROCESS_NAME

public static final ParameterName PROCESS_NAME

SEGMENT_NAME

public static final ParameterName SEGMENT_NAME

TASK_ELEMENT_ID

public static final ParameterName TASK_ELEMENT_ID

TASK_ELEMENT_IDS

public static final ParameterName TASK_ELEMENT_IDS

TASK_NAME

public static final ParameterName TASK_NAME

TASK_NAMES

public static final ParameterName TASK_NAMES

OUTPUT

public static final ParameterName OUTPUT

EMPTY

public static final ParameterName EMPTY

ERROR

public static final ParameterName ERROR

INSTANCES

public static final java.lang.String INSTANCES
See Also:
Constant Field Values

ERROR_MESSAGE

public static final java.lang.String ERROR_MESSAGE
See Also:
Constant Field Values
Constructor Detail

WorkflowInstanceQueryDroplet

public WorkflowInstanceQueryDroplet()
Method Detail

getProcessManager

public ProcessManager getProcessManager()
Returns the ProcessManager which will be used to find workflow instances.


setProcessManager

public void setProcessManager(ProcessManager pProcessManager)
Sets the ProcessManager which will be used to find workflow instances.


getWorkflowManager

public WorkflowManager getWorkflowManager()
Returns the WorkflowManager which provides access to workflow information.


setWorkflowManager

public void setWorkflowManager(WorkflowManager pWorkflowManager)
Sets the WorkflowManager which provides access to workflow information.


getProcessInstances

protected java.util.Collection getProcessInstances(DynamoHttpServletRequest pRequest)
                                            throws javax.servlet.ServletException,
                                                   ProcessException
Performs the process instance query, and returns a Collection of ProcessInstanceInfo objects which satisfy the given criteria.

Throws:
javax.servlet.ServletException - if missing or invalid parameters were encountered
ProcessException - if there was a problem performing the process instance query
See Also:
ProcessInstanceInfo

doStartService

public void doStartService()
                    throws ServiceException
Called after the service has been created, placed into the naming hierarchy, and initialized with its configured property values.

Overrides:
doStartService in class GenericService
Throws:
ServiceException - if the service had a problem starting up

service

public void service(DynamoHttpServletRequest pRequest,
                    DynamoHttpServletResponse pResponse)
             throws javax.servlet.ServletException,
                    java.io.IOException
Called when a request needs to be processed.

Overrides:
service in class DynamoServlet
Parameters:
pRequest - the request to be processed
pResponse - the response object for this request
Throws:
javax.servlet.ServletException - if an application specific error occurred processing this request
java.io.IOException - if an error occurred reading data from the request or writing data to the response