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

Working with queries

Query Service is the entry point for the BP Server client library for retrieving bulk data related to user's tasks and process instances created by users. The library has to be initialized once for each JVM, and cleaned up before the shutdown of the JVM.
You can add filtering conditions to the query to reduce the amount of data to be retrieved. Query Service can optionally pass filters that contain:
*Additional conditions
*Sort order of the retrieved data
*Additional column containing dataslots to be retrieved
*The size of the data to be retrieved
If the data size is not specified, then it is equal to the size of the retrieved ResultSet.
Note: BP Server client library is a read-only library and should not be used for updating the workflow data. You can use the BP Server for updating the workflow, process template, metadata, and dataslot metadata.
BP Server Smart Value Objects (SVO) for WorkItem, WorkStepInstance and ProcessInstance can be retrieved directly from the QSResult.
Figure 7 presents the client library structure.
Figure 7. Query service client library
Every user obtains the QueryService handle by passing a valid BP Server session object. The BP Server session object is necessary to communicate with the BP Server using the SVO obtained from the QueryService. When a user gets a new session, setSession is invoked.
The Table 8 describes the classes provided by Query Service.
Table 8. Query service classes
Retrieves data for ...
Work item
* QSWorkItem
* QSWorkStepInstance
* QSProcessInstance