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.

VWProcess contains methods next() and hasNext() which function similarly to the next() and hasNext() methods in the Iterator interface in Java 2 to retrieve all active work objects in this workflow. A retrieval series completes when the next() method returns a null value.

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

Field Summary
static int FILTER_COMPLETED_STEP_HISTORY
          Value of 1: use this in the in the filterFlags parameter of the fetchFilteredWorkflowHistory(int, int) method to specify only completed step history data to be returned.
static int FILTER_NONE
          Value of 0: use this in the filterFlags parameter of the fetchFilteredWorkflowHistory(int, int) method to specify that all step history data be returned.
 
Method Summary
 void delete()
          Deletes all work objects of a running workflow process.
 VWWorkflowHistory fetchFilteredWorkflowHistory(int mapId, int filterFlag)
          Fetches step history data for the current workflow process that is associated with this workflow map ID, specified to be either completed step history only, or all history data.
 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 level 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()
          Deprecated. Replaced by fetchWorkflowDefinition(boolean), which can handle workflow definitions that reference work classes from a previous version of Process that was known as Panagon Visual WorkFlo. This method also can include references to workflow definitions that need to explicitly incorporate a default terminate or malfunction map.
 VWWorkflowDefinition fetchWorkflowDefinition(boolean convert)
          Fetches 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 work objects to retrieve.
 VWWorkObject next()
          Retrieves the subsequent work object in the series of active work objects associated with this process. Invoke this method repeatedly to retrieve a series of active work objects. Returns null when no more active work objects can be returned.
 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
 

Field Detail

FILTER_NONE

public static final int FILTER_NONE
Value of 0: use this in the filterFlags parameter of the fetchFilteredWorkflowHistory(int, int) method to specify that all step history data be returned.

FILTER_COMPLETED_STEP_HISTORY

public static final int FILTER_COMPLETED_STEP_HISTORY
Value of 1: use this in the in the filterFlags parameter of the fetchFilteredWorkflowHistory(int, int) method to specify only completed step history data to be returned.
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 -  
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 level parameter passed to this method.
Parameters:
level - 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 -  
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 -  

next

public VWWorkObject next()
                  throws VWException
Retrieves the subsequent work object in the series of active work objects associated with this process. Invoke this method repeatedly to retrieve a series of active work objects. Returns null when no more active work objects can be returned.

After a set of items in the current retrieval buffer is exhausted, additional items will be retrieved from the Process server and buffered. The effective buffer block size is the lesser of the number specified with a preceding setBufferSize(int) call and the number imposed by the Process server limit.

You can modify retrieval performance by changing the retrieval buffer size. To change the current retrieval buffer size, set it with a setBufferSize(int) call.
Note
This method requires a buffer size greater than 1 to operate properly.

Returns:
An active work object for this workflow process, or null if more work objects remain to be fetched from the series.
Throws:
VWException -  
See Also:
hasNext()

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 work objects to retrieve.
Note
This method requires a buffer size greater than 1 to operate properly. The default buffersize is 50.
Returns:
true if there are more elements that can be fetched.
Throws:
VWException -  
See Also:
next()

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 caller 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
Deprecated. Replaced by fetchWorkflowDefinition(boolean), which can handle workflow definitions that reference work classes from a previous version of Process that was known as Panagon Visual WorkFlo. This method also can include references to workflow definitions that need to explicitly incorporate a default terminate or malfunction map.

Fetches the workflow definition for this workflow process.
Returns:
A VWWorkflowDefinition object for this workflow process.
Throws:
VWException -  

fetchWorkflowDefinition

public VWWorkflowDefinition fetchWorkflowDefinition(boolean convert)
                                             throws VWException
Fetches the workflow definition for this workflow process.
Parameters:
convert - The value true indicates that the fetched workflow definition should be converted, so that the workflow definition is correct and complete in the following situations:

  • The workflow definition references a work class from a former version of Process called Panagon Visual WorkFlow.
  • The workflow definition was defined with a default terminate or malfunction map and the fetched workflow definition should include such a map.

A false value indicates that the returned workflow definition should be in the same form as it was before it was transferred to the server.

Conversion is not necessary if the returned workflow definition does not need to include inherited (not explicitly defined) terminate or malfunction maps, and the referenced work class has not been transferred from a previous version of Process that was known as Panagon Visual WorkFlo.

Returns:
A VWWorkflowDefinition object for this workflow process
Throws:
VWException -  

fetchFilteredWorkflowHistory

public VWWorkflowHistory fetchFilteredWorkflowHistory(int mapId,
                                                      int filterFlag)
                                               throws VWException
Fetches step history data for the current workflow process that is associated with this workflow map ID, specified to be either completed step history only, or all history data.
Parameters:
mapId - The integer value for the ID of the workflow map definition object.
filterFlag - Set this to FILTER_COMPLETED_STEP_HISTORY (value of 1) if you want the method to exclusively return completed step history data, or FILTER_NONE (value of 0) to return all history data.
Returns:
A workflow history object associated with this workflow process. If no completed step history exists and FILTER_COMPLETED_STEP_HISTORY is specified, the method returns null.
Throws:
VWException -  
See Also:
fetchWorkflowHistory(int)


Copyright © 2002, 2003 FileNet Corporation. All rights reserved.