Geoprocessing tasks report success, but do not complete (C#)

503
2
Jump to solution
12-12-2012 09:15 PM
JudyTroutwine
Occasional Contributor
I have been trying some simple geoprocessing tasks in a Silverlight application.
The tasks do not need any parameters.  I code the task thus


         
  Wait.Visibility = Visibility.Visible;
          
  MyMap.Cursor = System.Windows.Input.Cursors.Wait;
          
_geoprocessorTask.OutputSpatialReference = new SpatialReference(2256);
          
_geoprocessorTask.SubmitJobAsync(null);





This works fine in the application for copying a folder or frenaming folders and files.
Other tools though report success but do not actually do the task. Copying a file does not work
for example. 

       

   if (string.Equals(e.JobInfo.JobStatus.ToString(), "esriJobSucceeded"))
         
       {
           Wait.Visibility = Visibility.Collapsed;     
        }



Ideas?
0 Kudos
1 Solution

Accepted Solutions
JudyTroutwine
Occasional Contributor
The answer turned out to be simply that asynchronous tasks copy results to the arcgisjobs folder.

View solution in original post

0 Kudos
2 Replies
DominiqueBroux
Esri Frequent Contributor
Copying a file does not work
for example. 

   if (string.Equals(e.JobInfo.JobStatus.ToString(), "esriJobSucceeded"))

       {
           Wait.Visibility = Visibility.Collapsed;     
        }


Difficult to figure out your issue without more info.

I can just suggest you to check that your geoprocessing task is asynchronous since SubmitJobAsync is only working with asynchronous geoprocessing task (and ExecuteAsync with synchronous geoprocessing task).

Else using fiddler to look at requests sent to the server might give a clue.
0 Kudos
JudyTroutwine
Occasional Contributor
The answer turned out to be simply that asynchronous tasks copy results to the arcgisjobs folder.
0 Kudos