require(["esri/tasks/datareviewer/BatchValidationTask"], function(BatchValidationTask) { /* code goes here */ });
Description
(Added at v3.14)
Exposes functions for executing and scheduling Batch Validation in ArcGIS Data Reviewer for Server. Provides functions for managing Batch Validation jobs and information.
Batch Validation operates in two execution modes: adhoc (immediate); scheduled. Adhoc jobs execute immediately and run once. Scheduled jobs run repeatedly according to a schedule and terminate once BatchValidationParameters/maxNumberOfExecutions has been exceeded or BatchValidationParameters/executionEndDate has passed.
See also
Samples
Search for
samples that use this class.
Constructors
Methods
Events
[ On Style Events | Connect Style Event ]
All On Style event listeners receive a single event object. Additionally, the event object also contains a 'target' property whose value is the object which fired the event.
Constructor Details
Creates a new BatchValidationTask object.
Parameters:
<String > url |
Required |
The DataReviewerServer Server Object Extension (SOE) URL. |
Method Details
Cancels an executing job. The callback function in the deferred object will contain a response object. The response object holds a boolean that indicates if cancel succeeded or not.
Parameters:
<String > jobId |
Required |
Job Id of the batch validation job to cancel. |
Creates a new Reviewer session. The Reviewer session stores results from check and batch job execution. The callback function in the deferred object will contain a response object that holds
ReviewerSession
.
Parameters:
<String > sessionName |
Required |
Name of the session to be created. |
<SessionOptions > sessionOptions |
Required |
Session properties to be used to create the session. |
Deletes an existing scheduled Batch Validation Job. The callback function in the deferred object will contain a response object. The response object holds a boolean that indicates if the deleteJob function succeeded or not.
Parameters:
<String > jobId |
Required |
Job Id of the batch validation job to delete. |
Pauses an existing Batch Validation Job's schedule. The callback function in the deferred object will contain a response object. The response object holds a boolean that indicates if the disableJob function succeeded or not.
Parameters:
<String > jobId |
Required |
Job Id of the batch validation job to be disabled. |
Edits the schedule, settings and title of an existing Batch Validation Job. The callback function in the deferred object will contain a response object. The response object holds a boolean that indicates if the editJob function succeeded or not.
Parameters:
<String > jobId |
Required |
Job Id of the batch validation job to edit. |
<BatchValidationParameters > parameters |
Required |
Parameters to change in an existing batch job. |
Restarts an existing Batch Validation Job's schedule. Use enableJob to restart a previously disabled job. The callback function in the deferred object will contain a response object. The response object holds a boolean that indicates if the enableJob function succeeded or not.
Parameters:
<String > jobId |
Required |
Job Id of the batch validation job to enable. |
Executes an adhoc job. Adhoc jobs execute immediately and run once. The callback function in the deferred object will contain a response object. The response object holds a jobId String.
Retrieves all adhoc jobs from the server and returns an array of BatchValidationJob with the information. The callback function in the deferred object will contain a response object. The response object holds an array of adhocJob IDs.
Returns an array of custom field names defined in a Reviewer workspace.
Access the array through either the deferred object,
get-custom-field-names
event, or
onGetCustomFieldNamesComplete
event.
The callback function in the deferred object will contain a response object that holds an array of custom field names defined in a Reviewer workspace. The result of this method can be used to write matching custom field attributes to a Reviewer workspace using
ReviewerResultsTask.writeFeatureAsResult
method, or can also be used to fetch custom field values from
ReviewerResultsTask.getResults
method.
(Added at v3.15)
Fetches Batch Validation Job details. The callback function in the deferred object will contain a response object that holds an instance of
BatchValidationJob
.
Parameters:
<String > jobId |
Required |
Job Id of the batch validation job. |
Fetches the Job Execution details of a Batch Validation Job. The callback function in the deferred object will contain a response object that holds an instance of
BatchValidationJobInfo
.
Parameters:
<String > jobId |
Required |
Job Id of the batch validation job. |
Returns an object that contains Scheduled and AdhocJob IDs in two separate arrays. The callback function in the deferred object will contain a response object that holds two arrays: adhocJob IDs; scheduleJob IDs.
Retrieves a list of localized life cycle status strings from the Reviewer workspace. Each Reviewer result stored in the Reviewer workspace has a life cycle status code that matches one of the strings returned from this method execution. Use these strings to replace the numeric code values when displaying a list of Reviewer results to the user. The callback function in the deferred object will contain a response object that holds an array of lifecyclestatus strings.
Extracts the MapServer url from the full ArcGIS Data Reviewer for Server SOE url.
Returns an array of sessions in a Reviewer workspace. Access the array through either the deferred object or the onGetReviewerSessionsComplete event. The callback function in the deferred object will contain a response object that holds an array of
ReviewerSession
.
Sample:
var url="http://localhost:6080/arcgis/rest/services/reviewer/MapServer/exts/DataReviewerServer/";
var batchValidationTask=new BatchValidationTask(url);
var deferred=BatchValidationTask.getReviewerSessions();
deferred.then(function(response) {
array.forEach(response.reviewerSessions, function(item,i) {
console.log("Session name: " + item.sessionName);
console.log("Session Id: " + item.sessionId);
console.log("User name: " + item.userName);
console.log("Version name: " + item.versionName);
});
},
function(error) {
console.log("Error occurred: " + error.message);
});
Retrieves all scheduled jobs from the server and returns an array of BatchValidationJob with the information. The callback function in the deferred object will contain a response object that holds an array of scheduledJob IDs.
Schedules a new Batch Validation. The callback function in the deferred object will contain a response object that holds a jobId String.
Event Details
[ On Style Events | Connect Style Event ]
Fires when the cancelJobExecution method is complete.
Event Object Properties:
<Boolean > canceled |
A boolean property named canceled indicating whether or not the job execution was canceled. |
Sample:
require([
"esri/tasks/datareviewer/BatchValidationTask"
], function(BatchValidationTask) {
var batchValidationTask = new BatchValidationTask(url);
batchValidationTask.on("cancel-job-execution",function(event){
console.log("Event: ", event);
});
});
Fires when the createReviewerSessions method is complete.
Event Object Properties:
<ReviewerSession > reviewerSession |
The ReviewerSession created from the createReviewerSession method. |
Sample:
require([
"esri/tasks/datareviewer/BatchValidationTask"
], function(BatchValidationTask) {
var batchValidationTask = new BatchValidationTask(url);
batchValidationTask.on("create-reviewer-sessions",function(event){
console.log("Event: ", event);
});
});
Fires when the deleteJob method is complete.
Event Object Properties:
<Boolean > deleted |
A boolean property named deleted indicating whether or not the job was deleted. |
Sample:
require([
"esri/tasks/datareviewer/BatchValidationTask"
], function(BatchValidationTask) {
var batchValidationTask = new BatchValidationTask(url);
batchValidationTask.on("delete-job",function(event){
console.log("Event: ", event);
});
});
Fires when the disableJob method is complete.
Event Object Properties:
<Boolean > disabled |
A boolean property named disabled indicating whether or not the job was disabled. |
Sample:
require([
"esri/tasks/datareviewer/BatchValidationTask"
], function(BatchValidationTask) {
var batchValidationTask = new BatchValidationTask(url);
batchValidationTask.on("disable-job",function(event){
console.log("Event: ", event);
});
});
Fires when the editJob method is complete.
Event Object Properties:
<Boolean > edited |
A boolean property named edited indicating whether or not the job was edited. |
Sample:
require([
"esri/tasks/datareviewer/BatchValidationTask"
], function(BatchValidationTask) {
var batchValidationTask = new BatchValidationTask(url);
batchValidationTask.on("edit-job",function(event){
console.log("Event: ", event);
});
});
Fires when the enableJob method is complete.
Event Object Properties:
<Boolean > enabled |
A boolean property named enabled indicating whether or not the job was enabled. |
Sample:
require([
"esri/tasks/datareviewer/BatchValidationTask"
], function(BatchValidationTask) {
var batchValidationTask = new BatchValidationTask(url);
batchValidationTask.on("enable-job",function(event){
console.log("Event: ", event);
});
});
Fires when an error occurs during a BatchValidationTask method execution.
Event Object Properties:
<Error > error |
A JavaScript error object containing the message and code properties that occurred during a BatchValidationTask method execution. |
Sample:
require([
"esri/tasks/datareviewer/BatchValidationTask"
], function(BatchValidationTask) {
var batchValidationTask = new BatchValidationTask(url);
batchValidationTask.on("error",function(event){
console.log("Event: ", event);
});
});
Fires when the executeJob method is complete.
Event Object Properties:
<String > jobId |
A string property containing the jobId. |
Sample:
require([
"esri/tasks/datareviewer/BatchValidationTask"
], function(BatchValidationTask) {
var batchValidationTask = new BatchValidationTask(url);
batchValidationTask.on("execute-job",function(event){
console.log("Event: ", event);
});
});
Fires when the getAdhocJobsList method is complete.
Event Object Properties:
<BatchValidationJob[] > adhocJobs |
An array of BatchValidationJob containing all the adhoc jobs from the server. |
Sample:
require([
"esri/tasks/datareviewer/BatchValidationTask"
], function(BatchValidationTask) {
var batchValidationTask = new BatchValidationTask(url);
batchValidationTask.on("get-adhoc-jobs-list",function(event){
console.log("Event: ", event);
});
});
Fires when the getCustomFieldNames
method is complete. (Added at v3.15)
Event Object Properties:
<String[] > customFieldNames |
An array containing custom field names configured in a Reviewer workspace. |
Sample:
require([
"esri/tasks/datareviewer/BatchValidationTask"
], function(BatchValidationTask) {
var batchValidationTask = new BatchValidationTask(url);
batchValidationTask.on("get-custom-field-names",function(event){
console.log("Event: ", event);
});
});
Fires when the getJobDetails method is complete.
Sample:
require([
"esri/tasks/datareviewer/BatchValidationTask"
], function(BatchValidationTask) {
var batchValidationTask = new BatchValidationTask(url);
batchValidationTask.on("get-job-details",function(event){
console.log("Event: ", event);
});
});
Fires when the getJobExecutionDetails method is complete.
Sample:
require([
"esri/tasks/datareviewer/BatchValidationTask"
], function(BatchValidationTask) {
var batchValidationTask = new BatchValidationTask(url);
batchValidationTask.on("get-job-execution-details",function(event){
console.log("Event: ", event);
});
});
Fires when the getJobIds method is complete.
Event Object Properties:
<String[] > adhocJobs |
An object containing a property named adhocJobs with an Array of adhoc job ids. |
<String[] > scheduledJobs |
An object containing a property named scheduledJobs with an Array of scheduled job ids. |
Sample:
require([
"esri/tasks/datareviewer/BatchValidationTask"
], function(BatchValidationTask) {
var batchValidationTask = new BatchValidationTask(url);
batchValidationTask.on("get-job-ids",function(event){
console.log("Event: ", event);
});
});
Fires when the getLifecycleStatusStrings method is complete.
Event Object Properties:
<String[] > lifecycleStatusStrings |
An array of localized life cycle status strings from the Reviewer workspace. |
Sample:
require([
"esri/tasks/datareviewer/BatchValidationTask"
], function(BatchValidationTask) {
var batchValidationTask = new BatchValidationTask(url);
batchValidationTask.on("get-lifecycle-status-strings",function(event){
console.log("Event: ", event);
});
});
Fires when the getReviewerSessions method is complete.
Sample:
require([
"esri/tasks/datareviewer/BatchValidationTask"
], function(BatchValidationTask) {
var batchValidationTask = new BatchValidationTask(url);
batchValidationTask.on("get-reviewer-sessions",function(event){
console.log("Event: ", event);
});
});
Fires when the getScheduledJobsList method is complete.
Event Object Properties:
<BatchValidationJob[] > scheduledJobs |
An array of BatchValidationJob with the information from the server about all the scheduled jobs. |
Sample:
require([
"esri/tasks/datareviewer/BatchValidationTask"
], function(BatchValidationTask) {
var batchValidationTask = new BatchValidationTask(url);
batchValidationTask.on("get-scheduled-jobs-list",function(event){
console.log("Event: ", event);
});
});
Fires when the scheduleJob method is complete.
Event Object Properties:
<String > jobId |
A string property containing the jobId. |
Sample:
require([
"esri/tasks/datareviewer/BatchValidationTask"
], function(BatchValidationTask) {
var batchValidationTask = new BatchValidationTask(url);
batchValidationTask.on("schedule-job",function(event){
console.log("Event: ", event);
});
});
Fires when the cancelJobExecution method is complete.
Event Object Properties:
<Boolean > canceled |
A boolean property named canceled indicating whether or not the job execution was canceled. |
Fires when the createReviewerSessions method is complete.
Event Object Properties:
<ReviewerSession > reviewerSession |
The ReviewerSession created from the createReviewerSession method. |
Fires when the deleteJob method is complete.
Event Object Properties:
<Boolean > deleted |
A boolean property named deleted indicating whether or not the job was deleted. |
Fires when the disableJob method is complete.
Event Object Properties:
<Boolean > disabled |
A boolean property named disabled indicating whether or not the job was disabled. |
Fires when the editJob method is complete.
Event Object Properties:
<Boolean > edited |
A boolean property named edited indicating whether or not the job was edited. |
Fires when the enableJob method is complete.
Event Object Properties:
<Boolean > enabled |
A boolean property named enabled indicating whether or not the job was enabled. |
Fires when an error occurs during a BatchValidationTask method execution.
Event Object Properties:
<Error > error |
A JavaScript error object containing the message and code properties that occurred during a BatchValidationTask method execution. |
Fires when the executeJob method is complete.
Event Object Properties:
<String > jobId |
A string property containing the jobId. |
Fires when the getAdhocJobsList method is complete.
Event Object Properties:
<BatchValidationJob[] > adhocJobs |
An array of BatchValidationJob containing all the adhoc jobs from the server. |
Fires when the getCustomFieldNames
method is complete. (Added at v3.15)
Event Object Properties:
<String[] > customFieldNames |
An array containing custom field names configured in a Reviewer workspace. |
Fires when the getJobDetails method is complete.
Fires when the getJobExecutionDetails method is complete.
Fires when the getJobIds method is complete.
Event Object Properties:
<String[] > adhocJobs |
An object containing a property named adhocJobs with an Array of adhoc job ids. |
<String[] > scheduledJobs |
An object containing a property named scheduledJobs with an Array of scheduled job ids. |
Fires when the getLifecycleStatusStrings method is complete.
Event Object Properties:
<String[] > lifecycleStatusStrings |
An array of localized life cycle status strings from the Reviewer workspace. |
Fires when the getReviewerSessions method is complete.
Fires when the getScheduledJobsList method is complete.
Event Object Properties:
<BatchValidationJob[] > scheduledJobs |
An array of BatchValidationJob with the information from the server about all the scheduled jobs. |
Fires when the scheduleJob method is complete.
Event Object Properties:
<String > jobId |
A string property containing the jobId. |