Process Class Relationships

filenet.vw.api
Class VWProcess

java.lang.Object
  |
  +--filenet.vw.api.VWProcess
All Implemented Interfaces:
java.io.Serializable

public final class VWProcess
extends java.lang.Object
implements java.io.Serializable

Use this class to access information about an executing workflow, such as status, history, or child/split work object information.

Since:
VWWS3.10
See Also:
VWQueueElement, VWRosterElement, VWStepElement, VWWorkObject, VWFetchType, VWStepHistory, Serialized Form

Method Summary
 void delete()
          Deletes all work objects of a running workflow process.
 VWMilestoneElement[] fetchFilteredWorkflowMilestones(int level, boolean bLastOnly, boolean bReachedOnly)
          Fetches the milestone data for this workflow process, in which the milestone events have a level property less than or equal to the "theLevel" parameter passed to this method.
 VWWorkflowMilestones fetchReachedWorkflowMilestones(int theLevel)
          Fetches milestone events with a level property less than or equal to the value of the "theLevel" parameter passed to this method.
 VWWorkflowDefinition fetchWorkflowDefinition()
          Fetch the workflow definition for this workflow process.
 VWWorkflowHistory fetchWorkflowHistory(int instructionSheetID)
          Fetches the history data for this workflow process that is associated with this workflow instruction sheet ID.
 int getBufferSize()
          Gets the value of the buffer size setting.
 java.lang.String getEventLogName()
          Gets the event log name of this workflow process.
 VWMilestoneDefinition[] getMilestoneDefinitions()
          Gets the milestone data for this workflow process.
 java.lang.String getRosterName()
          Gets the roster name of this workflow process.
 java.lang.String getWorkClassName()
          Gets the work class name associated with this workflow process.
 boolean hasNext()
          Determines whether there are more elements to retrieve.
 VWWorkObject next()
          Retrieves an active work object. Invoke this method repeatedly to retrieve each active work object associated with the workflow process.
 void resetFetch()
          Sets the fetch items count to zero (0) so the application can refetch items.
 void setBufferSize(int newSize)
          Sets the maximum number of elements to return in a fetch.  The default value is 100.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

fetchReachedWorkflowMilestones

public VWWorkflowMilestones fetchReachedWorkflowMilestones(int theLevel)
                                                    throws VWException
Fetches milestone events with a level property less than or equal to the value of the "theLevel" parameter passed to this method.
Parameters:
theLevel - An integer value that is the criterion milestone event level. Milestone events whose level value is less than or equal to this value will be fetched from the event log.
Returns:
A VWWorkflowMilestones (an iterator) object associated with this workflow process.
Throws:
VWException - Thrown if this method cannot fetch the milestone data for this workflow process that is associated with this workflow.
See Also:
VWMilestoneDefinition, VWMilestoneDefinition.setLevel(int)

fetchFilteredWorkflowMilestones

public VWMilestoneElement[] fetchFilteredWorkflowMilestones(int level,
                                                            boolean bLastOnly,
                                                            boolean bReachedOnly)
                                                     throws VWException
Fetches the milestone data for this workflow process, in which the milestone events have a level property less than or equal to the "theLevel" parameter passed to this method.
Parameters:
theLevel - An integer value that is the criterion level for the fetches. Only milestone events whose level value is less than or equal to this value will be fetched from the event log.

bLastOnly - A boolean value. 'True' limits fetches to be to the milestone objects with the latest timestamp; 'false' does not eliminate milestone objects on the basis of timestamp.

bReachedOnly - A boolean value. 'True' limits fetches to the reached milestone objects; 'false' does not limit fetches on the basis of whether the milestone is reached.

Returns:
An array of workflow milestone elements associated with this workflow process.
Throws:
VWException - Thrown if this method cannot fetch the milestone data for this workflow process.
See Also:
VWMilestoneDefinition, VWMilestoneDefinition.setLevel(int)

fetchWorkflowHistory

public VWWorkflowHistory fetchWorkflowHistory(int instructionSheetID)
                                       throws VWException
Fetches the history data for this workflow process that is associated with this workflow instruction sheet ID.
Parameters:
instructionSheetID - The integer value for the ID of the workflow map definition object.
Returns:
A workflow history object associated with this workflow process. If no workflow history exists, the method returns null.
Throws:
VWException - Thrown if this method cannot fetch the history data for this workflow process that is associated with this workflow instruction sheet ID.

next

public VWWorkObject next()
                  throws VWException
Retrieves an active work object. Invoke this method repeatedly to retrieve each active work object associated with the workflow process.

Next fetches work objects sequentially. The application queries the server for the next block of data, once it has exhausted the currently buffered data. An element returns as long as there is an active work object associated with this workflow process.

The application retrieves work objects from the database in blocks of the size specified in the setBufferSize(int) method. The server imposes a maximum block size, as well; therefore, the effective block size may be smaller than the number specified in VWProcess.setBufferSize. The blocksizes may differ if the work objects are large or if the server reaches its limit.

Returns:
An active work object for this workflow process. If no more work objects exist, the method returns null.
Throws:
VWException - The method throws an exception if there is an error in retrieving a work object from the server.

getBufferSize

public int getBufferSize()
Gets the value of the buffer size setting.
Returns:
An integer value indicating the buffer size, which is the maximum number of elements to return in a fetch.

setBufferSize

public void setBufferSize(int newSize)
                   throws VWException
Sets the maximum number of elements to return in a fetch.  The default value is 100.
Parameters:
newSize - An integer value to use for setting the maximum number of elements to return in a fetch. The value must be greater than zero (0).
Throws:
VWException - The method throws an exception if the buffer is less than or equal to zero (0).

hasNext

public boolean hasNext()
                throws VWException
Determines whether there are more elements to retrieve. Note: This method sets the buffer size to greater than one (1) to perform this check.
Returns:
This method returns true if there are more elements; false if no more elements remain.
Throws:
VWException - This method returns an exception if it cannot determine whether there are more elements to retrieve.

resetFetch

public void resetFetch()
Sets the fetch items count to zero (0) so the application can refetch items. Calling this method between fetches allows the user to return to the beginning of a fetch.
See Also:
fetchWorkflowHistory(int), VWWorkflowDefinition

delete

public void delete()
            throws VWException
Deletes all work objects of a running workflow process.
Throws:
VWException - Thrown if a work object cannot be deleted. Even if only one work object cannot be deleted, the entire deletion fails.

getRosterName

public java.lang.String getRosterName()
                               throws VWException
Gets the roster name of this workflow process.
Returns:
The roster name of this workflow process.
Throws:
VWException - Thrown if this method cannot get the roster name of this workflow process.

getEventLogName

public java.lang.String getEventLogName()
                                 throws VWException
Gets the event log name of this workflow process.
Returns:
The name of the event log of this workflow process.
Throws:
VWException - Thrown if this method cannot get the event log name of this workflow process.

getWorkClassName

public java.lang.String getWorkClassName()
                                  throws VWException
Gets the work class name associated with this workflow process.
Returns:
The work class name of this workflow process.
Throws:
VWException - Thrown if this method cannot get the work class name associated with this workflow process.

getMilestoneDefinitions

public VWMilestoneDefinition[] getMilestoneDefinitions()
                                                throws VWException
Gets the milestone data for this workflow process.
Returns:
A workflow milestone object associated with this workflow process. If there is no milestone data, the method returns null.
Throws:
VWException - Thrown if this method cannot get the milestone data for this workflow process.

fetchWorkflowDefinition

public VWWorkflowDefinition fetchWorkflowDefinition()
                                             throws VWException
Fetch the workflow definition for this workflow process.
Returns:
A VWWorkflowDefinition object for this workflow process
Throws:
VWException -  

Process Class Relationships

Copyright © 2002 FileNET Corporation. All rights reserved.