Try OpenEdge Now
skip to main content
BP Server Developer's Guide
Query service : Working with filters
 

Working with filters

Often, a user may have a large number of tasks that have a wide range of dates for due date. Quite often, only the tasks due in the very near future may need the user’s immediate attention. In some other cases, a user may focus on WorkStepInstance or ProcessInstance while retrieving data.
BP Server Query Service supports the following types of filters to focus on relevant data while retrieving:
*QSWorkItemFilter for WorkItem requests
*QSProcessInstanceFilter for ProcessInstance requests
*QSWorkStepInstanceFilter for WorkStepInstance requests
A Filter can also be applied to a specific application.
The Table 9 lists database table names of BP Server, available with their table alias which can be referred in the Filter.
Table 9. BP Server database tables
Table name
Table alias name
Contains ...
BIZLOGIC_WORKITEM
BLWI
Work item information
BIZLOGIC_AVAILABLEWORKITEM
BLAWI
Information about work items that are available to performers
BIZLOGIC_PROCESSINSTANCE
BLPI
ProcessInstance information
BIZLOGIC_WORKSTEPINSTANCE
BLWSI
WorkstepInstance information
BIZLOGIC_DS_ptid1
BLIDS
Instance dataslot table
BIZLOGIC_GLOBALDS_ptid2
BLGDS
Global dataslot table

1 ptid is the process template ID for the process they represent, and is different for different applications.

2 ptid is the process template ID for the process they represent, and is different for different applications.

When the dataslots are mentioned in the filter, the retrieved list is only for that process even if the process has versions. If the dataslots are not mentioned, then the retrieved list is across the versions of the process. The column name in the filter must be in uppercase. When additional columns are mentioned, they can only be of dataslot names, and should always be prefixed either with BLIDS or BLGDS followed by the dataslot name.
The status of the Workitem, WorkStepInstance, and ProcessInstance are stored as numbers. QSConstants class has integer constants defined for the status.
The Table 10 lists the process states as QSConstants.
Table 10. Process states as QSConstants
Process State
QSConstants
Active ProcessInstance
QSConstants.PI_ACTIVATED
Suspended ProcessInstance
QSConstants.PI_SUSPENDED
Active WorkStepInstance
QSConstants.W_ACTIVATED
Suspend WorkStepInstance
QSConstants.W_SUSPENDED
Wait WorkStepInstance
QSConstants.W_WAIT
Available Work item
QSConstants.I_AVAILABLE
Suspended Work item
QSConstants.I_SUSPENDED
Assigned Work item
QSConstants.I_ASSIGNED
* Filter properties
* Constructing Filters
* Filter constraints
* Parameterized condition support for filter