Class VWLogElement
- java.lang.Object
-
- filenet.vw.api.VWLogElement
-
- All Implemented Interfaces:
- IVWtoXML, java.io.Serializable
public final class VWLogElement extends java.lang.Object implements IVWtoXML, java.io.Serializable
Use this class to retrieve log element information, which is retrieved from the event log record.Instantiate this class by calling
VWLogQuery.next.- Since:
- VWWS3.10
- See Also:
VWLogQuery, 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.java.lang.String[]getAuthoredFieldNames()Lists the system and user-defined (authored) field names for this instance.java.lang.StringgetAuthoredStepName()Gets the authored (untranslated) step name for this log element.VWDataFieldgetDataField(java.lang.String name)Gets the requested data field from this log element.VWDataField[]getDataFields()Gets the data fields supported by this log element.longgetDuration()Gets the duration of the logging period.intgetEventType()Gets the event type of the log record.java.lang.String[]getFieldNames()Lists the system and user-defined field names for this instance.java.lang.ObjectgetFieldValue(java.lang.String fieldName)Gets the value of the named user-defined field.java.lang.StringgetInstructionSheetName()Gets the name of the instruction sheet for the work object.intgetMachineId()Retrieves the system type of the machine associated with the log element.java.lang.StringgetMapName()Gets the name of the workflow map of the work object.java.lang.StringgetOperationName()Gets the operation name of this log element.java.lang.StringgetParentWorkObjectNumber()Gets the string version of the parent work object number.java.lang.StringgetQueueName()Gets the name of the queue that is associated with this log element and the current work object.java.lang.StringgetSelectedResponse()Returns the value in the F_Response field for this instance.intgetSequenceNumber()Deprecated.sequence number is a double in VWLog since CPE 5.2.1, keep this method for the compatibility with existing customer application should use getSequenceNumberAsDouble() method or getFieldValue("F_SeqNumber")doublegetSequenceNumberAsDouble()Gets the simple sequence number of the record, beginning the count at 1 and increasing by one with each new record.intgetServerLocation()Gets the current server location of the work object.java.lang.StringgetStepName()Gets the step name for this log element.java.lang.StringgetSubject()Returns the value in the F_Subject field for this instance.java.lang.StringgetText()Gets the text entered in the log.java.util.DategetTimeStamp()Gets the timestamp of the current log record, as a date variable showing the time the log element was included in the log.java.lang.StringgetUserName()Gets the user name associated with the log record.VWParticipantgetUserNamePx()Gets the security object of the user associated with the log record.java.lang.StringgetWorkClassName()Gets the name of the work class from which the current work object is instantiated.java.lang.StringgetWorkflowName()Gets the name of the workflow.java.lang.StringgetWorkFlowNumber()Gets the workflow number.java.lang.StringgetWorkObjectNumber()Gets the string version of the work object number.java.lang.StringgetWorkObjectTag()Gets the work object tag value.intgetWorkOrderId()Gets the authored work order ID for the instruction or step the work object was processing at the time the system logged the record.booleanhasField(java.lang.String fieldName)Determines whether or not the named user-defined field name exists.java.lang.StringtoString()Gets a string version of the time stamp and sequence number for the record.voidtoXML(java.lang.StringBuffer theBuffer)Appends an XML string representing this instance to the buffer specified.
-
-
-
Method Detail
-
getFieldNames
public java.lang.String[] getFieldNames()
Lists the system and user-defined field names for this instance. If a translation source exists, the authored names are translated.- Returns:
- A String array of the system and user-defined field names. The translated names of the fields are returned if a translation source exists; otherwise, the authored names are returned.
-
getAuthoredFieldNames
public java.lang.String[] getAuthoredFieldNames()
Lists the system and user-defined (authored) field names for this instance.- Returns:
- A String array of the system and user-defined (authored) field names.
- Since:
- P8 4.0
-
getFieldValue
public java.lang.Object getFieldValue(java.lang.String fieldName) throws VWExceptionGets the value of the named user-defined field. The authored (untranslated) name is used.- Parameters:
fieldName- A String containing the name of the field from which to return the value.- Returns:
- the field value
- Throws:
VWException- Thrown for various reasons, including when the field name specified is invalid.
-
hasField
public boolean hasField(java.lang.String fieldName) throws VWExceptionDetermines whether or not the named user-defined field name exists. The authored (untranslated) name is used.- Parameters:
fieldName- A String containing the user-defined field name to check.- Returns:
- A boolean value of true if a field with the name specified in the fieldName parameter exists; otherwise, false.
- Throws:
VWException- Thrown for various reasons, including when this method cannot determine whether or not the user-defined field name exists.
-
getTimeStamp
public java.util.Date getTimeStamp() throws VWExceptionGets the timestamp of the current log record, as a date variable showing the time the log element was included in the log.- Returns:
- A time value for the time when the log element was included in the log.
- Throws:
VWException- Thrown for various reasons, including when this method cannot find the timestamp for the log record.
-
getSequenceNumberAsDouble
public double getSequenceNumberAsDouble() throws VWExceptionGets the simple sequence number of the record, beginning the count at 1 and increasing by one with each new record.- Returns:
- The sequence number of the log record.
- Throws:
VWException- Thrown for various reasons, including when the sequence number is not found.- Since:
- CPE 5.2.1.0
-
getSequenceNumber
public int getSequenceNumber() throws VWExceptionDeprecated. sequence number is a double in VWLog since CPE 5.2.1, keep this method for the compatibility with existing customer application should use getSequenceNumberAsDouble() method or getFieldValue("F_SeqNumber")- Returns:
- Throws:
VWException
-
getUserName
public java.lang.String getUserName() throws VWExceptionGets the user name associated with the log record.- Returns:
- The user name associated with the log record.
- Throws:
VWException
-
getUserNamePx
public VWParticipant getUserNamePx() throws VWException
Gets the security object of the user associated with the log record.- Returns:
- The security object of the user associated with the log record.
- Throws:
VWException
-
getEventType
public int getEventType() throws VWExceptionGets the event type of the log record. Process Engine events relate to the following categories:- Process Engine (VW)
- work objects (WO)
- Work Performers (WP)
The event type characterizes events the system logs for various logging options, as shown below. To view descriptions of these events, refer to the "Manage Event Logs" section of the Process Configuration Console online help.
Event types, ordered by ascending logging option value, are as follows:VW_WOTraceOption:
100
VW_WOSystemOperation
110VW_WOMovedToServer
120VW_WONameChanged
VW_WOReassignToProxy:
VW_WORulesOption:
VW_WOMilestoneOption:
VW_WOCreateOption:
130
VW_WOChildCreation
140VW_WOParentCreation
550VW_CreateWobNumMsg
VW_WOTerminateOption:
150
VW_WOChildTermination
160VW_WOParentTermination
165VW_WFTerminationMsg
VW_WOExceptionOption:
170
VW_WOException
172VW_WODeadline
174VW_WOReminder
VW_ WOAdministrationOption:
180
VW_WOForcedToSkipInstruction
190VW_WOForcedToTerminate
200VW_WOForcedToDelete
VW_VMSystem:
230
VW_VWLogVectorChanged
240VW_VWUserLogin
250VW_VWUserLogout
260VW_VWStartTransfer
265VW_VWNewConfigMsg
266VW_VWNewWorkClassMsg
270VW_VWEndTransfer
280VW_VWStartCleanRepository
290VW_VWEndCleanRepository
300VW_VWStartInitRegion
310VW_VWEndInitRegion
320VW_VWStartFullInitialize
330VW_VWEndFullInitialize
340VW_VWRemoveDatabase
VW_VMBeginServiceOption:
350
VW_WPBeginService
352VW_WPWorkObjectQueued
VW_VMServiceCompleteOption:
360
VW_WPEndServiceNormal
365VW_WPWOBSaveWithLock
370VW_WPEndServiceAbnormal
380VW_WPEndServiceRelease
382VW_WPEndServiceReleaseDelegate
384VW_WPEndServiceReleaseReassign
386VW_WPEndServiceReleaseReturn
390VW_WPEndServiceAbort
400VW_WPCheckPoint
405VW_WPExitingInstrSheet
407VW_WPReturnInstrSheetMsg
VW_USER1Option:
410
USER1_MESSAGE1
420USER1_MESSAGE2
430USER1_MESSAGE3
440USER1_MESSAGE4
VW_USER2Option:
450
USER2_MESSAGE1
460USER2_MESSAGE2
470USER2_MESSAGE3
480USER2_MESSAGE4
VW_USER1Option:
- Returns:
- An integer value indicating the event type.
- Throws:
VWException- The method throws an exception if it cannot get the event type of the log record.- See Also:
VWLoggingOptionType#getLocalizedString(int) VWLoggingOptionType.getLocalizedString(int)}
-
getWorkObjectNumber
public java.lang.String getWorkObjectNumber() throws VWExceptionGets the string version of the work object number.- Returns:
- The work object number.
- Throws:
VWException- Thrown when a new log element is referenced. It will not have a work object number until it is dispatched (becomes a work object).
-
getParentWorkObjectNumber
public java.lang.String getParentWorkObjectNumber() throws VWExceptionGets the string version of the parent work object number.- Returns:
- The parent work object number.
- Throws:
VWException- Thrown for various reasons, including when this method cannot find the parent work object number.
-
getQueueName
public java.lang.String getQueueName() throws VWExceptionGets the name of the queue that is associated with this log element and the current work object. If a translation source exists, the authored name is translated.- Returns:
- A String containing the translated name, if a translation source exists; otherwise, the authored name is returned. If an associated queue name cannot be found, null is returned.
- Throws:
VWException
-
getOperationName
public java.lang.String getOperationName() throws VWExceptionGets the operation name of this log element. If a translation source exists, the authored name is translated.- Returns:
- A String containing the translated name, if a translation source exists; otherwise, the authored name is returned. If an operation name cannot be found, null is returned.
- Throws:
VWException
-
getWorkClassName
public java.lang.String getWorkClassName() throws VWExceptionGets the name of the work class from which the current work object is instantiated. If a translation source exists, the authored name is translated.- Returns:
- A String containing the translated name, if a translation source exists; otherwise, the authored name is returned. If an associated work class name cannot be found, null is returned.
- Throws:
VWException
-
getInstructionSheetName
public java.lang.String getInstructionSheetName() throws VWExceptionGets the name of the instruction sheet for the work object. If a translation source exists, the authored name is translated.- Returns:
- A String containing the translated name, if a translation source exists; otherwise, the authored name is returned. If an associated instruction sheet cannot be found, null is returned.
- Throws:
VWException
-
getMachineId
public int getMachineId() throws VWExceptionRetrieves the system type of the machine associated with the log element.- Returns:
- An integer value indicating the machine type
associated with this log element. The possible values are:
- 0: No machine is associated with the log element.
- 1: The system is running the Process Engine
- (-)2: The machine is running a Java-based web application-- -2 returns when there is no machine ID associated with a web application.
- Throws:
VWException- Thrown for various reasons, including when the machine id value is not found.
-
getWorkOrderId
public int getWorkOrderId() throws VWExceptionGets the authored work order ID for the instruction or step the work object was processing at the time the system logged the record.- Returns:
- An integer value for the authored work order ID, or -1 if the is no associated work order ID.
- Throws:
VWException- The method throws an exception if it cannot get the authored work order ID for the instruction or if it cannot get the step that the work object was processing at the time the system logged the record.
-
getDuration
public long getDuration() throws VWExceptionGets the duration of the logging period. Duration is valid only for a specific event.- Returns:
- A duration in milliseconds.
- Throws:
VWException
-
getWorkObjectTag
public java.lang.String getWorkObjectTag() throws VWExceptionGets the work object tag value.- Returns:
- An integer value for the authored work order ID, or -1 if there is no associated work order ID.
- Throws:
VWException
-
getText
public java.lang.String getText() throws VWExceptionGets the text entered in the log.- Returns:
- The text from the log element entry.
- Throws:
VWException
-
getWorkflowName
public java.lang.String getWorkflowName() throws VWExceptionGets the name of the workflow. If a translation source exists, the authored name is translated.- Returns:
- A String containing the translated name, if a translation source exists; otherwise, the authored name is returned. If an associated workflow name cannot be found, null is returned.
- Throws:
VWException
-
getMapName
public java.lang.String getMapName() throws VWExceptionGets the name of the workflow map of the work object. If a translation source exists, the authored name is translated.- Returns:
- A String containing the translated name, if a translation source exists; otherwise, the authored name is returned. If an workflow map cannot be found, null is returned.
- Throws:
VWException
-
getStepName
public java.lang.String getStepName() throws VWExceptionGets the step name for this log element. If a translation source exists, the authored name is translated.- Returns:
- A String containing the translated name, if a translation source exists; otherwise, the authored name is returned. If an step name cannot be found, null is returned.
- Throws:
VWException- Thrown if a step name cannot be found for this log element.
-
getAuthoredStepName
public java.lang.String getAuthoredStepName() throws VWExceptionGets the authored (untranslated) step name for this log element.- Returns:
- A String containing the authored name, if it exists. If the step name cannot be found, null is returned.
- Throws:
VWException- Thrown if a step name cannot be found for this log element.- Since:
- P8 4.0
-
toString
public java.lang.String toString()
Gets a string version of the time stamp and sequence number for the record.- Overrides:
toStringin classjava.lang.Object- Returns:
- The timestamp and the sequence number for this log element.
-
getDataFields
public VWDataField[] getDataFields() throws VWException
Gets the data fields supported by this log element. If a translation source exists, the authored names are translated.- Returns:
- An array of the VWDataField objects supported by this log element. The translated names of the data fields are returned if a translation source exists; otherwise, the authored names are returned.
- Throws:
VWException- Thrown if the data fields supported cannot be listed.- Since:
- VWWS3.10
- See Also:
VWDataField
-
getDataField
public VWDataField getDataField(java.lang.String name) throws VWException
Gets the requested data field from this 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 field for this instance. If a translation source exists, the authored response is translated.- Returns:
- A String containing the translated response, if a translation source exists; otherwise the authored response is returned.
- Throws:
VWException- Thrown if a problem occurs retrieving the field.- Since:
- P8 4.0
-
getSubject
public java.lang.String getSubject() throws VWExceptionReturns the value in the F_Subject field for this instance. If a translation source exists, the authored subject is translated.- Returns:
- A String containing the translated subject, if a translation source exists; otherwise the authored subject is returned.
- Throws:
VWException- Thrown if a problem occurs retrieving the field.- Since:
- P8 4.0
-
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
-
-