Filter options for query tables
When you run a query on a query table in Business Process Choreographer, filter options can be passed as input parameters to the methods of the query table API.
- A threshold and offset (skipCount)
- Sort attributes (similar to the ORDER BY clause in an SQL query)
- A user-provided query filter
- The set of attributes returned, including work item information
- Other
The result set that can be obtained from a query table is specified by the definition of the query table. However, you might want to specify additional options when the query is run. The following table describes the options that can be specified as filter options using the FilterOptions object.
| Option | Type | Description |
|---|---|---|
| Selected attributes | java.lang.String |
|
| Sort attributes | java.lang.String | A comma separated list of attributes of the
query table, optionally followed by ASC for ascending or DESC for
descending. This list is similar to the SQL ORDER BY clause: sortAttributes ::= attribute [ASC|DESC] [, sortAttributes]. If ASC or DESC is not specified, ASC is assumed. Sorting occurs in the sequence of the sort attributes. This example sorts tasks in query table TASK in descending order by state, and within the groups of the same STATE by NAME, in ascending order: "STATE DESC, NAME ASC". |
| Threshold | java.lang.Integer | Defines the maximum:
|
| Skip count | java.lang.Integer | Defines the number of rows (row-based queries)
or the number of entities (entity-based queries) that are skipped.
As with the threshold parameter, skipCount may
not be accurate for entity-based queries. Skip count is used to allow paging over a large result set. The default is null which means that no skipCount is set. |
| Time zone | java.util.TimeZone | The time zone that is used when converting timestamps. An example is CREATED on the predefined query table TASK. If not specified (null), the time zone on the server is used. |
| Locale | java.util.Locale | The locale which is used to calculate the value of the $LOCALE system parameter. An example usage of $LOCALE in a selection criterion is: 'LOCALE=$LOCALE'. |
| Distinct rows | java.lang.Boolean | Used for row-based queries only. If set to true, row-based queries return distinct rows. This does not imply that unique rows are returned due to the possible multiplicity of work item information. |
| Query condition | java.lang.String | This option performs additional filtering on the result set. All of the attributes that are defined for the query table can be referenced. If authorization is required for the query table, columns that are defined for the WORK_ITEM query table can also be referenced using the WI prefix, for example, WI.REASON=REASON_POTENTIAL_OWNER. |