SOAP API - queryProcessInstances

The table summarizes the SOAP API - queryProcessInstances.

Request Uses the queryProcessInstancesInput element (from the ProcessManagement schema)
Parameter notes
  • query: For information about valid SQL syntax, see Sorting and Filtering Lists of Process Templates and Instances.
  • attributeMap: If a user-defined attribute is used in the SELECT statement of a paginated query, that attribute and its type should be included in the attributeMap, otherwise a database query must be made to get the type of the user-defined attribute, making the request less efficient (see the example below).
  • pageSize: Page size to be used to return the list of process instances. One of the following values:
    • 0: Return the entire result set in a single, non-paged list. The result set when using this value is restricted to 500 entries.
    • -1: Return the result set in a paged list, using the default page size.
    • positive integer: return the result set in a paged list, with the specified number of items on each page.

      If you specify a paged result (pageSize = -1 or a number greater than 0), use the queryFirstPage, queryLastPage, queryNextPage, and queryPreviousPage operations to navigate the paged list, and queryDone to clear resources when you are finished with the paged list. (Note that the result limit for non-paginated queries (pageSize=0) is 500.)

  • statusMode: (Optional) Filters process instances returned according to their current status. The valid entries are ACTIVE, TERMINATED, or ACTIVE_AND_TERMINATED. Default = ACTIVE.
Response Returns a queryProcessInstancesOutput element (from the ProcessManagement schema).
Example Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:proc="http://www.tibco.com/bx/2009/management/processManagerType">
   <soapenv:Header/>
   <soapenv:Body>
      <proc:queryProcessInstancesInput>
         <proc:query>SELECT ContactName FROM process WHERE INSTANCE.STATUS = 'ACTIVE'</proc:query>
         <proc:pageSize>10</proc:pageSize>
         <proc:attributeMap>
            <proc:templateAttribute>
               <proc:name>ContactName</proc:name>
               <proc:type>string</proc:type>
            </proc:templateAttribute>
         </proc:attributeMap>
      </proc:queryProcessInstancesInput>
   </soapenv:Body>
</soapenv:Envelope>
  Response:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header/>
   <SOAP-ENV:Body>
      <queryProcessInstancesOutput xmlns="http://www.tibco.com/bx/2009/management/processManagerType">
         <processInstances>
            <processInstance>
               <customAttributes>
                  <customAttribute>
                     <name>ContactName</name>
                     <value>Ira Olson</value>
                  </customAttribute>
               </customAttributes>
            </processInstance>
            <processInstance>
               <customAttributes>
                  <customAttribute>
                     <name>ContactName</name>
                     <value>Walter Burfiend</value>
                  </customAttribute>
               </customAttributes>
            </processInstance>
         </processInstances>
         <pagingID>-1859988354</pagingID>
      </queryProcessInstancesOutput>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>