|
Process API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfilenet.vw.api.VWLog
public final class VWLog
Use this class to query logs, determine the associated session, and access the log definition. The VWSession.fetchEventLog() method instantiates this class. Once you have a VWLog object, you can query logs, based on different query criteria.
VWSession
,
VWLogQuery
,
VWLogDefinition
,
Serialized FormField Summary | |
---|---|
static int |
QUERY_GET_NO_TRANSLATED_SYSTEM_FIELDS
Value of 2048. Include this value in the queryFlags parameter of the createQuery() method to return objects without translated system fields. |
static int |
QUERY_MAX_VALUES_INCLUSIVE
Value of 64. This value is used as a possible value for the queryFlags parameter of the startQuery method. |
static int |
QUERY_MIN_VALUES_INCLUSIVE
Integer value of 32. This value is used as a possible value for the queryFlags parameter of the startQuery method. |
static int |
QUERY_NO_OPTIONS
Value of 0. This value is used as a possible value for the queryFlags parameter of the startQuery method. |
static int |
QUERY_RESOLVE_NAMES
Value of 8192. |
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. |
VWLogDefinition |
fetchLogDefinition()
Fetches the log definition. |
java.lang.String |
getAuthoredName()
Return the authored name |
int |
getBufferSize()
Gets the maximum number of elements set by the user to return in a fetch. |
java.lang.String |
getName()
Returns the name of this instance, as it is stored in the workflow database. |
VWSession |
getServiceSession()
Gets the session that contains the query object. |
void |
setBufferSize(int theNewSize)
Sets the maximum number of elements to return in a fetch. |
VWLogQuery |
startQuery(java.lang.String indexName,
java.lang.Object[] minValues,
java.lang.Object[] maxValues,
int queryFlags,
java.lang.String filter,
java.lang.Object[] substitutionVars)
Fetches log items based on conditions specified in the parameters. |
java.lang.String |
toString()
Gets the string version of the log name. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int QUERY_NO_OPTIONS
public static final int QUERY_MIN_VALUES_INCLUSIVE
public static final int QUERY_MAX_VALUES_INCLUSIVE
public static final int QUERY_RESOLVE_NAMES
VWRoster.QUERY_RESOLVE_NAMES
,
VWQuery#QUERY_RESOLVE_NAMES
,
Constant Field Valuespublic static final int QUERY_GET_NO_TRANSLATED_SYSTEM_FIELDS
Use for performance enhancement when methods on a retrieved object are not needed and only the returned data itself is needed.
System fields and translated system fields are used in the helper methods for each object. Note that VWWorkObject objects have system fields that are not present in VWStepElement objects. A VWStepElement object contains only parameter data if this flag is used. However, a VWWorkObject object will contain system fields even if this flag is used.
A method that requires translation returns a default value (null, 0, or false) for this flag. This is because related helper methods require the system fields and translated system fields to function properly.
Method Detail |
---|
public static java.lang.String _get_FILE_DATE()
public static java.lang.String _get_FILE_AUTHOR()
public static java.lang.String _get_FILE_REVISION()
public VWLogQuery startQuery(java.lang.String indexName, java.lang.Object[] minValues, java.lang.Object[] maxValues, int queryFlags, java.lang.String filter, java.lang.Object[] substitutionVars) throws VWException
The query bases log item retrieval on a filter condition and a range you specify in an index key with Composer. Use a logical AND to include minimum and maximum (minValue and maxValue) index key values, query options (queryFlags), and filters with substitution variables (substitutionVars). Returned log query items match all fetch criteria specified in the parameters.
indexName
- The authored name of the database index key for the log element
items, or a system search field
name. Use either the name assigned to the index at the
Configuration Console or a system search field name.
Note: An index assigned through the Configuration Console can be a user-defined or system-defined search field, or it can be both.
System indexes include:
F_LogTime = F_TimeStamp + F_SeqNumber F_LogWobTag = F_WorkObjectTag + F_TimeStamp + F_SeqNumber
The standard system search fields are:
minValues
- An array of minimum values used to compare index key fields.
The array elements type must match the type of the fields in the index key. If the number of minValues array elements is smaller than the number of index key fields, the system assumes the fields at the end of the index key have no value. The array elements must be of a Java type that corresponds to a Process Engine type (integer, float, boolean, or string). Strings must be the authored strings.
For example:
myIndex = integerA + stringB + booleanC; Object[] minValues = {new Integer(1000), "aardvark", new Boolean(true)};
maxValues
- An array of maximum values used to compare the
index key fields.
The array elements type must match the type of the fields in the index key. If the number of maxValues array elements is smaller than the number of index key fields, the system assumes the fields at the end of the index key have no value. The array elements must be of a Java type that corresponds to a Process Engine type (integer, float, boolean, or string). Strings must be the authored strings.
queryFlags
- Integer value flags that specify the query
options.
Setting this parameter refines the query for the log records
specified by the index. Use the | and + operators to
combine the the flags. See the query properties for this instance
and the QUERY_* properties on VWQuery
for
descriptions of the possible query flags.
filter
- A SQL WHERE clause used as a filter, and having placeholder
variables that are replaced by values in the substitutionVars parameter.
Use this parameter with the parameter settings for minValues, maxValues, and queryFlags to refine the search. The SQL WHERE clause should contain a search field name on the left side of a boolean operator and a placeholder variable on the right side of the operator.
The field names are processed as SQL column names. For this reason, it is important that you do no use SQL function names as field names.
For example:
integerA < :A AND stringB =:B
specifies that an object satisfies the filter if it meets the following conditions:
Use the following guidelines when creating the filter:
substitutionVars
- An array of objects containing the
values to substitute for the placeholder variables specified in the
SQL WHERE clause for the filter parameter.
A VWWorkObjectNumber
object can be used here in place of F_WobNum and
F_WorkFlowNumber. Queries to DB2 databases must use VWWorkObjectNumber instead
of F_WobNum or F_WorkFlowNumber.
If there is no placeholder variable in the filter parameter, the values for the substitutionVars parameter will be ignored (and can be null). The array elements in this parameter are substituted, in corresponding order, for the placeholder variables in the filter parameter.
Note: When using special SQL characters (such as, %), these characters need to be contained within the substitution string, and the entire substitution string must be quoted.
For example, if the filter parameter contains three placeholder variables specified as ":A", there must be three corresponding substitution variables.
For example:
{new Integer(1000),"Smith"}
This substitutionVars parameter would have a corresponding filter parameter of the following:
integerA < 1000 AND stringB = "Smith"
Note: Time columns in the database can be exposed as either 32-bit (can only support dates earlier than 2038) or 64-bit (can support dates beyond 2038). If a user has a filter on a 32-bit time field, the value bound to the bind variable in the query using that filter must be a value that can fit in 32-bits, otherwise the query will not return the expected result. For example:
"my32bitColumn < :a"
will not work correctly if bound to the date value "11/11/2099"; however, binding it to the value "11/11/2037" will return the expected result.
As a further example, assume the log being queried contains a row with two exposed fields, atime64 (64-bit) and atime32 (32-bit), and both fields have the date/time value "11/11/2008 12:12:12".
Using the filter:
String filter = "atime64 < :a AND atime32 < :b";
the following substitution variables will return the fetched row after applying the filter and substitutionVars in the query:
Object[] subsVars = {sdf.parse("2040-01-01 12:00:00"), sdf.parse("2020-01-01 12:00:00")}; // works
However, the following query will not be able to fetch the row, because it binds a value that will not fit in a 32-bit column:
Object[] subsVars = {sdf.parse("2040-01-01 12:00:00"), sdf.parse("2040-01-01 12:00:00")}; // does not work.
VWException
- The method throws an exception if it
cannot complete the process of fetching log items.public VWSession getServiceSession()
public java.lang.String toString()
toString
in class java.lang.Object
public int getBufferSize()
public void setBufferSize(int theNewSize) throws VWException
theNewSize
- An integer value that specifies the number of
elements to return in a fetch. The value must be greater
than 0 (zero).
VWException
- The method throws an exception if buffer
size is less than or equal to 0 (zero).public VWLogDefinition fetchLogDefinition() throws VWException
VWException
- The method throws an exception if it
cannot complete the process of fetching the log definition.public java.lang.String getName()
Note: The translation is done only at runtime, so will not appear in design-time applications (such as the Process Designer or Configuration Console).
public java.lang.String getAuthoredName()
|
Process API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |