RQL Expression Evaluation
You can specify the way in which RQL expressions are evaluated, which can have a significant impact on the amount of time it takes to evaluate the expressions. This is done by specifying the version of the RQL expression algorithm to use.
The RQL expression algorithm is available in two versions:
- 1 - This is the
original algorithm in which RQL expressions are resolved in memory, retrieving resources as the algorithm traverses the elements in the expression.
This version of the algorithm can result in expressions taking a long time to execute. Use this version if you are using a small number of RQL expressions, against a small number of resources.
- 2 - (Default) In this version, the RQL is translated to SQL. Resources are retrieved based on the final SQL statement.
This version of the algorithm results in much faster processing.
Specifying the RQL Expression Algorithm Version
The RQL expression algorithm version is specified using the ResourceQueryVersion property in the de.properties file.
If you change the RQL expression algorithm from version 1 to version 2, you must then thoroughly test your application to ensure that the RQL-to-SQL algorithm returns the same result set as the previous algorithm. If you find that the result set is different, you may want to revert to version 1 of the algorithm (see below).
Reverting to Version 1 of the RQL Expression Algorithm
If you decide to revert to version 1 of the RQL expression algorithm, you must reset the RQL queries.
The RQL expression algorithm is used to evaluate all RQL queries, that is, queries that originate from Dynamic Process Participants, Performer Fields, as well as queries submitted via the ActiveMatrix BPM public API (using the executeQuery operation in the ResourceQueryService). When RQL queries originate from Dynamic Process Participants or Performer Fields, those queries are registered in the database. As those expressions are in the BPM database, they must be "reset" if you change from version 2 to version 1 of the algorithm.
Resetting the queries in the database is accomplished using the resetQueries operation in the ResourceQueryService. ActiveMatrix BPM does not provide a user interface to perform this operation. Therefore, you will need to use the ActiveMatrix BPM public API to reset the queries when changing from version 2 to version 1 of the algorithm.
For information about the resetQueries operation, see the TIBCO ActiveMatrix BPM Developer's Guide.