Example: Using the queryAll method
queryAll( "DISTINCT ACTIVITY.AIID",
"PROCESS_TEMPLATE.NAME = 'sampleProcess'",
(String)null, (String)null, (Integer)null, (TimeZone)null )
SELECT DISTINCT ACTIVITY.AIID
FROM ACTIVITY AI, PROCESS_TEMPLATE PT
WHERE AI.PTID = PT.PTID
AND PT.NAME = 'sampleProcess'
Because the call is invoked by an administrator, an access control condition is not
added to the generated SQL statement. A join with the WORK_ITEM view is also not added. This means
that the query retrieves all of the activities for the process template, including those activities
without work items.You can specify a filter, a starting tuple, or a threshold to restrict the number of tuples returned. The tuples are sorted on the server according to the specified sort criteria. Sorting on the server means that the locale of the server is used.
Specify the parameters of the query, the select-, where-, and order-by-clause, using SQL based on the published views. Execution of the query can thus be shifted to SQL and becomes portable and optimizable.
Note, however, when you use a combination of the order-by-clause, threshold, or skipTuples parameters, the tuples returned depend on your database system. For example, some database systems order all records and then return the requested number of tuples. Other database systems first take the requested number of tuples and then apply the order criteria. With Oracle databases, pagination will not render ordered/consistent data results if an order-by-clause parameter references a single table column that contains duplicate records with the same value.