Process Class Relationships

filenet.vw.api
Class VWQueueElement

java.lang.Object
  |
  +--filenet.vw.api.VWFieldsObject
        |
        +--filenet.vw.api.VWWorkElement
              |
              +--filenet.vw.api.VWQueueElement
All Implemented Interfaces:
IVWtoXML, java.io.Serializable

public final class VWQueueElement
extends filenet.vw.api.VWWorkElement
implements IVWtoXML

Accesses queue fields and Instruction Elements of a workflow object associated with a queue. Accessing these fields in a VWQueueElement is more efficient than retrieving the entire workflow object. Query procedures using the VWQueueQuery.next() method create instances of this class.

See Also:
VWQueueQuery, VWWorkObject, VWInstructionElement, Serialized Form

Field Summary
static int COMPLETED
          Value of 3.  This value indicates that a step element has completed.
static int DEADLINE_NOT_REACHED
          Value of 0.  This value indicates that a step element is still waiting to reach a deadline.
static int DEADLINE_REACHED
          Value of 2.  This value indicates that a step element has reached a deadline.
static int DEADLINE_REMINDER_NOTICE
          Value of 1.  This value indicates whether or not a step element has reached the deadline reminder notice.
static int DTBOOLEAN
          Value of 2.  This value indicates that the type of the data in a workflow object field data type is Boolean.
static int DTINTEGER
          Value of 1.  This value indicates that the type of the data in a workflow object field data type is integer.
static int DTSTRING
          Value of 0.  This value indicates that the type of the data in a workflow object field data type is string.
static int LOCKED_BY_NONE
          Value of 0.
static int LOCKED_BY_SYSTEM
          Value of 2.  This value indicates whether a workflow object is locked by the system.
static int LOCKED_BY_USER
          Value of 1.  This value indicates whether a workflow object is locked by a user.
 
Method Summary
static java.lang.String ConvertNameToTag(java.lang.String aWorkObjectName, int aTagType)
          Converts the string version of a workflow object name or tag type to a tag.
static java.lang.String ConvertTagToName(java.lang.String aTag, int aTagType)
          Converts the tag and the type of data in the tag to the string version of a workflow object name.
 VWInstructionElement fetchInstructionElement(boolean lock, boolean overrideLock)
          Fetches the corresponding instruction element for the workflow object associated with the queue element.
 VWStepElement fetchStepElement(boolean lock, boolean overrideLock)
          Fetches the current step in the workflow process.
 VWStepProcessorInfo fetchStepProcessorInfo()
          Fetches the step processor object containing the information needed to launch a workflow.
 VWWorkObject fetchWorkObject(boolean lock, boolean overrideLock)
          Fetches the workflow object associated with this queue element.
 VWDataField[] getDataFields()
          Gets a list of data fields supported by this queue element.
 java.lang.String[] getFieldNames()
          Lists the names of both user-defined or system field names that the queue element supports and user-defined fields you selected (with Composer) to be queue fields.
 java.lang.Object getFieldValue(java.lang.String fieldName)
          Gets the value of a specific field.
 java.lang.String getInstructionSheetName()
          Gets the name of the instruction sheet of the workflow object.
 int getLockedMachine()
          Gets the machine type of the system that locked the workflow object.
 int getLockedStatus()
          Determines the lock status for the workflow object.
 java.lang.String getLockedUser()
          Gets the name of the user who has locked the workflow object.
 java.lang.String getMapName()
          Gets the name of the map for the workflow object.
 java.lang.String getOperationName()
          Gets the current Operation name of the workflow object.
 java.lang.String getQueueName()
          Gets the name of the queue in which the workflow object currently resides.
 int getServerLocation()
          Gets the current server location of the work object.
 int getStepDeadlineStatus()
          Gets the deadline status for the current step.
 java.lang.String getStepName()
          Gets the step label for the queue element.
 java.lang.String[] getSystemDefinedFieldNames()
          Lists names of the Process Engine fields supported by this queue element.
 java.lang.String getTag()
          Gets the tag of the workflow object.
 java.lang.String[] getUserDefinedFieldNames()
          Lists the names of the user-defined fields supported by the queue element.
 java.lang.String getWorkClassName()
          Gets the name of the work class from which the workflow object is instantiated.
 java.lang.String getWorkflowName()
          Gets the name of the work class from which the workflow object logged was instantiated.
 java.lang.String getWorkFlowNumber()
          Gets the string version of the WorkFlow number.
 java.lang.String getWorkObjectName()
          Gets the workflow object name.
 java.lang.String getWorkObjectNumber()
          Gets the workflow object.
 java.lang.String getWorkPerformerClassName()
          Deprecated. Replaced by getQueueName()
 boolean hasFieldName(java.lang.String fieldName)
          Determines whether the specified field exists.
 boolean isSystemField(java.lang.String fieldName)
          Determines whether the field data type is a system field.
 java.lang.String toString()
          Gets the workflow object name.
 void toXML(java.lang.StringBuffer theBuffer)
          Appends an XML string that represents this VWQueueElement object to the buffer specified by the input parameter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOCKED_BY_NONE

public static final int LOCKED_BY_NONE
Value of 0. This value indicates whether a workflow object is unlocked.

To determine the lock status of a workflow object, see the getLockedStatus method in this class and the fetchLockStatus method in the VWInstructionElement class.


LOCKED_BY_USER

public static final int LOCKED_BY_USER
Value of 1.  This value indicates whether a workflow object is locked by a user.

To determine the lock status of a workflow object, use the VWQueueElement.getLockedStatus() method and the VWInstructionElement.fetchLockedStatus method.


LOCKED_BY_SYSTEM

public static final int LOCKED_BY_SYSTEM
Value of 2.  This value indicates whether a workflow object is locked by the system.

To determine the lock status of a workflow object, use the VWQueueElement.getLockedStatus() method and the VWInstructionElement.fetchLockStatus() method.


DEADLINE_NOT_REACHED

public static final int DEADLINE_NOT_REACHED
Value of 0.  This value indicates that a step element is still waiting to reach a deadline.

DEADLINE_REMINDER_NOTICE

public static final int DEADLINE_REMINDER_NOTICE
Value of 1.  This value indicates whether or not a step element has reached the deadline reminder notice.

DEADLINE_REACHED

public static final int DEADLINE_REACHED
Value of 2.  This value indicates that a step element has reached a deadline.

COMPLETED

public static final int COMPLETED
Value of 3.  This value indicates that a step element has completed. Applicable to tracker elements - indicates workflow has completed.

DTSTRING

public static final int DTSTRING
Value of 0.  This value indicates that the type of the data in a workflow object field data type is string.

Use these values as inputs for the aTagType parameter in the ConvertTagToName() and ConvertNameToTag() methods of this class.


DTINTEGER

public static final int DTINTEGER
Value of 1.  This value indicates that the type of the data in a workflow object field data type is integer.

Use these values as inputs for the aTagType parameter in the ConvertTagToName() and ConvertNameToTag() methods of this class.


DTBOOLEAN

public static final int DTBOOLEAN
Value of 2.  This value indicates that the type of the data in a workflow object field data type is Boolean.

Use these values as inputs for the aTagType parameter in the ConvertTagToName() and ConvertNameToTag() methods of this class.

Method Detail

fetchInstructionElement

public VWInstructionElement fetchInstructionElement(boolean lock,
                                                    boolean overrideLock)
                                             throws VWException
Fetches the corresponding instruction element for the workflow object associated with the queue element.
Parameters:
lock - A boolean value; specify true to lock the workflow object.
overrideLock - A boolean value; specify true to override locks on the workflow object.
Returns:
An Instruction element object representing the queue element.
Throws:
VWException - The method throws an exception if it cannot fetch the corresponding instruction element for the workflow object associated with the queue element.

fetchWorkObject

public VWWorkObject fetchWorkObject(boolean lock,
                                    boolean overrideLock)
                             throws VWException
Fetches the workflow object associated with this queue element.
Parameters:
lock - A boolean value. Specify true to lock the workflow object.
overrideLock - A boolean value. Specify true to override locks on the workflow object.
Returns:
A VWWorkflow object represented by the queue element.
Throws:
VWException - The method throws an exception if it cannot fetch the workflow object associated with the queue element.

ConvertTagToName

public static java.lang.String ConvertTagToName(java.lang.String aTag,
                                                int aTagType)
                                         throws java.lang.Exception
Converts the tag and the type of data in the tag to the string version of a workflow object name. Valid data tag values are as follows:

Parameters:
aTag - The workflow object name (the value in the F_Tag system field).
aTagType - An integer value associated with the data tag type.
Returns:
The workflow object name.
Throws:
VWException - The method throws an exception if it cannot convert the tag and the type of data in the tag to the string version of a workflow object name.

ConvertNameToTag

public static java.lang.String ConvertNameToTag(java.lang.String aWorkObjectName,
                                                int aTagType)
                                         throws java.lang.Exception
Converts the string version of a workflow object name or tag type to a tag. Valid data tag values are as follows:

Parameters:
aWorkObjectName - The workflow object name.
aTagType - An integer value associated with the data tag type (in the tag property of the workflow object name).
Returns:
A string containing a representation of the tag to use in a queue query.
Throws:
VWException - The method throws an exception if it cannot convert the string version of a workflow object name or tag type to a tag.

getFieldNames

public java.lang.String[] getFieldNames()
Lists the names of both user-defined or system field names that the queue element supports and user-defined fields you selected (with Composer) to be queue fields.

The following system fields are associated with each queue element:

Field name Field description Value Value description
F_WobNum Workflow object number    
F_WorkSpaceId Workspace ID    
F_Locked Workflow object lock status 0
1
2
Unlocked
Locked by user
Locked by system
F_LockedMachine Source of lock 0
-1
-2
None (unlocked)
Process Engine
F_LockedTime Time of the workflow object lock (The year 1906 indicates  that the workflow object  is not locked.)    
F_BindPending Pending bind type (A pending bind to  a user or machine occurs upon the next  workflow object lock.) 0
1
2
3
None
Machine
User
Machine and user
F_BoundUser User to whom the workflow object is bound.  Zero indicates that the workflow object  is not bound to a user.    
F_BoundMachine Machine to which the workflow object is bound. Zero indicates that the workflow object  is not bound to a machine.    
F_Tag Normalized workflow object ID field    
F_UniqueId ID that changes upon workflow object update    
F_OperationId Work Performer Operation ID    
F_WorkClassId Work class ID    
F_EnqueueTime Time of workflow object insertion in the queue    
F_CreateTime Workflow object creation time    
F_InstrSheetId ID of the current instruction sheet. "-1" indicates  there is no current instruction sheet.    
F_WorkOrderId ID of the current work order    
F_SortOrder Sort string created by sort rules defined in Composer    

Returns:
A string containing an array of field names.

getSystemDefinedFieldNames

public java.lang.String[] getSystemDefinedFieldNames()
Lists names of the Process Engine fields supported by this queue element.
Returns:
An string containing an array of system field names.

getUserDefinedFieldNames

public java.lang.String[] getUserDefinedFieldNames()
Lists the names of the user-defined fields supported by the queue element. User-defined fields can be system fields if the user configures them as queue fields.
Returns:
A string containing an array of user-defined field names.

getFieldValue

public java.lang.Object getFieldValue(java.lang.String fieldName)
                               throws VWException
Gets the value of a specific field.
Parameters:
fieldName - The name of the field.
Returns:
An object containing the value of the field specified in the fieldName parameter. The field can have a null value. Objects and arrays of objects must be one of the following types: Integer, String, Double, or Boolean.
Throws:
VWException - The method throws an exception if the field specified in the fieldName parameter cannot be found.

isSystemField

public boolean isSystemField(java.lang.String fieldName)
                      throws VWException
Determines whether the field data type is a system field.

System fields start with the prefix F_. User-defined fields are system fields if the user selects them to be queue fields in Composer.

Returns:
A boolean value. The method returns true if the field is a system field; otherwise, the method returns false.
Throws:
VWException - The method throws an exception if it cannot determine whether the field data type is a system field.

hasFieldName

public boolean hasFieldName(java.lang.String fieldName)
                     throws VWException
Determines whether the specified field exists.
Parameters:
fieldName - The name of the field be checked.
Returns:
A boolean value. The method returns true if the field specified in the fieldName parameter exists; otherwise, the method returns false.
Throws:
VWException - The method throws an exception if the value in the fieldName parameter is null.

getWorkObjectName

public java.lang.String getWorkObjectName()
                                   throws VWException
Gets the workflow object name. The name being retrieved is the workflow object ID field set by a user on the work class properties page in Composer.
Returns:
The Workflow object name ID.
Throws:
VWException - The method throws an exception if it cannot get the workflow object name.

getWorkObjectNumber

public java.lang.String getWorkObjectNumber()
                                     throws VWException
Gets the workflow object. Use the returned value as an index value.
Returns:
The workflow object number (the number corresponds to F_WobNum queue field).
Throws:
VWException - The method throws an exception if it cannot get the index value of the workflow object.

getTag

public java.lang.String getTag()
                        throws VWException
Gets the tag of the workflow object. The workflow object name is standardized and saved as a tag in the database. This standardization ensures that the sorting of workflow object names as integers is consistent.
Returns:
The workflow object tag.
Throws:
VWException - The method throws an exception if it cannot get a standardized tag of the workflow object.

getWorkClassName

public java.lang.String getWorkClassName()
                                  throws VWException
Gets the name of the work class from which the workflow object is instantiated.
Returns:
The name of the work class that created the object.
Throws:
VWException - The method throws an exception if it cannot get the name of the source work class.

getWorkflowName

public java.lang.String getWorkflowName()
                                 throws VWException
Gets the name of the work class from which the workflow object logged was instantiated.
Returns:
The name of the work class that created file.
Throws:
VWException - The method throws an exception if it cannot get the name of the work class from which the workflow object logged was instantiated.
Since:
VWWS3.10

getWorkPerformerClassName

public java.lang.String getWorkPerformerClassName()
                                           throws VWException
Deprecated. Replaced by getQueueName()

Gets the name of the Work Performer Class associated with the queue on which the workflow object currently resides.
Returns:
The current name of the Work Performer Class.
Throws:
VWException - The method throws an exception if it cannot get the name of the Work Performer Class associated with the queue on which the workflow object currently resides.

getQueueName

public java.lang.String getQueueName()
                              throws VWException
Gets the name of the queue in which the workflow object currently resides.
Returns:
The current name of the queue containing the workflow object.
Throws:
VWException - The method throws an exception if it cannot get the name of the queue in which the workflow object currently resides.
Since:
VWWS3.10

getOperationName

public java.lang.String getOperationName()
                                  throws VWException
Gets the current Operation name of the workflow object.
Returns:
The current Operation name for the workflow object.
Throws:
VWException - The method throws an exception if it cannot get the current Operation name of the workflow object.

getStepName

public java.lang.String getStepName()
                             throws VWException
Gets the step label for the queue element.
Overrides:
getStepName in class filenet.vw.api.VWFieldsObject
Returns:
The step label for the log element.
Throws:
VWException - The method throws an exception if it cannot get the step label for the queue element.
Since:
VWWS3.10

getInstructionSheetName

public java.lang.String getInstructionSheetName()
                                         throws VWException
Gets the name of the instruction sheet of the workflow object.
Returns:
The name of the current instruction sheet.
Throws:
VWException - The method throws an exception if it cannot get the name of the instruction sheet of the workflow object.

getLockedUser

public java.lang.String getLockedUser()
                               throws VWException
Gets the name of the user who has locked the workflow object.
Returns:
The name of the user who locked the workflow object. If the workflow object is not locked or the object is locked by the system, the method returns null.
Throws:
VWException - The method throws an exception if it cannot get the name of the user who has locked the workflow object.

getLockedStatus

public int getLockedStatus()
                    throws VWException
Determines the lock status for the workflow object. The possible states are not locked, locked by user, and locked by system.
Returns:
An integer value indicating the lock status for the workflow object. The valid values are as follows:

  • 0: LOCKED_BY_NONE
  • 1: LOCKED_BY_USER
  • 2: LOCKED_BY_SYSTEM

Throws:
VWException - The method throws an exception if it cannot determine the lock status for the workflow object.

getLockedMachine

public int getLockedMachine()
                     throws VWException
Gets the machine type of the system that locked the workflow object. The following values identify the machine type:

Returns:
An integer value indicating whether or not the object is locked and the type of the system that locked workflow object.
Throws:
VWException - The method throws an exception if it cannot get the machine type of the system that locked the workflow object.

toString

public java.lang.String toString()
Gets the workflow object name.
Overrides:
toString in class java.lang.Object
Returns:
The name of the workflow object.

fetchStepElement

public VWStepElement fetchStepElement(boolean lock,
                                      boolean overrideLock)
                               throws VWException
Fetches the current step in the workflow process.
Parameters:
lock - A boolean value. Specify true to lock the workflow object; otherwise, specify false.
overrideLock - A boolean value. Specify true to override existing locks on the workflow object; otherwise, specify false.
Returns:
A step element object which represents the current work object.
Throws:
VWException - The method throws an exception if the system fails to fetch the step element.
Since:
VWWS3.10

getMapName

public java.lang.String getMapName()
                            throws VWException
Gets the name of the map for the workflow object.
Returns:
The name of the current workflow map.
Throws:
VWException - The method throws an exception if it cannot get the name of the map for the workflow object.
Since:
VWWS3.10

getDataFields

public VWDataField[] getDataFields()
                            throws VWException
Gets a list of data fields supported by this queue element.
Returns:
An array of data field objects.
Throws:
VWException - The method throws an exception if it cannot get a list of data fields supported by the queue element.
Since:
VWWS3.10
See Also:
VWDataField

getStepDeadlineStatus

public int getStepDeadlineStatus()
                          throws VWException
Gets the deadline status for the current step. The valid deadline status conditions are deadline not reached, deadline reached, deadline reminder, and completed. Queue elements in the tracker queue will have a deadline status of completed when the workflow they track has completed or terminated.
Returns:
An integer value indicating the deadline status for the current step. The possible return values are:

  • 0: DEADLINE_NOT_REACHED
  • 1: DEADLINE_REMINDER_NOTIFICATION
  • 2: DEADLINE_REACHED
  • 3: COMPLETED

Throws:
VWException -  
Since:
VWWS3.10

fetchStepProcessorInfo

public VWStepProcessorInfo fetchStepProcessorInfo()
                                           throws VWException
Fetches the step processor object containing the information needed to launch a workflow.
Returns:
A VWStepProcessorInfo object containing the information necessary to initialize a step processor to act as the first step in a workflow.
Throws:
VWException - The method throws an exception if it cannot fetch the step processor object containing the information needed to launch a workflow.
Since:
VWWS3.10

toXML

public void toXML(java.lang.StringBuffer theBuffer)
           throws VWException
Appends an XML string that represents this VWQueueElement object to the buffer specified by the input parameter.
Specified by:
toXML in interface IVWtoXML
Parameters:
theBuffer - A string buffer that this method will append with XML content.
Throws:
VWException -  
See Also:
VWXMLUtil

getWorkFlowNumber

public java.lang.String getWorkFlowNumber()
                                   throws VWException
Gets the string version of the WorkFlow number. Use the returned F_WorkFlowNumber as an index key component.
Returns:
Workflow object number as a string, which corresponds to the F_WorkFlowNumber. Returns null if the field does not exist.
Throws:
VWException -  

getServerLocation

public int getServerLocation()
                      throws VWException
Gets the current server location of the work object.
Returns:
Number of the server for the work object
Throws:
VWException -  


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