Flex data extract widget error: Problem. Unable to complete operation.

4375
1
Jump to solution
02-10-2015 11:15 AM
LinkElmore
New Contributor III

I'm getting a maddeningly generic error from the DataExtract widget in FlexViewer 3.7.  It reads: "Problem.  Unable to complete operation."

Capture.JPG

I created the viewer with the 3.7 version of ArcGIS Viewer for Flex, the "application builder".

The DataExtract widget is designed to work by calling a Clip and Ship geoprocessing service.  I've set up such a service following the tutorial.   As required, it is published as Asynchronous and exposes the three required named parameters.

  • Area_of_Interest
  • Layers_to_Clip
  • Feature_Format

My service runs successfully when I call it in any way except from the DataExtract widget.  The selected layers are successfully clipped using the submitted geometry, zipped, and placed in the arcgisserver/directories/arcgisjobs/../ directory.  I can look at the output.zip file and it is successfully created in the jobs folder.

Even when I run the service through the widget it succeeds in creating the output .zip file.  The error comes when it tries to access that location and offer the file for download.I never can seem to get it to the point of prompting the user to download.

This seems to be a different issue than the one described here or here where the .zip file is not being created.

I have tried running the viewer (calling the same service) both as localhost and on a production server.  Both result in the same error.

The widget .xml is pretty simple but I can confirm that it is pointed to the task, not just the gp service itself, as is directed by the Clip and Ship tutorial.

<?xml version="1.0"?>

-<configuration><dataextractionservice>http://wap01512:6080/arcgis/rest/services/ExtractDMMnew/GPServer/ExtractDMM_new</dataextractionservice><aioselectionmethod>draw</aioselectionmethod></configuration

and the relevant portion of my config.xml is as follows:

<widgetcontainer layout="float">

<widget url="widgets/DataExtract/DataExtractWidget.swf" config="widgets/DataExtract/DataExtractWidget_3.xml" label="Data Extract" icon="assets/images/i_scissors.png" preload="open"/>

</widgetcontainer>

I've looked all over the tag reference but don't see any way to set the output location in the widget configuration.

I don't have a publicly available viewer with the widget in it at the moment but the REST service for the Clip and Ship is available here:

Task: ExtractDMM

My question is whether the failure is a function of the gp model/service (I don't think so) or of the viewer config or perhaps a folder permissions issue on the server.  I'm grateful for any suggestions.

0 Kudos
1 Solution

Accepted Solutions
LinkElmore
New Contributor III

Fortunately, Christopher with Esri was able to help me troubleshoot this. His session notes with my comments:

We tested two options to get the Data Extact Widget to work in Flex.

1. We published the Data Extract Model from ArcToolbox (Server Tools > Data Extraction > Extract Data Task) to ArcGIS Server. Then added this to the Data Extract Widget which we were successful in producing an option to download.

Previously, I had created a task and service that was based on the Data Extract script tool rather than the Extract Data Task model tool.  Although it worked in ArcMap, it failed when called by the widget in Flex.  By creating the service instead with the out of the box tool from Server Tools, it worked.  Clearly, there is some difference in the two but we were not able to figure out exactly what that difference was.  Nor did I care, since the solution worked.

2. We tested a workaround by using the Geoprocessing Widget instead of the Data Extract Widget, which provides all the same parameters as the Data Extract Widget.

This was a real insight for me as I had always just used the Data Extract tool for, um, data extraction.  However, since this is nothing more than a gp task, it can also be called by the Geoprocessing Widget.  The GP widget worked immediately with my existing service (the one that Data Extact widget could not process).

So, to summarize, if you want to use the Data Extract widget, be sure your model uses the Extract Data Task tool from the Server Tools in ArcToobox.  If you want to use a custom made clip and ship service that utilizes the Extract Data script tool, you will need to use the Geoprocessing widget to successfully call it from Flex.

View solution in original post

1 Reply
LinkElmore
New Contributor III

Fortunately, Christopher with Esri was able to help me troubleshoot this. His session notes with my comments:

We tested two options to get the Data Extact Widget to work in Flex.

1. We published the Data Extract Model from ArcToolbox (Server Tools > Data Extraction > Extract Data Task) to ArcGIS Server. Then added this to the Data Extract Widget which we were successful in producing an option to download.

Previously, I had created a task and service that was based on the Data Extract script tool rather than the Extract Data Task model tool.  Although it worked in ArcMap, it failed when called by the widget in Flex.  By creating the service instead with the out of the box tool from Server Tools, it worked.  Clearly, there is some difference in the two but we were not able to figure out exactly what that difference was.  Nor did I care, since the solution worked.

2. We tested a workaround by using the Geoprocessing Widget instead of the Data Extract Widget, which provides all the same parameters as the Data Extract Widget.

This was a real insight for me as I had always just used the Data Extract tool for, um, data extraction.  However, since this is nothing more than a gp task, it can also be called by the Geoprocessing Widget.  The GP widget worked immediately with my existing service (the one that Data Extact widget could not process).

So, to summarize, if you want to use the Data Extract widget, be sure your model uses the Extract Data Task tool from the Server Tools in ArcToobox.  If you want to use a custom made clip and ship service that utilizes the Extract Data script tool, you will need to use the Geoprocessing widget to successfully call it from Flex.