filenet.vw.api
Class VWRosterElement
- java.lang.Object
-
- filenet.vw.api.VWRosterElement
-
- All Implemented Interfaces:
- IVWtoXML, java.io.Serializable
public final class VWRosterElement extends java.lang.Object implements IVWtoXML, java.io.Serializable
Use this class to access a roster element and fetch a work object or an instruction element.A roster element represents an individual work object in a roster. An instance of this class accesses system-defined, indexed, and exposed fields without the expense of retrieving an entire work object.
Call the
VWRoster.createQuery(String, Object[], Object[], int, String, Object[], int)method to create a VWRosterQuery instance containing roster elements of a given fetch type. Subsequent calls ofVWRosterQuery.next()create instances of the VWRosterElement class.- See Also:
VWRosterQuery,VWWorkObject,VWInstructionElement, Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description booleancheckSession(boolean throwException)Check to verify the session exists.VWInstructionElementfetchInstructionElement(boolean lock, boolean overrideLock)Deprecated.Replaced byfetchStepElementVWStepElementfetchStepElement(boolean lock, boolean overrideLock)Fetches the current step in the workflow process.VWWorkObjectfetchWorkObject(boolean lock, boolean overrideLock)Fetches the work object that corresponds to this roster element.java.lang.String[]getAuthoredFieldNames()Lists the authored (untranslated) names of both user-defined and system field names that this roster element supports.java.lang.StringgetAuthoredStepName()Gets the authored step name for this roster element.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 supported by this roster element.java.lang.ObjectgetFieldValue(java.lang.String fieldName)Gets the value of a specified field in this roster element.java.util.DategetLaunchDate()Gets the launch date of the workflow process that contains the work object.java.lang.StringgetOriginator()Returns the name of the user who initiated the workflow process that contains this work object.VWParticipantgetOriginatorPx()Returns the VWParticipant (security) object that represents the user who initiated the workflow process containing the current step.VWProcessgetProcess()Deprecated.Replaced byVWStepElement.fetchProcess()orVWWorkObject.fetchProcess(), depending on the type of process.java.lang.StringgetRosterName()Gets the name of this roster.java.lang.StringgetSelectedResponse()Returns the value in the F_Response system field for this object.intgetServerLocation()Gets the current server location of the work object.java.lang.StringgetStepName()Gets the step label for this roster element.java.lang.StringgetSubject()Returns the value in the F_Subject system field for this object.java.lang.StringgetTag()Gets the tag of the work object (as a string).java.lang.StringgetWorkflowNumber()Gets the workflow number.java.lang.StringgetWorkFlowNumber()Deprecated.Replaced byVWRosterElement.getWorkflowNumber()java.lang.StringgetWorkObjectName()Gets the name of this work object.java.lang.StringgetWorkObjectNumber()Gets the work object number (as a string).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 a string version of a work object name.voidtoXML(java.lang.StringBuffer theBuffer)Appends an XML string representing this instance to the buffer specified.
-
-
-
Method Detail
-
fetchInstructionElement
public VWInstructionElement fetchInstructionElement(boolean lock, boolean overrideLock) throws VWException
Deprecated. Replaced byfetchStepElementFetches the instruction element that corresponds to the roster element.- Parameters:
lock- Specifytrueto lock the work object;falseto leave the lock active.overrideLock-trueto override an existing lock on the work object.- Returns:
- A VWInstructionElement object that represents an instruction element for the roster.
- Throws:
VWException- Thrown if the method cannot fetch the instruction element that corresponds to the roster element.
-
fetchWorkObject
public VWWorkObject fetchWorkObject(boolean lock, boolean overrideLock) throws VWException
Fetches the work object that corresponds to this roster 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 this roster 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 roster element cannot be retrieved.
-
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
-
getFieldNames
public java.lang.String[] getFieldNames()
Lists the names of both user-defined and system field names supported by this roster element. 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 roster element supports.- Returns:
- A String array of the authored field names.
- Since:
- P8 4.0
-
getFieldValue
public java.lang.Object getFieldValue(java.lang.String fieldName) throws VWExceptionGets the value of a specified field in this roster element.- 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_".
- 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.
-
getStepName
public java.lang.String getStepName() throws VWExceptionGets the step label for this roster 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 roster 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
-
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 workflow, if a translation source exists; otherwise, the authored name is returned.
- Throws:
VWException- Thrown if the workflow object name cannot be found.
-
getWorkObjectNumber
public java.lang.String getWorkObjectNumber() throws VWExceptionGets the work object number (as a string). You can use the string for an index value.- Returns:
- The work object number, which corresponds to the F_WobNum queue field.
- Throws:
VWException- Thrown when a new roster element is referenced. It will not have a work object number until it is dispatched (becomes a work object).
-
getTag
public java.lang.String getTag() throws VWExceptionGets the tag of the work object (as a string).- Returns:
- The tag. The work object name is normalized and saved as a tag in the database. The normalization process makes sorting work object names that include integers consistently reproducible.
- Throws:
VWException- Thrown if the method cannot get the tag of the work object.
-
getServerLocation
public int getServerLocation() throws VWExceptionGets the current server location of the work object.- Returns:
- A integer value indicating the number of the server on which the work object resides.
- Throws:
VWException- Thrown if the method cannot get the current server location of the work object.
-
toString
public java.lang.String toString()
Gets a string version of a work object name.- Overrides:
toStringin classjava.lang.Object- Returns:
- The name of the work object.
-
getProcess
public VWProcess getProcess() throws VWException
Deprecated. Replaced byVWStepElement.fetchProcess()orVWWorkObject.fetchProcess(), depending on the type of process.Gets the workflow process associated with the roster element. Once you have the process object, you can retrieve a work object from the process and fetch the associated VWAttachments and VWStepElement.- Returns:
- A VWProcess object that represents the roster element.
- Throws:
VWException- Thrown if the method cannot get the workflow process associated with the roster element.- 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. These fields are not modifiable from the roster element.- 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
-
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 field 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 VWExceptionReturns the value in the F_Response system field for this object. If a translation source exists, the authored data field information is translated.- Returns:
- A String containing the translated data field information, if a translation source exists; otherwise, the authored information is returned. If the field cannot be found, null 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
-
getRosterName
public java.lang.String getRosterName() throws VWExceptionGets the name of this roster. If a translation source exists, the authored queue name is translated.- Returns:
- A String containing the translated name of the roster for this work object, if a translation source exists; otherwise, the authored name is returned.
- Throws:
VWException- Thrown if the roster name cannot be found.- Since:
- VWWS3.10
-
getLaunchDate
public java.util.Date getLaunchDate() throws VWExceptionGets the launch date of the workflow process that contains the work object.- Returns:
- A date value that indicates the launch date of the workflow process that contains the work object. If the field does not exist, the method returns null.
- Throws:
VWException- Thrown if the method cannot get the launch date of the workflow process that contains the work object.- Since:
- VWWS3.10
-
getOriginator
public java.lang.String getOriginator() throws VWExceptionReturns the name of the user who initiated the workflow process that contains this work object.- Returns:
- The name of the user who launched the workflow process that contains the work object, or null, if no user name is found.
- Throws:
VWException- Since:
- VWWS3.10
-
getOriginatorPx
public VWParticipant getOriginatorPx() throws VWException
Returns the VWParticipant (security) object that represents the user who initiated the workflow process containing the current step.- Returns:
- The VWParticipant (security) object that represents the user who initiated the workflow process containing the current step, or null, if no user name is found.
- Throws:
VWException- Since:
- VWWS3.10
-
getWorkFlowNumber
public java.lang.String getWorkFlowNumber() throws VWExceptionDeprecated. Replaced byVWRosterElement.getWorkflowNumber()Gets the string version of the workflow number. You can use the returned F_WorkFlowNumber as an index key component.- Returns:
- The workflow object number as a string, which corresponds to the F_WorkFlowNumber. If the field does not exist, the method returns null.
- Throws:
VWException- Thrown if the method cannot get the string version of the workflow number.
-
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.
-
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
-
-