filenet.vw.api

Class VWWorkBasket

  • All Implemented Interfaces:
    java.io.Serializable


    public final class VWWorkBasket
    extends VWQueueQuery
    implements java.io.Serializable
    Use this class to retrieve information about a workbasket, its columns, filters, or query results.
    Since:
    P8 4.5.0
    See Also:
    Serialized Form
    • Method Detail

      • getName

        public java.lang.String getName()
                                 throws VWException
        Gets the current workbasket name. If a translated version exists, that version is returned.
        Returns:
        A String containing the name currently assigned to the workbasket.
        Throws:
        VWException
      • getAuthoredName

        public java.lang.String getAuthoredName()
                                         throws VWException
        Gets the original workbasket name.
        Returns:
        A String containing the name originally assigned to the workbasket.
        Throws:
        VWException
      • getDescription

        public java.lang.String getDescription()
                                        throws VWException
        Gets the work basket description.
        Returns:
        A String containing the description of the workbasket.
        Throws:
        VWException
      • getQueueName

        public java.lang.String getQueueName()
        Gets the name of the queue with which the workbasket is associated.
        Returns:
        A String containing the name of the queue associated with the workbasket.
      • getId

        public int getId()
        Gets the object ID of the workbasket.
        Returns:
        An integer representing the object ID of the workbasket.
      • getRevision

        public int getRevision()
                        throws VWException
        Gets the revision number of the workbasket.
        Returns:
        An integer indicating the revision number of the workbasket.
        Throws:
        VWException
      • getAttributeInfo

        public VWAttributeInfo getAttributeInfo()
                                         throws VWException
        Gets the workbasket attributes as paired labels (hashtable keys) and values.
        Returns:
        A VWAttributeInfo object containing a hashtable of key (label) and value pairs representing the attributes for the workbasket.
        Throws:
        VWException
      • getQueue

        public VWQueue getQueue()
        Gets the queue with which the workbasket is associated.
        Overrides:
        getQueue in class VWQueueQuery
        Returns:
        A VWQueue object representing the queue for the workbasket.
        Throws:
        VWException
        See Also:
        VWQueue
      • getColumns

        public VWWorkBasket.Column[] getColumns()
        Gets the columns defined for the workbasket.
        Returns:
        An array of the workbasket columns.
      • getFilters

        public VWWorkBasket.Filter[] getFilters()
        Gets the filters defined for the workbasket.
        Returns:
        An array of the workbasket filters.
      • fetchNextBatch

        public VWWorkBasket.QueryResults fetchNextBatch(int queryFlags,
                                                        int bufferSize,
                                                        java.lang.String sortColumn,
                                                        java.lang.String[] filterNames,
                                                        java.lang.Object[] filterNameValues,
                                                        java.lang.String lastWorkRecStr,
                                                        int fetchType)
                                                 throws VWException
        Deprecated. @deprecated Replaced by #fetchFilteredBatch()
        Gets the next batch of query results based on the specified criteria.
        Parameters:
        queryFlags - An integer value that specifies the query options.

        Use the | and + operators to combine the flags. See the QUERY_* properties on VWQueue for descriptions of the possible query flags.

        bufferSize - An integer value indicating the maximum number of elements to return. The default is 50.
        sortColumn - A String containing the name of the column to sort by.
        filterNames - A String array of the names of the workbasket filters to use for the query.
        filterNameValuess - An array of objects containing valid VWFieldType values to apply to the workbasket filters.
        lastWorkRecStr - A base64-encoded String containing the last record of the query results. If this value is null, the query starts from the beginning.
        fetchType - An integer value associated with the element type to be retrieved. Valid element type values must be one of the following:
        • 1: Work object (FETCH_TYPE_WORKOBJECT)
        • 3: Queue element (FETCH_TYPE_QUEUE_ELEMENT)
        • 5: Step element (FETCH_TYPE_STEP_ELEMENT)
        Returns:
        A QueryResults object containing the results of the query. If the end of the query results was reached in the preceding call to this method, null will be returned.
        Throws:
        VWException
      • fetchFilteredBatch

        public VWWorkBasket.QueryResults fetchFilteredBatch(int queryFlags,
                                                            int bufferSize,
                                                            java.lang.String sortColumn,
                                                            java.lang.String[] filterNames,
                                                            java.lang.Object[] filterNameValues,
                                                            java.lang.String queryFilter,
                                                            java.lang.Object[] querySubstitutionVars,
                                                            java.lang.String lastWorkRecStr,
                                                            int fetchType)
                                                     throws VWException
        Gets the batch of query results based on the specified criteria. Resets the any previous VWWorkBasket query values with the new criteria specified by the input parameters
        Parameters:
        queryFlags - An integer value that specifies the query options.

        Use the | and + operators to combine the flags. See the QUERY_* properties on VWQueue for descriptions of the possible query flags.

        bufferSize - An integer value indicating the maximum number of elements to return.
        sortColumn - A String containing the name of the column to sort by.
        filterNames - A String array of the names of the workbasket filters to use for the query.
        filterNameValues - An array of objects containing valid VWFieldType values to apply to the workbasket filters.
        queryFilter - A SQL WHERE clause used as a filter, and having placeholder variables that are replaced by values in the substitutionVars parameter. Fields used in the query filter should be based on exposed fields of the queue associated with the workbasket.

        Use this parameter in conjunction with the sortColumn index and filterNames, and queryFlags to refine the search. The SQL WHERE clause should contain a search field name on the left side of an 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 not use SQL function names as field names.

        For queryFilter parameter SQL WHERE clause example:

           integerA < :A AND stringB =:B 

        specifies returned objects must meet 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 queryFilter:

        • In a SQL WHERE clause, a colon (:) precedes each placeholder variable on the right side of the statement.
        • The search field is an exposed field on the queue associated with the VWWorkBasket.
        • When the SQL WHERE clause is processed, each placeholder variable is replaced (in corresponding order) with a value specified in the querySubstitutionVars parameter.
        querySubstitutionVars - An array of objects containing the values to substitute for the placeholder variables specified in the SQL WHERE clause for the queryFilter 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 queryFilter parameter contains three placeholder variables specified as ":A", there must be three corresponding substitution variables.

        For example:

           {new Integer(1000),"Smith"} 

        This querySubstitutionVars parameter would have a corresponding queryFilter parameter of the following:

           integerA < 1000 AND stringB = "Smith" 

        lastWorkRecStr - A base64-encoded String containing the last record of the query results. If this value is null, the query starts from the beginning.
        fetchType - An integer value associated with the element type to be retrieved. Valid element type values must be one of the following:
        • 1: Work object (FETCH_TYPE_WORKOBJECT)
        • 3: Queue element (FETCH_TYPE_QUEUE_ELEMENT)
        • 5: Step element (FETCH_TYPE_STEP_ELEMENT)
        Returns:
        A QueryResults object containing the results of the query. If the end of the query results was reached in the preceding call to this method, null will be returned.
        Throws:
        VWException
        See Also:
        VWQueue.createQuery(java.lang.String, java.lang.Object[], java.lang.Object[], int, java.lang.String, java.lang.Object[], int)
      • toString

        public java.lang.String toString()
        Gets a String representation of the workbasket information.
        Overrides:
        toString in class VWQueueQuery
        Returns:
        A String containing the workbasket information.
      • fetchBatchCount

        public int fetchBatchCount(int queryFlags,
                                   java.lang.String sortColumn,
                                   java.lang.String[] filterNames,
                                   java.lang.Object[] filterNameValues,
                                   int fetchType)
                            throws VWException
        Deprecated. Replaced by #fetchFilteredCount()
        Gets the count of the batch of query results based on the specified criteria.
        Parameters:
        queryFlags - An integer value that specifies the query options.

        Use the | and + operators to combine the flags. See the QUERY_* properties on VWQueue for descriptions of the possible query flags.

        sortColumn - A String containing the name of the column to sort by.
        filterNames - A String array of the names of the workbasket filters to use for the query.
        filterNameValues - An array of objects containing valid VWFieldType values to apply to the workbasket filters.
        fetchType - An integer value associated with the element type to be retrieved. Valid element type values must be one of the following:
        • 1: Work object (FETCH_TYPE_WORKOBJECT)
        • 3: Queue element (FETCH_TYPE_QUEUE_ELEMENT)
        • 5: Step element (FETCH_TYPE_STEP_ELEMENT)
        Returns:
        An integer value indicating the number of records that could be retrieved in the queue associated with this workbasket query.
        Throws:
        VWException - Thrown if it cannot get the integer value indicating the number of records that can be retrieved. One cause of this is an incorrect query parameter.
      • fetchFilteredCount

        public int fetchFilteredCount(int queryFlags,
                                      java.lang.String sortColumn,
                                      java.lang.String[] filterNames,
                                      java.lang.Object[] filterNameValues,
                                      java.lang.String queryFilter,
                                      java.lang.Object[] querySubstitutionVars,
                                      int fetchType)
                               throws VWException
        Gets the count of the batch of query results based on the specified criteria.
        Parameters:
        queryFlags - An integer value that specifies the query options.

        Use the | and + operators to combine the flags. See the QUERY_* properties on VWQueue for descriptions of the possible query flags.

        sortColumn - A String containing the name of the column to sort by.
        filterNames - A String array of the names of the workbasket filters to use for the query.
        filterNameValues - An array of objects containing valid VWFieldType values to apply to the workbasket filters.
        fetchType - An integer value associated with the element type to be retrieved. Valid element type values must be one of the following:
        • 1: Work object (FETCH_TYPE_WORKOBJECT)
        • 3: Queue element (FETCH_TYPE_QUEUE_ELEMENT)
        • 5: Step element (FETCH_TYPE_STEP_ELEMENT)
        queryFilter - A SQL WHERE clause used as a filter, and having placeholder variables that are replaced by values in the substitutionVars parameter. Fields used in the query filter should be based on exposed fields of the queue associated with the workbasket.

        Use this parameter in conjunction with the sortColumn index and filterNames, and queryFlags to refine the search. The SQL WHERE clause should contain a search field name on the left side of an 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 not use SQL function names as field names.

        For queryFilter parameter SQL WHERE clause example:

           integerA < :A AND stringB =:B 

        specifies returned objects must meet 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 queryFilter:

        • In a SQL WHERE clause, a colon (:) precedes each placeholder variable on the right side of the statement.
        • The search field is an exposed field on the queue associated with the VWWorkBasket.
        • When the SQL WHERE clause is processed, each placeholder variable is replaced (in corresponding order) with a value specified in the querySubstitutionVars parameter.
        querySubstitutionVars - An array of objects containing the values to substitute for the placeholder variables specified in the SQL WHERE clause for the queryFilter parameter.
        Returns:
        An integer value indicating the number of records that could be retrieved in the queue associated with this workbasket query.
        Throws:
        VWException - Thrown if it cannot get the integer value indicating the number of records that can be retrieved. One cause of this is an incorrect query parameter.
        Since:
        CPE5.2.0.1
      • isShowWorkForAllUsers

        public boolean isShowWorkForAllUsers()
        This returns TRUE only if flag for Show Work For All Users is set for the WorkBasket. This flag would allow the user of the WorkBasket to query for all items, not just those the user is bound. This flag is only useful for WorkBasket that are associated to a QUEUE_TYPE_USER_CENTRIC type queue.
      • 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:
        VWWS4.0
      • setBufferSize

        public void setBufferSize(int newSize)
                           throws VWException
        Sets the maximum number of elements to return in a fetch (defaults to 50). The server imposes a maximum limit of 100. The number returned may be smaller if the items are very large.
        Parameters:
        newSize - This must be greater than zero.
        Throws:
        VWException - Thrown if buffer size is less than or equal to 0 (zero).
      • getLastRecord

        public java.lang.String getLastRecord()
        Gets the last record in the query results.
        Returns:
        A base64-encoded String containing the last record of the query results. Null is returned if no last record.
        Since:
        CPE 5.2.0.3
      • setLastRecord

        public void setLastRecord(java.lang.String lastWorkRecStr)
        Set the last record in the query result
        Parameters:
        lastWorkRecStr - A base64-encoded String containing the last record of the query results. If this value is null, the query starts from the beginning.
        Since:
        CPE 5.2.0.3

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