Process API

filenet.vw.api
Class VWQueue

java.lang.Object
  extended by filenet.vw.api.VWQueue
All Implemented Interfaces:
java.io.Serializable

public final class VWQueue
extends java.lang.Object
implements java.io.Serializable

Use this class to access the contents of a queue. Specify which part of the queue contents you wish to access by the input of search criteria to parameters of the createQuery(). Use other methods to obtain specific information about a queue, like the queue depth and searchable fields.

The VWSession.getQueue() method creates an instance of the VWQueue class.

See Also:
VWSession, VWQueueStats, VWQueueQuery, VWQueueDefinition, createQuery(java.lang.String, java.lang.Object[], java.lang.Object[], int, java.lang.String, java.lang.Object[], int), Serialized Form

Field Summary
static int QUERY_GET_NO_SYSTEM_FIELDS
          Value of 1024. Include this value in the queryFlags parameter of the createQuery() method to return objects without system fields.
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_GET_SYSTEM_FIELDS
          Deprecated. Not replaced. This is the default.
static int QUERY_GET_TRANSLATED_SYSTEM_FIELDS
          Deprecated. Not replaced. This is the default.
static int QUERY_LOCK_OBJECTS
          Value of 16. Include this value in the queryFlags parameter of the createQuery() method to lock the work items returned from a search.
static int QUERY_MAX_VALUES_INCLUSIVE
          Value of 64. Include this value in the queryFlags parameter of the createQuery() method to include maximum search values.
static int QUERY_MIN_VALUES_INCLUSIVE
          Value of 32. Include this value in the queryFlags parameter of the createQuery() method to include minimum search values.
static int QUERY_NO_OPTIONS
          Value of 0. Pass this value as the queryFlags parameter of the createQuery() method to use the no search options option.
static int QUERY_READ_BOUND
          Value of 2. Include this value in the queryFlags parameter of the createQuery() method to return work items that are bound to a user or machine.
static int QUERY_READ_LOCKED
          Value of 1. Include this value in the queryFlags parameter of the createQuery() method to return locked and unlocked work items.
static int QUERY_READ_UNWRITABLE
          Value of 4. Include this value in the queryFlags parameter of the createQuery() method to return writable and unwritable work items.
static int QUERY_RESOLVE_NAMES
          Value of 8192.
static int QUEUE_TYPE_PROCESS
          Value of 1. This value is returned by the getQueueType() method to indicate that the queue is a process queue.
static int QUEUE_TYPE_SYSTEM
          Value of 3. This value is returned by the getQueueType method to indicate that the queue is a system queue.
static int QUEUE_TYPE_USER_CENTRIC
          Value of 2. This value is returned by the getQueueType method to indicate that the queue is a user queue.
 
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.
 java.lang.String convertOperationIdToName(int theOperationId)
          Converts an operation ID to a name, using the name/ID pair in the current workspace.
 int convertOperationNameToId(java.lang.String theOperationName)
          Converts an operation name to an ID, using the name/ID pair in the current workspace.
 VWQueueQuery createQuery(java.lang.String indexName, java.lang.Object[] minValues, java.lang.Object[] maxValues, int queryFlags, java.lang.String filter, java.lang.Object[] substitutionVars, int fetchType)
          Performs a filtered fetch of queue items.
 int fetchCount()
          Gets the integer value indicating the queue depth.
 java.lang.String[] fetchIndexFields()
          Deprecated. Replaced by fetchQueueDefinition Fetches the user-defined index names for a specified queue.
 java.lang.String[] fetchIndexKeyFields(java.lang.String indexField)
          Deprecated. Replaced by fetchQueueDefinition Fetches the ordered fields of a user-defined search index, given a search field name. The order determines which field the application uses in the primary sort, each subsequent field being less significant than the previous.
 java.lang.String[] fetchOperationNames()
          Fetches the list of all the operation names for this queue.
 VWQueueDefinition fetchQueueDefinition()
          Fetches the definition for this queue.
 java.lang.String[] fetchQueueFields()
          Deprecated. Replaced by fetchQueueDefinition Fetches the user-defined search fields for a specified queue.
 VWQueueStats fetchStatistics(java.util.Date startTime, java.util.Date endTime, int timeUnits)
          Fetches statistical information for the queue, given a start and stop time.
 VWWorkBasket fetchWorkBasket(java.lang.String workBasketName)
           
 VWWorkBasket[] fetchWorkBaskets()
          Gets all of the workbaskets associated with this queue.
 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.
 int getCount()
          Deprecated. Replaced by fetchCount()
 boolean getIsConnectorQueue()
          Indicates whether or not this queue is a connector queue.
 java.lang.String getName()
          Return the translated name
 int getQueueType()
          Gets an integer value indicating the queue type.
 VWSession getServiceSession()
          Identifies the session that instantiated the search object.
 void setBufferSize(int theNewSize)
          Sets the maximum number of elements to return in a fetch.
 VWQueueQuery startQuery(java.lang.String indexName, java.lang.Object[] minValues, java.lang.Object[] maxValues, int queryFlags, java.lang.String filter, java.lang.Object[] substitutionVars)
          Deprecated. Replaced by createQuery.

Note: Differences between the use of createQuery() and the deprecated startQuery() method include the following:

  • createQuery() uses a fetchType input parameter.
  • createQuery()'s resultant query object uses iterator methods VWQueueQuery.next() and VWQueueQuery.hasNext(), emulating the Collection Model in Java 2.
  • Warning You cannot use iterator methods next() or hasNext() on a VWQueueQuery object instantiated by the deprecated startQuery() method--the iterator methods throw an exception if you do.
The search conditions you specify in the parameters of this method cause the retrieval of queue items based on a filter condition and a range in a search index.

Use the following to limit your search:

  • Logical AND for the minimum and maximum search index values (minValue and maxValue).
  • Search options (queryFlags).
  • Filters with substitution variables (substitutionVars).

For this method to successfully return a VWQueueQuery object, a queue item must match all fetch criteria specified by the input parameters.

 java.lang.String toString()
          Gets the string version of the queue name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

QUERY_NO_OPTIONS

public static final int QUERY_NO_OPTIONS
Value of 0. Pass this value as the queryFlags parameter of the createQuery() method to use the no search options option.

After passing this value, the returned work items are unlocked, unbound, and writable.

See Also:
Constant Field Values

QUERY_READ_LOCKED

public static final int QUERY_READ_LOCKED
Value of 1. Include this value in the queryFlags parameter of the createQuery() method to return locked and unlocked work items.

You can use this flag value in conjunction with other flag values. For example, QUERY_READ_LOCKED + QUERY_READ_BOUND returns work items that are locked and bound to a user or machine.

See Also:
Constant Field Values

QUERY_READ_BOUND

public static final int QUERY_READ_BOUND
Value of 2. Include this value in the queryFlags parameter of the createQuery() method to return work items that are bound to a user or machine.

See Also:
Constant Field Values

QUERY_READ_UNWRITABLE

public static final int QUERY_READ_UNWRITABLE
Value of 4. Include this value in the queryFlags parameter of the createQuery() method to return writable and unwritable work items. Not setting this flag value specifies the return of only writable work items.

See Also:
Constant Field Values

QUERY_LOCK_OBJECTS

public static final int QUERY_LOCK_OBJECTS
Value of 16. Include this value in the queryFlags parameter of the createQuery() method to lock the work items returned from a search.

The application locks any work item that meets search criteria. Do not set this flag value to leave unlocked work items unlocked, and avoid specifying QUERY_LOCK_OBJECTS + QUERY_READ_LOCKED.

See Also:
Constant Field Values

QUERY_MIN_VALUES_INCLUSIVE

public static final int QUERY_MIN_VALUES_INCLUSIVE
Value of 32. Include this value in the queryFlags parameter of the createQuery() method to include minimum search values. Minimum search values are the default "greater than" or "greater than or equal to".

See Also:
Constant Field Values

QUERY_MAX_VALUES_INCLUSIVE

public static final int QUERY_MAX_VALUES_INCLUSIVE
Value of 64. Include this value in the queryFlags parameter of the createQuery() method to include maximum search values. Maximum search values can be the default "less than" or "less than or equal to".

See Also:
Constant Field Values

QUERY_GET_SYSTEM_FIELDS

public static final int QUERY_GET_SYSTEM_FIELDS
Deprecated. Not replaced. This is the default.
Value of 256. Include this value in the queryFlags parameter of the createQuery() method of the startQuery() method to return system field names and values.

This value MUST be added to the queryFlags variable for this option to take effect with createQuery(), but it is included by default for startQuery().

Use the system fields for additional queries on objects. A method that requires translation returns a default value (null, 0, or false). Helper methods require the QUERY_GET_TRANSLATED_SYSTEM_FIELDS to function properly.

See Also:
Constant Field Values

QUERY_GET_TRANSLATED_SYSTEM_FIELDS

public static final int QUERY_GET_TRANSLATED_SYSTEM_FIELDS
Deprecated. Not replaced. This is the default.
Value of 512. Include this value in the queryFlags parameter of the createQuery() method to return system field names and translated system field values. This value MUST be added to the queryFlags variable for this option to take effect with createQuery(), but it is included by default for startQuery(). Use system fields in the helper methods for each element.

See Also:
Constant Field Values

QUERY_GET_NO_SYSTEM_FIELDS

public static final int QUERY_GET_NO_SYSTEM_FIELDS
Value of 1024. Include this value in the queryFlags parameter of the createQuery() method to return objects without system fields.

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 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.

See Also:
Constant Field Values

QUERY_GET_NO_TRANSLATED_SYSTEM_FIELDS

public static final 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.

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.

See Also:
Constant Field Values

QUERY_RESOLVE_NAMES

public static final int QUERY_RESOLVE_NAMES
Value of 8192. Flag Flag will signal query to parse max, min, substitution string and value for user name and class substitution of strings to ids. See RCI 3009.

See Also:
Constant Field Values

QUEUE_TYPE_PROCESS

public static final int QUEUE_TYPE_PROCESS
Value of 1. This value is returned by the getQueueType() method to indicate that the queue is a process queue. A process queue holds objects that an external workflow will process.

See Also:
Constant Field Values

QUEUE_TYPE_USER_CENTRIC

public static final int QUEUE_TYPE_USER_CENTRIC
Value of 2. This value is returned by the getQueueType method to indicate that the queue is a user queue. A user queue is the queue associated with a user; it is similar to the inbox for a user.

See Also:
Constant Field Values

QUEUE_TYPE_SYSTEM

public static final int QUEUE_TYPE_SYSTEM
Value of 3. This value is returned by the getQueueType method to indicate that the queue is a system queue.

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 date

_get_FILE_AUTHOR

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

Returns:
the author

_get_FILE_REVISION

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

Returns:
the file revision

getQueueType

public int getQueueType()
                 throws VWException
Gets an integer value indicating the queue type. Queue type integer values are as follows:


Returns:
An integer value indicating the type of the queue.
Throws:
VWException - The method returns an exception if the queue type cannot be determined.

getCount

public int getCount()
             throws VWException
Deprecated. Replaced by fetchCount()

Gets the integer value indicating the depth.

Returns:
An integer value indicating the current depth of the queue.
Throws:
VWException - The method throws an exception if a problem occurred while determining the queue depth.

fetchCount

public int fetchCount()
               throws VWException
Gets the integer value indicating the queue depth.

Returns:
An integer value indicating the current depth of the queue.
Throws:
VWException - The method throws an exception if a problem occurred while determining the queue depth.
Since:
VWWS3.10

startQuery

public VWQueueQuery 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
Deprecated. Replaced by createQuery.

Note: Differences between the use of createQuery() and the deprecated startQuery() method include the following:

  • createQuery() uses a fetchType input parameter.
  • createQuery()'s resultant query object uses iterator methods VWQueueQuery.next() and VWQueueQuery.hasNext(), emulating the Collection Model in Java 2.
  • Warning You cannot use iterator methods next() or hasNext() on a VWQueueQuery object instantiated by the deprecated startQuery() method--the iterator methods throw an exception if you do.
The search conditions you specify in the parameters of this method cause the retrieval of queue items based on a filter condition and a range in a search index.

Use the following to limit your search:

  • Logical AND for the minimum and maximum search index values (minValue and maxValue).
  • Search options (queryFlags).
  • Filters with substitution variables (substitutionVars).

For this method to successfully return a VWQueueQuery object, a queue item must match all fetch criteria specified by the input parameters.

Parameters:
indexName - The name of the database search index for the queue. Enter either the name assigned to the index at the Configuration Console (this may be a user-defined search field, a system search field, or both) or a name that is a system search field.

The standard system search fields for queues are listed below:

  • F_WobNum: work item number of type byte[]. For MS SQL, pass the hexadecimal version of the field value; for example, if F_WobNum were C4BCB36717A2D3119E0F00C04F8C7570, pass 0xC4BCB36717A2D3119E0F00C04F8C7570.
  • F_SortRule: predefined as F_Locked (type integer).
  • F_FiFo: defined to an internal value. Do not modify.

minValues - An array of minimum values with which to compare the index fields.

Array element data types must match the corresponding data types in the search index. If the number of minValues array elements is smaller than the number of search fields, the unmatched search fields are ignored. The array element types must be Java data types that correspond to Process Operation Parameter types.

In another example, the index named 'myIndex' is an integer, followed by a string, followed by a boolean, followed by a float, followed by a time-type value:

     myIndex = integerA + stringB + booleanC + floatD + timeE
     

Set sample minimum values, against which to compare the index, as follows:

     Object[] minValues = {new Integer(1000), "aardvark",
    new Boolean(true), new Float(0012345678.369), new Time( [date&time value] )}
maxValues - An array of maximum values with which to compare the index fields.

Array element data types must match the corresponding data types in the search index. If the number of maxValues array elements is smaller than the number of search fields, the unmatched search fields are ignored. The array element types must be Java data types that correspond to Process Operation Parameter types.

queryFlags - An integer value used to specify the search option. Setting this parameter refines the search for the work items specified by the search index. Use | and + operators to combine the options. See the Field Detail section for a description of these query flags:

  • 0: No query options.(QUERY_NO_OPTIONS)
  • 1: Read and lock (QUERY_READ_LOCKED)
  • 2: Read and bind (QUERY_READ_BOUND)
  • 4: Read-only (QUERY_READ_UNWRITABLE)
  • 16: Lock (QUERY_LOCK_OBJECTS)
  • 32: Include minValues value (QUERY_MIN_VALUE_INCLUSIVE)
  • 64: Include maxValues value (QUERY_MAX_VALUE_INCLUSIVE)

filter - A string containing a SQL statement that specifies a filter condition (for use with values input to the substitutionVars parameter).

Use this parameter with the parameter settings for minValues, maxValues, and queryFlags to refine the search. Input a SQL WHERE clause that contains a search field name on the left side of a boolean operator and a substitution placeholder on the right side of the operator.

For example, if the filter input is similar to the following SQL statements:

    integerA < :A AND stringB =:A

The above filter returns the object when it meets two conditions:

  • The integer, integerA, must be less than the value of the placeholder, A.
  • The string, stringB, must be equal to the value of the placeholder, A.

In the SQL statement, a colon (:) precedes each placeholder on the right side of the statement.

A search field must be a variable or a system or user-defined field. Use of the filter requires substitution of the placeholder to the right of each colon with a corresponding value you input to the substitutionVars parameter.

substitutionVars - An array of objects that contain the values to substitute for the variable names to the right of the colons in the SQL statement you passed to the filter parameter.

A substitution variable must begin with colon. If there is no variable in the filter parameter, the values for this parameter can be null. The array elements in this parameter substitute for the corresponding array elements in the filter parameter array. The filter parameter array elements act as place holders and must be substituted. For example, if three names are :A, a user needs three distinct substitution variables.

In another example, if you pass the following to the substitutionVars parameter:

    {new Integer(1000),"Smith"}

this parameter, in combination with the example parameter for filter input, will pass an object through the filter only when the following condition is met by the object:

    integerA < 1000 AND stringB = "Smith"

Note: Time columns in the database can be exposed as either 32-bit (4 byte - can only support dates earlier than 2038) or 64-bit (8 byte - 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 won't return the expected result -

example : "my32bitColumn < :a", will not work correctly if bound to a date value like "11/11/2099", It will work fine if you bind it to a value like "11/11/2037".

Java code example, assume the queue being queried contains row with two exposed fields, atime64 (64-bit) and atime32 (32-bit) values, both fields have the same value - a date like "11/11/2008 12:12:12"

With this filter :

   String filter = "atime64 < :a AND atime32 < :b"; 

the following substitution variables will return the row when fetching after using the filter and subvars in a query:

   Object[] subsVars = {sdf.parse("2040-01-01 12:00:00"), sdf.parse("2020-01-01 12:00:00")}; // works 

But the following filter will NOT find the row, because it binds a value that won't fit in 32-bits to a 32-bit column

   Object[] subsVars = {sdf.parse("2040-01-01 12:00:00"), sdf.parse("2040-01-01 12:00:00")}; // doesn't work. 

Returns:
A VWQueueQuery object from which items are fetched.
Throws:
VWException - Thrown if it cannot create a VWQueueQuery object.

createQuery

public VWQueueQuery createQuery(java.lang.String indexName,
                                java.lang.Object[] minValues,
                                java.lang.Object[] maxValues,
                                int queryFlags,
                                java.lang.String filter,
                                java.lang.Object[] substitutionVars,
                                int fetchType)
                         throws VWException
Performs a filtered fetch of queue items. The filters specify search conditions flexibly and include setting a range for the search index. If a translation source exists, the authored names of the queue items are translated. The authored names must be specified for the query parameters.

This method employs the following condition descriptors to define the filters:

For this method to successfully return a given queue item, the queue item must pass all the fetch criteria specified by the input parameters.

Parameters:
indexName - The name of the database search index for the queue. If a translation source exists, the authored name is translated. Enter 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.

The standard system search fields for queues are:

  • F_WobNum: work item number of type byte[].
    For MS SQL, use the syntax: 0x.
    For DB2, use the syntax: x''.
    For Oracle, use the syntax: ''
  • F_SortRule: predefined as F_Locked (type integer)
  • F_FiFo: defined to an internal value. Do not modify.
minValues - An array of objects containing the minimum values with which to compare the index fields.

Array element data types must match the corresponding data types in the search index. If the number of minValues array elements is smaller than the number of search fields, the unmatched search fields are ignored. 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 objects containing the maximum values with which to compare the index fields.

Array element data types must match the corresponding data types in the search index. If the number of maxValues array elements is smaller than the number of search fields, the unmatched search fields are ignored. 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 - An integer value that specifies the search options.

Setting this parameter refines the search for the work items specified by the search 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:

  1. The integer search field, integerA, must be less than the value of the placeholder variable A.
  2. The string search field, stringB, must be equal to the value of the next placeholder variable B.

Use the following guidelines when creating the filter:

  • In a SQL WHERE clause, a colon (:) precedes each placeholder variable on the right side of the statement.
  • The search field can be a variable, a system field, or a user-defined field (the authored string).
  • When the filter parameter is processed, each placeholder variable is replaced (in corresponding order) with a value specified in the substitutionVars parameter.

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 queue 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. 
fetchType - An integer value associated with the element type to be retrieved by using the object returned by VWQueueQuery. Valid element type values are as follows:
  • 1: Work object (FETCH_TYPE_WORKOBJECT)
  • 2: Instruction element (FETCH_TYPE_INSTRUCTION_ELEMENT)
  • 3: Queue element (FETCH_TYPE_QUEUE_ELEMENT)
  • 5: Step element (FETCH_TYPE_STEP_ELEMENT)
Returns:
A VWQueueQuery object for the queue from which items are fetched with the VWQueueQuery.next method.

A user must have appropriate access privileges to the queue to fetch work items (using the FETCH_TYPE_WORKOBJECT fetchType) or queue elements (using the FETCH_TYPE_QUEUE_ELEMENT fetchType). However, users may fetch their own instruction elements or step elements, regardless of queue access privilege.

Throws:
VWException

getServiceSession

public VWSession getServiceSession()
Identifies the session that instantiated the search object.

Returns:
The VWSession object that instantiated the object.

fetchQueueDefinition

public VWQueueDefinition fetchQueueDefinition()
                                       throws VWException
Fetches the definition for this queue. The queue definition contains search fields, search indexes, security information, and the server location of the queue. If a translation source exists, the authored information is translated.

Note: The translation is done only at runtime, so will not appear in design-time applications (such as the Process Designer or Configuration Console).

Returns:
A VWQueueDefinition object for the queue. If a translation source exists, the translated information is returned; otherwise, the authored information is returned.
Throws:
VWException - Thrown if the definition for this queue cannot be found.
Since:
VWWS3.10

fetchQueueFields

public java.lang.String[] fetchQueueFields()
                                    throws VWException
Deprecated. Replaced by fetchQueueDefinition Fetches the user-defined search fields for a specified queue.

Returns:
A string containing an array of search index fields.
Throws:
VWException - The method throws an exception if it cannot fetch the user-defined search fields for a specified queue.

fetchIndexFields

public java.lang.String[] fetchIndexFields()
                                    throws VWException
Deprecated. Replaced by fetchQueueDefinition Fetches the user-defined index names for a specified queue.

Returns:
A string containing an array of search index fields.
Throws:
VWException - The method throws an exception if it cannot Fetch the user-defined index names for a specified queue.

fetchIndexKeyFields

public java.lang.String[] fetchIndexKeyFields(java.lang.String indexField)
                                       throws VWException
Deprecated. Replaced by fetchQueueDefinition Fetches the ordered fields of a user-defined search index, given a search field name. The order determines which field the application uses in the primary sort, each subsequent field being less significant than the previous.

Parameters:
indexField - The name of the user-defined search field (for example, F_WobNum, F_SortRule, and F_Fifo are system fields.)
Returns:
An ordered array of fields in the search index.
Throws:
VWException - The method throws an exception if the search field does not exist.

fetchStatistics

public VWQueueStats fetchStatistics(java.util.Date startTime,
                                    java.util.Date endTime,
                                    int timeUnits)
                             throws VWException
Fetches statistical information for the queue, given a start and stop time. If a translation source exists, the authored information is translated.

Note: The translation is done only at runtime, so will not appear in design-time applications (such as the Process Designer or Configuration Console).

Parameters:
startTime - A Date value indicating the time to start gathering statistics.
endTime - A Date value indicating the time to stop gathering statistics.
timeUnits - An integer indicating the unit of time for gathering statistics. Valid integer values associated with the time units are as follows:
  • 1: Minute
  • 2: Hour
  • 3: Day
  • 4: Week
  • 5: Month
  • 6: Year
Returns:
A VWQueueStats statistical results object representing the queue statistics. If a translation source exists, the translated information is returned; otherwise, the authored information is returned.
Throws:
VWException - Thrown if the VWQueueStats object cannot be instantiated.
Since:
VWWS3.10
See Also:
VWTimeUnitType.MINUTES, VWTimeUnitType.HOURS, VWTimeUnitType.DAYS, VWTimeUnitType.WEEKS, VWTimeUnitType.MONTHS, VWTimeUnitType.YEARS

toString

public java.lang.String toString()
Gets the string version of the queue name. If a translation source exists, the authored name is translated.

Note: The translation is done only at runtime, so will not appear in design-time applications (such as the Process Designer or Configuration Console).

Overrides:
toString in class java.lang.Object
Returns:
A String containing the translated name of the queue, if a translation source exists; otherwise the authored name is returned.

setBufferSize

public void setBufferSize(int theNewSize)
                   throws VWException
Sets the maximum number of elements to return in a fetch. The default number is 50.

Parameters:
theNewSize - An integer value used to set maximum number of elements to return in the fetch. The value must be greater than zero (0).
Throws:
VWException - The method throws an exception if the buffer size specified in the theNewSize parameter is less than or equal to zero (0).
Since:
VWWS3.10

getBufferSize

public int getBufferSize()
Gets the maximum number of elements set by the user to return in a fetch. The default value is 50.

Returns:
An integer value indicating the maximum number of elements to return in a fetch.
Since:
VWWS3.10

convertOperationNameToId

public int convertOperationNameToId(java.lang.String theOperationName)
                             throws VWException
Converts an operation name to an ID, using the name/ID pair in the current workspace. If a translation source exists, the authored name is translated.

Note: The translation is done only at runtime, so will not appear in design-time applications (such as the Process Designer or Configuration Console).

The application makes a remote procedure call (an RPC) if there was no previous server call to get operation name/ID pairs. If no operation name is found, the application makes another RPC to retrieve an updated list. If, after the second RPC, the application finds no operation name, an exception is thrown.

Results may be incorrect if the application has deleted operations from the original work performer instance in the current workspace.

Parameters:
theOperationName - The operation name for this queue. If a translation source exists, the authored name is translated, if specified.
Returns:
An integer value for the operation ID.
Throws:
VWException - Thrown if the application does not find the operation name, if it cannot convert the name to an operation ID, or if the operation name is null.
Since:
VWWS3.10

convertOperationIdToName

public java.lang.String convertOperationIdToName(int theOperationId)
                                          throws VWException
Converts an operation ID to a name, using the name/ID pair in the current workspace. If a translation source exists, the authored name is translated.

Note: The translation is done only at runtime, so will not appear in design-time applications (such as the Process Designer or Configuration Console).

The application makes a remote procedure call (an RPC) if there was no previous server call to get the operation name. If no operation name is found, the application makes another RPC to retrieve an updated list. If, after the second RPC, the application finds no operation name, an exception is thrown.

Results may be incorrect if the application has deleted operations from the original work performer instance in the current workspace.

Parameters:
theOperationId - An integer value for the operation ID associated with the queue.
Returns:
A String containing the translated name of the operation, if a translation source exists; otherwise the authored name is returned.
Throws:
VWException - Thrown if the application does not find the operation name, or if it cannot convert an operation ID to a name.
Since:
VWWS3.10

fetchOperationNames

public java.lang.String[] fetchOperationNames()
                                       throws VWException
Fetches the list of all the operation names for this queue. If a translation source exists, the authored names are translated.

Note: The translation is done only at runtime, so will not appear in design-time applications (such as the Process Designer or Configuration Console).

Returns:
A String array containing the translated operation names, if a translation source exists; otherwise the authored names are returned.
Throws:
VWException - Thrown if the list of all the operation names for this queue cannot be found.

getIsConnectorQueue

public boolean getIsConnectorQueue()
                            throws VWException
Indicates whether or not this queue is a connector queue.

Returns:
A boolean value; true if this queue is a connector queue, otherwise, false.
Throws:
VWException

fetchWorkBasket

public VWWorkBasket fetchWorkBasket(java.lang.String workBasketName)
                             throws VWException
Throws:
VWException

fetchWorkBaskets

public VWWorkBasket[] fetchWorkBaskets()
                                throws VWException
Gets all of the workbaskets associated with this queue.

Returns:
An array of VWWorkBasket objects for the workbaskets in this queue.
Throws:
VWException

getAuthoredName

public java.lang.String getAuthoredName()
Return the authored name

Returns:
the authored name
Since:
P8 4.0

getName

public java.lang.String getName()
Return the translated name

Returns:
the translated name

Process API

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