Process API

filenet.vw.api
Class VWQueueElement

java.lang.Object
  extended by filenet.vw.api.VWQueueElement
All Implemented Interfaces:
IVWtoXML, java.io.Serializable

public final class VWQueueElement
extends java.lang.Object
implements IVWtoXML, java.io.Serializable

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, VWStepElement, 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 _get_FILE_AUTHOR()
          For FileNet internal use only, do not call.
static java.lang.String _get_FILE_DATE()
          For FileNet internal use only, do not call.
static java.lang.String _get_FILE_REVISION()
          For FileNet internal use only, do not call.
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)
          Deprecated. Use fetchStepElement instead. Fetches the corresponding instruction element for the workflow object associated with the queue element. If a translation source exists, the authored instruction element information is translated.
 VWStepElement fetchStepElement(boolean lock, boolean overrideLock)
          Fetches the current step in the workflow process.
 VWStepProcessorInfo fetchStepProcessorInfo()
          Fetches the step processor information associated with this instance.
 VWWorkObject fetchWorkObject(boolean lock, boolean overrideLock)
          Fetches the workflow object associated with this queue element.
 java.lang.String[] getAuthoredFieldNames()
          Lists the authored (untranslated) names of both user-defined and system field names that this queue element supports, as well as user-defined fields selected to be queue fields.
 java.lang.String getAuthoredStepName()
          Gets the authored step name for this queue element.
 VWDataField getDataField(java.lang.String name)
          Gets the requested data field from the log element.
 VWDataField[] getDataFields()
          Gets the list of data fields supported by this queue element.
 java.lang.String[] getFieldNames()
          Lists the names of both user-defined and system field names that this queue element supports, as well as the user-defined fields selected 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 for this 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()
          Returns the name of the user who has locked the workflow object.
 VWParticipant getLockedUserPx()
          Returns the VWParticipant (security) object that represents the user who locked the current work object.
 java.lang.String getMapName()
          Gets the name of the map for this workflow object.
 java.lang.String getOperationName()
          Gets the current operation name for this workflow object.
 int getProcessorId()
          Fetches the step processor object containing the information needed to launch a workflow.
 java.lang.String getQueueName()
          Gets the name of the queue in which this work object currently resides.
 java.lang.String getSelectedResponse()
          Return the value in the F_Response system field for this object.
 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 this queue element.
 java.lang.String getSubject()
          Returns the value in the F_Subject system field for this object.
 java.lang.String[] getSystemDefinedFieldNames()
          Lists the names of the system 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 this queue element.
 java.lang.String getWorkClassName()
          Gets the name of the work class from which this 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 workflow number.
 java.lang.String getWorkObjectName()
          Gets the name of this work object.
 java.lang.String getWorkObjectNumber()
          Gets the workflow object.
 java.lang.String getWorkPerformerClassName()
          Deprecated. Replaced by getQueueName() Gets the name of the Work Performer Class associated with the queue on which the workflow object currently resides.
 boolean hasFieldName(java.lang.String fieldName)
          Indicates whether the specified field exists.
 boolean isSystemField(java.lang.String fieldName)
          Indicates whether the field specified is a system field.
 java.lang.String toString()
          Gets the workflow object name.
 void toXML(java.lang.StringBuffer theBuffer)
          Appends an XML string representing this instance to the buffer specified.
 
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.

See Also:
Constant Field Values

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.

See Also:
Constant Field Values

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.

See Also:
Constant Field Values

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.

See Also:
Constant Field Values

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.

See Also:
Constant Field Values

DEADLINE_REACHED

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

See Also:
Constant Field Values

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.

See Also:
Constant Field Values

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.

See Also:
Constant Field Values

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.

See Also:
Constant Field Values

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.

See Also:
Constant Field Values
Method Detail

_get_FILE_DATE

public static java.lang.String _get_FILE_DATE()
For FileNet internal use only, do not call.

Returns:
the file date

_get_FILE_AUTHOR

public static java.lang.String _get_FILE_AUTHOR()
For FileNet internal use only, do not call.

Returns:
the file date

_get_FILE_REVISION

public static java.lang.String _get_FILE_REVISION()
For FileNet internal use only, do not call.

Returns:
the file date

fetchInstructionElement

public VWInstructionElement fetchInstructionElement(boolean lock,
                                                    boolean overrideLock)
                                             throws VWException
Deprecated. Use fetchStepElement instead. Fetches the corresponding instruction element for the workflow object associated with the queue element. If a translation source exists, the authored instruction element information is translated.

Parameters:
lock - A boolean value of true to lock the workflow object; false otherwise.
overrideLock - A boolean value of true to override locks on the workflow object; false otherwise.
Returns:
An Instruction element object representing the queue element. If a translation source exists, the translated instruction element information is returned; otherwise, the authored information is returned.
Throws:
VWException - Thrown if the corresponding instruction element for the workflow object associated with the queue element cannot be returned.

fetchWorkObject

public VWWorkObject fetchWorkObject(boolean lock,
                                    boolean overrideLock)
                             throws VWException
Fetches the workflow object associated with this queue element. If a translation source exists, the authored workflow information is translated.

Parameters:
lock - A boolean value of true to lock the workflow object; false otherwise.
overrideLock - A boolean value of true to override locks on the workflow object; false otherwise.
Returns:
The VWWorkflow object associated with the queue element. If a translation source exists, the translated workflow information is returned; otherwise, the authored information is returned.
Throws:
VWException - Thrown if the workflow object associated with this queue element cannot be retrieved.

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. If a translation source exists, the workflow object name is translated.

Valid data tag values are as follows:

Parameters:
aTag - The tag to convert. The tag is the value in the F_Tag system field.
aTagType - An integer associated with the data tag type.
Returns:
The workflow object name. If a translation source exists, the translated workflow object name is returned; otherwise, the authored name is returned.
Throws:
java.lang.Exception - Thrown if the tag and tag type cannot be converted to a 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 - A String containing the workflow object name. If a translation source exists, the workflow object name is translated.
aTagType - An integer associated with the data tag type (in the Tag property of the workflow object specified).
Returns:
A String containing the tag to use in a queue query.
Throws:
java.lang.Exception - Thrown if the string version of the workflow object name or tag type specified cannot be converted to a tag.

getFieldNames

public java.lang.String[] getFieldNames()
Lists the names of both user-defined and system field names that this queue element supports, as well as the user-defined fields selected to be queue fields. If a translation source exists, the authored field names are translated.

Returns:
A String array containing the translated field names, if a translation source exists; otherwise, the authored names are returned.

getAuthoredFieldNames

public java.lang.String[] getAuthoredFieldNames()
Lists the authored (untranslated) names of both user-defined and system field names that this queue element supports, as well as user-defined fields selected to be queue fields.

Returns:
A String array of the authored field names.
Since:
P8 4.0

getSystemDefinedFieldNames

public java.lang.String[] getSystemDefinedFieldNames()
Lists the names of the system fields supported by this queue element. If a translation source exists, the authored field names are translated.

Returns:
A String array containing the translated system field names, if a translation source exists; otherwise, the authored names are returned.

getUserDefinedFieldNames

public java.lang.String[] getUserDefinedFieldNames()
Lists the names of the user-defined fields supported by this queue element. If a translation source exists, the authored field names are translated.

User-defined fields can be system fields if they are configured as queue fields.

Returns:
A String array containing the translated user-defined field names, if a translation source exists; otherwise, the authored names are returned.

getFieldValue

public java.lang.Object getFieldValue(java.lang.String fieldName)
                               throws VWException
Gets the value of a specific field.

Parameters:
fieldName - A String containing the name of the field. If a translation source exists, the authored field name is translated.
Returns:
An Object containing the value of the field specified. 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 - Thrown if the field specified cannot be found.

isSystemField

public boolean isSystemField(java.lang.String fieldName)
                      throws VWException
Indicates whether the field specified is a system field.

System fields start with the prefix "F_". User-defined fields are system fields if they are selected to be queue fields.

Parameters:
fieldName - The name of the field to check. If a translation source exists, the authored field name is translated.
Returns:
A boolean value of true if the field is a system field; otherwise, false.
Throws:
VWException - Thrown if it cannot be determined whether the field is a system field.

hasFieldName

public boolean hasFieldName(java.lang.String fieldName)
                     throws VWException
Indicates whether the specified field exists.

Parameters:
fieldName - The name of the field to check. If a translation source exists, the authored field name is translated.
Returns:
A boolean value of true if the specified field exists; false otherwise.
Throws:
VWException - Thrown if the fieldName parameter is null.

getWorkObjectName

public java.lang.String getWorkObjectName()
                                   throws VWException
Gets the name of this work object. If a translation source exists, the authored work object name is translated.

Returns:
A String containing the translated name of the work object, if a translation source exists; otherwise, the authored name is returned.
Throws:
VWException - Thrown if the work object name cannot be found.

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 this workflow object is instantiated. If a translation source exists, the authored work class name is translated.

Returns:
A String containing the translated name of the source work class, if a translation source exists; otherwise, the authored name is returned.
Throws:
VWException - Thrown if the name of the source work class cannot be found.

getWorkflowName

public java.lang.String getWorkflowName()
                                 throws VWException
Gets the name of the work class from which the workflow object logged was instantiated. If a translation source exists, the authored work class name is translated.

Returns:
A String containing the translated name of the work class that created the file, if a translation source exists; otherwise, the authored name is returned.
Throws:
VWException - Thrown if 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 this work object currently resides. If a translation source exists, the authored queue name is translated.

Returns:
A String containing the translated name of the queue currently containing this work object, if a translation source exists; otherwise, the authored name is returned.
Throws:
VWException - Thrown if the queue name cannot be found.
Since:
VWWS3.10

getOperationName

public java.lang.String getOperationName()
                                  throws VWException
Gets the current operation name for this workflow object. If a translation source exists, the authored operation name is translated.

Returns:
A String containing the translated name of the current operation, if a translation source exists; otherwise, the authored name is returned.
Throws:
VWException - Thrown if the current operation name for this workflow object cannot be found.

getStepName

public java.lang.String getStepName()
                             throws VWException
Gets the step label for this queue element. If a translation source exists, the authored step label (name) is translated.

Returns:
A String containing the translated name of the step, if a translation source exists; otherwise, the authored name is returned.
Throws:
VWException - Thrown if the step label for this queue element cannot be found.
Since:
VWWS3.10

getAuthoredStepName

public java.lang.String getAuthoredStepName()
                                     throws VWException
Gets the authored step name for this queue element.

Returns:
A String containing the authored name, if it exists; If an step name cannot be found, null is returned.
Throws:
VWException - Thrown if a step name cannot be found for this queue element.
Since:
P8 4.0

getInstructionSheetName

public java.lang.String getInstructionSheetName()
                                         throws VWException
Gets the name of the instruction sheet for this workflow object. If a translation source exists, the authored instruction sheet name is translated.

Returns:
A String containing the translated name of the current instruction sheet, if a translation source exists; otherwise, the authored name is returned.
Throws:
VWException - Thrown if the name of the instruction sheet for this workflow object cannot be found.

getLockedUser

public java.lang.String getLockedUser()
                               throws VWException
Returns 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.

getLockedUserPx

public VWParticipant getLockedUserPx()
                              throws VWException
Returns the VWParticipant (security) object that represents the user who locked the current work object.

Returns:
The VWParticipant (security) object that represents the user who locked the current work object, or null. Null indicates the current work object is unlocked, or the current work object is locked by the system.
Throws:
VWException

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. If a translation source exists, the authored step element information is translated.

Parameters:
lock - A boolean value of true to lock the workflow object; otherwise, false.
overrideLock - A boolean value of true to override existing locks on the workflow object; otherwise, false.
Returns:
A VWStepElement object representing the current work object. If a translation source exists, the translated step element information is returned; otherwise, the authored information is returned.
Throws:
VWException - Thrown if the step element cannot be retrieved.
Since:
VWWS3.10

getMapName

public java.lang.String getMapName()
                            throws VWException
Gets the name of the map for this workflow object. If a translation source exists, the authored map name is translated.

Returns:
A String containing the translated name of the current workflow map, if a translation source exists; otherwise, the authored name is returned.
Throws:
VWException - Thrown if the name of the map for this workflow object cannot be found.
Since:
VWWS3.10

getDataFields

public VWDataField[] getDataFields()
                            throws VWException
Gets the list of data fields supported by this queue element. If a translation source exists, the data field information is translated.

Returns:
An array of VWDataField objects for the supported data fields. If a translation source exists, the translated information is returned for the data fields; otherwise, the authored information is returned.
Throws:
VWException - Thrown list of data fields supported cannot be retrieved.
Since:
VWWS3.10
See Also:
VWDataField

getDataField

public VWDataField getDataField(java.lang.String name)
                         throws VWException
Gets the requested data field from the log element.

Parameters:
name - A String containing the name of the data field. If a translation source exists, the authored name is translated.
Returns:
A VWDataField object for the data field specified. If the field cannot be found, null is returned.
Throws:
VWException
Since:
P8 4.0

getSelectedResponse

public java.lang.String getSelectedResponse()
                                     throws VWException
Return the value in the F_Response system field for this object. If a translation source exists, the authored response value is translated.

Returns:
A String containing the translated response, if a translation source exists; otherwise the authored response is returned.
Throws:
VWException
Since:
P8 4.0

getSubject

public java.lang.String getSubject()
                            throws VWException
Returns the value in the F_Subject system field for this object. If a translation source exists, the authored subject value is translated.

Returns:
A String containing the translated subject, if a translation source exists; otherwise the authored value is returned.
Throws:
VWException - Thrown if a problem occurs retrieving the field from this object.
Since:
P8 4.0

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

getProcessorId

public int getProcessorId()
                   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

fetchStepProcessorInfo

public VWStepProcessorInfo fetchStepProcessorInfo()
                                           throws VWException
Fetches the step processor information associated with this instance. If a translation source exists, the authored step processor information is translated. The step processor information contains data that can used to open a step processor.

Returns:
The VWStepProcessorInfo object for the step processor assigned to the step.
Throws:
VWException
Since:
VWWS3.10

toXML

public void toXML(java.lang.StringBuffer theBuffer)
           throws VWException
Appends an XML string representing this instance to the buffer specified.

Warning: This XML string is nonextensible, and cannot be modified in any way.

Specified by:
toXML in interface IVWtoXML
Parameters:
theBuffer - A StringBuffer that will be appended with the XML content.
Throws:
VWException - Thrown if the specified buffer is null.
See Also:
VWXMLUtil

getWorkFlowNumber

public java.lang.String getWorkFlowNumber()
                                   throws VWException
Gets the workflow number. Use the returned F_WorkFlowNumber value as an index key component.

Returns:
The string representing the workflow number.
Throws:
VWException - An exception is thrown under the following conditions:
  • There is no workflow number currently assigned. This may be because the object has not yet been dispatched (has not yet become a work object).
  • The workflow number is null.

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

Process API

© Copyright IBM Corporation 2002, 2008. All rights reserved.