When you need to apply a business policy to a large number of existing records you can start a batch job. Batch jobs run in the background and are able to process very large numbers of records, up to the limits allowed by Salesforce.
To start a batch job click the Run Batch Job button on the policy detail page:
Note: the button is greyed out when the selected version is a draft -- but you can run a batch against any other version, including older (inactive) ones.
A dialog appears that allows you to specify the parameters of the batch job:
You can enter the following
This (optionally) allows you to select a subset of records to which the policy will be applied.
For example, Industry = ’Manufacturing’ will select only records with the Industry field set to Manufacturing.
The format of the where clause is defined by the SOQL language, see here for details.
To validate the syntax of your where clause, press the Tab key or click outside of the text box. This will also display the number of records that match the condition.
This specifies the number of records to process in one call to the Decisions on Demand server.
The default is 50 which works well for most cases. If you experience issues with governor limits you can reduce this to 25 or 10. If you need to speed up your batch processing you can try higher values -- the maximum is 2000.
Send email on completion
Whether you would like to receive an email on completion of the batch, only on failure, or not at all
Click Run Batch to launch the job. You will see a confirmation as follows:
To track progress of the job, go to Setup/Monitor/Jobs/APEX jobs. If you requested an email on completion you will be notified of the final results