| apexProcessingTime |
long |
System field |
The number of
milliseconds taken to process triggers and other processes related
to the batch data. If there are no triggers, the value is 0. This doesn't include the time
used for processing asynchronous and batch Apex
operations. See also apiActiveProcessingTime and
totalProcessingTime. This field is available in API version
19.0 and later.
|
| apiActiveProcessingTime |
long |
System field |
The number of milliseconds taken to actively process the batch, and includes
apexProcessingTime. This doesn't
include the time the batch waited in the queue to be processed
or the time required for serialization and
deserialization. See also totalProcessingTime. This field is available in
API version 19.0 and later.
|
| createdDate |
dateTime |
System field |
The date and time in the UTC time zone when
the batch was created. This is not the time processing began, but
the time the batch was added to the job. |
| id |
string |
Required |
The ID of the batch. May be globally
unique, but does not have to be. |
| jobId |
string |
Required |
The unique, 18–character ID for the job
associated with this batch. |
| numberRecordsFailed |
int |
System field |
The number of records
that were not processed successfully in this batch. This field is available in API version 19.0 and later.
|
| numberRecordsProcessed |
int |
System field |
The number of records processed in
this batch at the time the request was sent. This number increases
as more batches are processed. |
| state |
BatchStateEnum |
System field |
The current state of processing for the
batch:
-
Queued: Processing of the batch hasn’t started yet. If the job
associated with this batch is aborted, the batch isn’t processed and its state
is set to NotProcessed.
-
InProgress: The batch is being processed. If the job associated
with the batch is aborted, the batch is still processed to completion. You
must close the job associated with the batch so that the batch can finish
processing.
-
Completed: The batch has been
processed completely, and the result resource is available. The result
resource indicates if some records failed. A batch can be completed even if
some or all the records failed. If a subset of records failed, the successful
records aren’t rolled back.
-
Failed: The batch failed to process the full request due to an
unexpected error, such as the request is compressed with an unsupported
format, or an internal server error. The
stateMessage element could contain more details about any
failures. Even if the batch failed, some
records could have completed successfully. The
numberRecordsProcessed field tells you how many records
were processed. The numberRecordsFailed field contains the
number of records that were not processed successfully.
-
NotProcessed:
The batch won’t be processed. This state is
assigned when a job is aborted while the batch is queued. For bulk queries, if
the job has PK chunking enabled, this state is assigned to the original batch
that contains the query when the subsequent batches are created. After the
original batch is changed to this state, you can monitor the subsequent
batches and retrieve each batch’s results when it’s completed. Then you
can safely close the job.
|
| stateMessage |
string |
System field |
When the state value is Failed, this field contains the reasons for failure.
If there are multiple failures, the message may be truncated.
If so, fix the known errors and re-submit the batch.
Even if the batch failed, some
records could have completed successfully. |
| systemModstamp |
dateTime |
System field |
The date and time in the UTC time zone that
processing ended. This is only valid when the state is
Completed. |
| totalProcessingTime |
long |
System field |
The number of milliseconds
taken to process the job. This is the sum of the total processing
times for all batches in the job. See also apexProcessingTime and
apiActiveProcessingTime. This field is available in API
version 19.0 and later.
|