Search Results

Querying Data in Subset Mode

When the result set of a query is very large, you can query subsets of the result set and iterate until the entire result set is processed.

To query subsets, you must use a Repeat loop scope to iterate through the entire result set:


  1. Create a Salesforce Query All activity.
  2. Specify the fields on the General tab and create a query that returns multiple rows.
  3. Set the ProcessInSubsets element of the Input tab to true.
  4. Set the subsetSize element of the Input tab to the maximum number of messages you want to process for each execution loop.
  5. Right-click the SalesforceQueryAll activity icon, and then click Create Group > Scope in the pop-up menu to create a scope containing the activity.
    A cyclic line and a curve with an arrow are displayed around the SalesforceQueryAll activity icon.
  6. Click the cyclic line to select it.
  7. Select Repeat from the Group Type list on the General tab, and specify an index name.
  8. A loop exits when the entire result set is consumed. You can set the condition of the loop by editing the lastSubset element on the Output tab.
    Note: The previous procedure is a general guideline for creating a loop scope to process a large set of records. You might want to modify the procedure to include additional processing of the records, or you might want to change the XPath expressions to suit your business process.