Class VWQueueElement
- java.lang.Object
-
- 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
Fields Modifier and Type Field and Description static intCOMPLETEDValue of 3. This value indicates that a step element has completed.static intDEADLINE_NOT_REACHEDValue of 0. This value indicates that a step element is still waiting to reach a deadline.static intDEADLINE_REACHEDValue of 2. This value indicates that a step element has reached a deadline.static intDEADLINE_REMINDER_NOTICEValue of 1. This value indicates whether or not a step element has reached the deadline reminder notice.static intDTBOOLEANValue of 2. This value indicates that the type of the data in a workflow object field data type is Boolean.static intDTINTEGERValue of 1. This value indicates that the type of the data in a workflow object field data type is integer.static intDTSTRINGValue of 0. This value indicates that the type of the data in a workflow object field data type is string.static intLOCKED_BY_NONEValue of 0.static intLOCKED_BY_SYSTEMValue of 2. This value indicates whether a workflow object is locked by the system.static intLOCKED_BY_USERValue of 1. This value indicates whether a workflow object is locked by a user.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description booleancheckSession(boolean throwException)Check to verify the session exists.static java.lang.StringConvertNameToTag(java.lang.String aWorkObjectName, int aTagType)Converts the string version of a workflow object name or tag type to a tag.static java.lang.StringConvertTagToName(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.VWInstructionElementfetchInstructionElement(boolean lock, boolean overrideLock)Deprecated.UsefetchStepElementinstead. 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.VWStepElementfetchStepElement(boolean lock, boolean overrideLock)Fetches the current step in the workflow process.VWStepProcessorInfofetchStepProcessorInfo()Fetches the step processor information associated with this instance.VWWorkObjectfetchWorkObject(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.StringgetAuthoredStepName()Gets the authored step name for this queue element.VWParticipantgetBoundUserPx()Returns the VWParticipant (security) object that represents the user who is bound to the current work object.booleangetCanReassign()Indicates whether the work item can be reassigned.VWDataFieldgetDataField(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.ObjectgetFieldValue(java.lang.String fieldName)Gets the value of a specific field.java.lang.StringgetInstructionSheetName()Gets the name of the instruction sheet for this workflow object.intgetLockedMachine()Gets the machine type of the system that locked the workflow object.intgetLockedStatus()Determines the lock status for the workflow object.java.lang.StringgetLockedUser()Returns the name of the user who has locked the workflow object.VWParticipantgetLockedUserPx()Returns the VWParticipant (security) object that represents the user who locked the current work object.java.lang.StringgetMapName()Gets the name of the map for this workflow object.java.lang.StringgetOperationName()Gets the current operation name for this workflow object.intgetProcessorId()Fetches the step processor object containing the information needed to launch a workflow.java.lang.StringgetQueueName()Gets the name of the queue in which this work object currently resides.java.lang.StringgetSelectedResponse()Return the value in the F_Response system field for this object.intgetServerLocation()Gets the current server location of the work object.intgetStepDeadlineStatus()Gets the deadline status for the current step.java.lang.StringgetStepName()Gets the step label for this queue element.java.lang.StringgetSubject()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.StringgetTag()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.StringgetWorkClassName()Gets the name of the work class from which this workflow object is instantiated.java.lang.StringgetWorkflowName()Gets the name of the work class from which the workflow object logged was instantiated.java.lang.StringgetWorkFlowNumber()Gets the workflow number.java.lang.StringgetWorkObjectName()Gets the name of this work object.java.lang.StringgetWorkObjectNumber()Gets the workflow object.java.lang.StringgetWorkPerformerClassName()Deprecated.Replaced byVWQueueElement.getQueueName()Gets the name of the Work Performer Class associated with the queue on which the workflow object currently resides.booleanhasFieldName(java.lang.String fieldName)Indicates whether the specified field exists.booleanisSystemField(java.lang.String fieldName)Indicates whether the field specified is a system field.java.lang.StringtoString()Gets the workflow object name.voidtoXML(java.lang.StringBuffer theBuffer)Appends an XML string representing this instance to the buffer specified.
-
-
-
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
-
fetchInstructionElement
public VWInstructionElement fetchInstructionElement(boolean lock, boolean overrideLock) throws VWException
Deprecated. UsefetchStepElementinstead. 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.ExceptionConverts 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:
- 0: String (DTString)
- 1: Integer (DTInteger)
- 2: Boolean (DTBoolean)
- 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.ExceptionConverts the string version of a workflow object name or tag type to a tag.Valid data tag values are as follows:
- 0: String (DTString)
- 1: Integer (DTInteger)
- 2: Boolean (DTBoolean)
- 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 VWExceptionGets 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 VWExceptionIndicates 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 VWExceptionIndicates 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 VWExceptionGets 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 VWExceptionGets 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 VWExceptionGets 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 VWExceptionGets 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 VWExceptionGets 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 VWExceptionDeprecated. Replaced byVWQueueElement.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 VWExceptionGets 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 VWExceptionGets 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 VWExceptionGets 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 VWExceptionGets 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 VWExceptionGets 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 VWExceptionReturns 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 VWExceptionDetermines 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 VWExceptionGets the machine type of the system that locked the workflow object. The following values identify the machine type:- 0: Indicates the workflow object is not locked.
- -1: Indicates the workflow object is locked by the Process Engine.
- -2: Indicates the workflow object is locked by a Java Web Services application. (-2 returns because there are no machine IDs associated with a FileNet Web Services application.)
- 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:
toStringin classjava.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 VWExceptionGets 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 VWExceptionReturn 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 VWExceptionReturns 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 VWExceptionGets 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
-
getCanReassign
public boolean getCanReassign() throws VWExceptionIndicates whether the work item can be reassigned.- Returns:
- A boolean value of true if the work item associated with this queue element can be reassigned; otherwise, false.
- Throws:
VWException- Thrown if it cannot be determined whether the work item can be reassigned.- Since:
- P8 5.0.0.3
-
getBoundUserPx
public VWParticipant getBoundUserPx() throws VWException
Returns the VWParticipant (security) object that represents the user who is bound to the current work object.- Returns:
- The VWParticipant (security) object that represents the user who is bound for the current work object.
- Throws:
VWException- Since:
- P8 5.0.0.4
-
getProcessorId
public int getProcessorId() throws VWExceptionFetches 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 VWExceptionAppends 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:
toXMLin interfaceIVWtoXML- Parameters:
theBuffer- A StringBuffer that will be appended with the XML content.- Throws:
VWException- Thrown if the specified buffer is null.- See Also:
VWXMLUtil
-
checkSession
public boolean checkSession(boolean throwException) throws VWExceptionCheck to verify the session exists. If the object has been serialized, the session would be null.- Parameters:
Set- throwException to true, if exception for null session should be thrown.- Returns:
- Return false is the session is null, otherwise true.
- Throws:
VWException- Since:
- P8 5.3
-
getWorkFlowNumber
public java.lang.String getWorkFlowNumber() throws VWExceptionGets 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 VWExceptionGets the current server location of the work object.- Returns:
- Number of the server for the work object
- Throws:
VWException
-
-