This example shows how to use the queryAll method to retrieve all of the activities that belong to a process template.
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.