Cancel Dependency Group Jobs SOAP API
On This Page:
Related Pages:
The sp:CancelDependencyGroupRequest
API method can be used to cancel all of the jobs in a dependency group.
Description
The sp:CancelDependencyGroupRequest
 API method allows:
- all of the jobs in a dependency group (created via the Book Dependency Group Jobs SOAP API); or
- all of the long-duration jobs in a split dependency group (created via the Book Split Dependency Group Jobs SOAP API)
to be cancelled, via the supplied MultiJobID
 or JobID
. Logged on, logged off and/or cleared jobs can optionally be left uncancelled.
When jobs in a dependency group are cancelled, the dependencies between any uncancelled jobs will be removed (i.e. the MultiJobID
will be removed from any remaining uncancelled jobs).
However, when long-duration job s in a split dependency group are cancelled, the dependencies between any uncancelled jobs will not be removed (i,.e. the MultiJobID
 will not be removed from any remaining uncancelled jobs, even if there is only one remaining job).
This API must be used to cancel appointments that have been booked as split/fragmented jobs.
This API should be used to cancel longer duration jobs.
Definition
The definition of this API is:
Return Structure
The API returns the standard return structure.
Return Codes
In addition to the Standard Return Codes, the possible Return Codes from this API are:
If MultiJobID
 is empty or is longer than JobID
size, SP_MULTIJOBID_INVALID (563)
is returned if IsJobID
 is not set, and SP_JOBID_INVALID (1)
is returned if IsJobID
 is set.
If MultiJobID
 does not exist in the ServiceOptimizer memory horizon as a Dependency Group identifier and IsJobID
 is not set, SP_MULTIJOBID_DOES_NOT_EXIST (622)
is returned.
If MultiJobID
 does not exist in the ServiceOptimizer memory horizon as a Job identifier (JobID
) and IsJobID
 is set, SP_JOBID_DOES_NOT_EXIST (623)
is returned.
If MultiJobID
 does exist as a Job identifier (JobID
) and IsJobID
 is set but the Job it identifies is not in a Dependency Group, SP_JOBID_NOT_IN_DG (624)
is returned.
If there are any jobs in the Dependency Group that are outside the ServiceOptimizer memory horizon, all references to them through dependencies are removed and the sp:CancelDependencyGroupRequest
call will succeed, but those jobs themselves aren’t removed from the database by this call.