Select to view content in your preferred language

Viewing Asyncronous Map Result Image Layer

3016
13
08-21-2012 01:49 PM
eddiequinlan
Deactivated User
Hi All,

Not sure if this is a flex issue or geoprocessing issue, but here it goes....

I have a basic geoprocessing model which performs a spatial select on a parcel layer and shows what parcels are selected (very basic at this point).  The model/.mxd runs fine.

I???ve published this model as an asyncronous result map service.

I???ve tested this model thru the ArcGIS Services Directory, by inputting some coordinate input values.  This runs fine and I can see the record count and attributes of the query.

First Question?????????  Can I run the same request thru the Services Directory and see the results as a ???map result???  either graphic or layer on a map?

My FLEX app runs this map service as an asyncronous job and I can see the records/attributes of the request.  What I can???t see is the resulting map image.

I don???t know if my published map is set correctly to display the map results (the reason for my first question), or if my FLEX app is not coded properly.

If I tweak my code and run a syncronous job, I can loop thru the results and shade the map correctly.  I???m trying to use the asyncronous method because of the potentially large amount of processing.  I???ve read just about all the documentation I can find and have tried numerous variations of coding, map service configurations, etc and still cannot get the results.

If I could test the results at the Services Directory and it works, then I would think my FLEX coding is wrong??????.

Any Suggestions?????????

Painfully,
Eddie
Tags (2)
0 Kudos
13 Replies
DasaPaddock
Esri Regular Contributor
After the job is complete, you can call getResultMapServiceLayer() or getResultImageLayer() and add the layer to your map.

See:
http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/tasks/Geoprocessor.html#getResultMa...
0 Kudos
eddiequinlan
Deactivated User
Thank you for the response Dasa and by the way I thought your lecture at the San Diego conference was the most entertaining and informative.

I'm using ArcGis 10.0, therefore I've only tried the getResultImageLayer () method with no luck.  Since my last post, I did run the model at the ArcGIS services directory; received back attribute results; and then tried viewing those results in Google Earth.   Google Earth recognized there was data, but visually I still didn't see any mapping symbology.

thanx,
Eddie
0 Kudos
eddiequinlan
Deactivated User
Here is a follow up to my last post.......................

Here are the results of the model running from the Services Directory.



ArcGIS Services Directory
Home > PropertyApp > Select_by_Graphics (GPServer) > SelectGraphics > j501295169e1c403681c1e94335987c6b  Help | API Reference

Job Details: SelectGraphics
Check Job Details:   
Return Messages:   True    False 
 

View In:   Google Earth

Job ID: j501295169e1c403681c1e94335987c6b

Job Status: esriJobSucceeded

Results:


Results_shp

Inputs:


Selecting_Features

Job Messages:


esriJobMessageTypeInformative: Submitted.
esriJobMessageTypeInformative: Executing...
esriJobMessageTypeInformative: Executing (SelectGraphics): Model "Feature Set" C:\Users\ARCGIS~1.000\AppData\Local\Temp\propertyapp\select_by_graphics_gpserver\j501295169e1c403681c1e94335987c6b\scratch\Results.shp
esriJobMessageTypeInformative: Start Time: Wed Aug 22 08:39:53 2012
esriJobMessageTypeInformative: Executing (Make Feature Layer): MakeFeatureLayer D:\gisdatabase\GdbProcessing\TestTables\Joined.gdb\ReducedData ReducedData_Layer # # "OBJECTID OBJECTID VISIBLE NONE;Shape Shape VISIBLE NONE;OBJECTID_1 OBJECTID_1 VISIBLE NONE;SAITEM SAITEM VISIBLE NONE;SASEQNO SASEQNO VISIBLE NONE;SARBOOK SARBOOK VISIBLE NONE;SARPAGE SARPAGE VISIBLE NONE;SARDATE SARDATE VISIBLE NONE;SAINSNO SAINSNO VISIBLE NONE;SAQU SAQU VISIBLE NONE;SASRCD SASRCD VISIBLE NONE;SAVI SAVI VISIBLE NONE;SAPRICE SAPRICE VISIBLE NONE;AREA AREA VISIBLE NONE;PIN_DSP PIN_DSP VISIBLE NONE;mAssmtRatio mAssmtRatio VISIBLE NONE;Asmt_Ratio Asmt_Ratio VISIBLE NONE;Shape_Length Shape_Length VISIBLE NONE;Shape_Area Shape_Area VISIBLE NONE"
esriJobMessageTypeInformative: Start Time: Wed Aug 22 08:39:53 2012
esriJobMessageTypeInformative: Succeeded at Wed Aug 22 08:39:53 2012 (Elapsed Time: 0.00 seconds)
esriJobMessageTypeInformative: Executing (Select Layer By Location): SelectLayerByLocation ReducedData_Layer INTERSECT "Feature Set" # NEW_SELECTION
esriJobMessageTypeInformative: Start Time: Wed Aug 22 08:39:53 2012
esriJobMessageTypeInformative: Succeeded at Wed Aug 22 08:39:54 2012 (Elapsed Time: 1.00 seconds)
esriJobMessageTypeInformative: Executing (Make Feature Layer (2)): MakeFeatureLayer ReducedData_Layer Layer1 # # "OBJECTID OBJECTID VISIBLE NONE;Shape Shape VISIBLE NONE;OBJECTID_1 OBJECTID_1 VISIBLE NONE;SAITEM SAITEM VISIBLE NONE;SASEQNO SASEQNO VISIBLE NONE;SARBOOK SARBOOK VISIBLE NONE;SARPAGE SARPAGE VISIBLE NONE;SARDATE SARDATE VISIBLE NONE;SAINSNO SAINSNO VISIBLE NONE;SAQU SAQU VISIBLE NONE;SASRCD SASRCD VISIBLE NONE;SAVI SAVI VISIBLE NONE;SAPRICE SAPRICE VISIBLE NONE;AREA AREA VISIBLE NONE;PIN_DSP PIN_DSP VISIBLE NONE;mAssmtRatio mAssmtRatio VISIBLE NONE;Asmt_Ratio Asmt_Ratio VISIBLE NONE;Shape_Length Shape_Length VISIBLE NONE;Shape_Area Shape_Area VISIBLE NONE"
esriJobMessageTypeInformative: Start Time: Wed Aug 22 08:39:54 2012
esriJobMessageTypeInformative: Succeeded at Wed Aug 22 08:39:54 2012 (Elapsed Time: 0.00 seconds)
esriJobMessageTypeInformative: Executing (Copy Features): CopyFeatures Layer1 C:\Users\ARCGIS~1.000\AppData\Local\Temp\propertyapp\select_by_graphics_gpserver\j501295169e1c403681c1e94335987c6b\scratch\Results.shp # 0 0 0
esriJobMessageTypeInformative: Start Time: Wed Aug 22 08:39:54 2012
esriJobMessageTypeInformative: Succeeded at Wed Aug 22 08:39:57 2012 (Elapsed Time: 3.00 seconds)
esriJobMessageTypeInformative: Succeeded at Wed Aug 22 08:39:57 2012 (Elapsed Time: 4.00 seconds)
esriJobMessageTypeInformative: Succeeded.
0 Kudos
DasaPaddock
Esri Regular Contributor
It sounds like your result map service may not be enabled.

This may help are you may need to contact Esri support at http://support.esri.com

http://resources.arcgis.com/en/help/main/10.1/#/About_result_map_services_in_REST_applications/01540...
0 Kudos
eddiequinlan
Deactivated User
Hi Dasa,

As far as I can tell my map service results are enabled.  Here is a copy of the server settings...........


Execution Type:   Synchronous  Asynchronous 
The tools exposed by the Geoprocessing service are stored in:   A toolbox A map
Map Document:    

Type in the location of the resource. If you want to browse to a location, only shared drives appear in the list. 

Data Frame:                           Active Data Frame    
Result Map Service:                 PropertyApp/Select_by_Graphics
Jobs Directory:                       c:\arcgisserver\arcgisjobsd:\arcgisserver\arcgisjobs
Virtual Jobs Directory:   
Location:   
Batch Size:   

Output Directory:                   c:\arcgisserver\arcgisoutputd:\arcgisserver\arcgisoutput
Virtual Output Directory:   
Supported Image Return Type:   

Server cache directory:  

Maximum Number of Records Returned by Server:    100000
Show Messages 
Local Jobs Directory 



In the ArcGIS10.1 example, it describes adding the map results by "right clicking" the results in the .mxd and publishing them.  In 10.0 I don't see any option/method to do this.  The only place I see is at the Server; as in the text above?

eddie
0 Kudos
DasaPaddock
Esri Regular Contributor
When you run the task from the services directory and view the result parameter, does it show you an image?

See the "Result map services" checklist at:
http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_dotnet_help/index.html#/Checklist_for...
0 Kudos
eddiequinlan
Deactivated User
No, only a Results: label.........



ArcGIS Services Directory
Home > PropertyApp > Select_by_Graphics (GPServer) > SelectGraphics > j2d09c3cba68a4c3ab13c3b2de6ab6238  Help | API Reference

Job Details: SelectGraphics
Check Job Details:   
Return Messages:   True    False 
 

View In:   Google Earth

Job ID: j2d09c3cba68a4c3ab13c3b2de6ab6238

Job Status: esriJobSucceeded

Results:


Results_shp

Inputs:


Selecting_Features

Job Messages:


esriJobMessageTypeInformative: Submitted.
esriJobMessageTypeInformative: Executing...
esriJobMessageTypeInformative: Executing (SelectGraphics): Model c:\arcgisserver\arcgisjobs\propertyapp\select_by_graphics_gpserver\j2d09c3cba68a4c3ab13c3b2de6ab6238\scratch\Results.shp "Feature Set"
esriJobMessageTypeInformative: Start Time: Wed Aug 22 12:49:29 2012
esriJobMessageTypeInformative: Executing (Make Feature Layer): MakeFeatureLayer D:\gisdatabase\GdbProcessing\TestTables\Joined.gdb\ReducedData ReducedData_Layer # # "OBJECTID OBJECTID VISIBLE NONE;Shape Shape VISIBLE NONE;OBJECTID_1 OBJECTID_1 VISIBLE NONE;SAITEM SAITEM VISIBLE NONE;SASEQNO SASEQNO VISIBLE NONE;SARBOOK SARBOOK VISIBLE NONE;SARPAGE SARPAGE VISIBLE NONE;SARDATE SARDATE VISIBLE NONE;SAINSNO SAINSNO VISIBLE NONE;SAQU SAQU VISIBLE NONE;SASRCD SASRCD VISIBLE NONE;SAVI SAVI VISIBLE NONE;SAPRICE SAPRICE VISIBLE NONE;AREA AREA VISIBLE NONE;PIN_DSP PIN_DSP VISIBLE NONE;mAssmtRatio mAssmtRatio VISIBLE NONE;Asmt_Ratio Asmt_Ratio VISIBLE NONE;Shape_Length Shape_Length VISIBLE NONE;Shape_Area Shape_Area VISIBLE NONE"
esriJobMessageTypeInformative: Start Time: Wed Aug 22 12:49:29 2012
esriJobMessageTypeInformative: Succeeded at Wed Aug 22 12:49:29 2012 (Elapsed Time: 0.00 seconds)
esriJobMessageTypeInformative: Executing (Select Layer By Location): SelectLayerByLocation ReducedData_Layer INTERSECT "Feature Set" # NEW_SELECTION
esriJobMessageTypeInformative: Start Time: Wed Aug 22 12:49:29 2012
esriJobMessageTypeInformative: Succeeded at Wed Aug 22 12:49:29 2012 (Elapsed Time: 0.00 seconds)
esriJobMessageTypeInformative: Executing (Make Feature Layer (2)): MakeFeatureLayer ReducedData_Layer Layer1 # # "OBJECTID OBJECTID VISIBLE NONE;Shape Shape VISIBLE NONE;OBJECTID_1 OBJECTID_1 VISIBLE NONE;SAITEM SAITEM VISIBLE NONE;SASEQNO SASEQNO VISIBLE NONE;SARBOOK SARBOOK VISIBLE NONE;SARPAGE SARPAGE VISIBLE NONE;SARDATE SARDATE VISIBLE NONE;SAINSNO SAINSNO VISIBLE NONE;SAQU SAQU VISIBLE NONE;SASRCD SASRCD VISIBLE NONE;SAVI SAVI VISIBLE NONE;SAPRICE SAPRICE VISIBLE NONE;AREA AREA VISIBLE NONE;PIN_DSP PIN_DSP VISIBLE NONE;mAssmtRatio mAssmtRatio VISIBLE NONE;Asmt_Ratio Asmt_Ratio VISIBLE NONE;Shape_Length Shape_Length VISIBLE NONE;Shape_Area Shape_Area VISIBLE NONE"
esriJobMessageTypeInformative: Start Time: Wed Aug 22 12:49:29 2012
esriJobMessageTypeInformative: Succeeded at Wed Aug 22 12:49:29 2012 (Elapsed Time: 0.00 seconds)
esriJobMessageTypeInformative: Executing (Copy Features): CopyFeatures Layer1 c:\arcgisserver\arcgisjobs\propertyapp\select_by_graphics_gpserver\j2d09c3cba68a4c3ab13c3b2de6ab6238\scratch\Results.shp # 0 0 0
esriJobMessageTypeInformative: Start Time: Wed Aug 22 12:49:29 2012
esriJobMessageTypeInformative: Succeeded at Wed Aug 22 12:49:31 2012 (Elapsed Time: 2.00 seconds)
esriJobMessageTypeInformative: Succeeded at Wed Aug 22 12:49:31 2012 (Elapsed Time: 2.00 seconds)
esriJobMessageTypeInformative: Succeeded.
0 Kudos
eddiequinlan
Deactivated User
Hi Dasa,

I have some more info......

My model still runs correctly, but now in the Services Directory the results parameter only shows a "graphic X" with xmin, xmax, etc..  when I open this in Google Earth it will now show this X in the approximate location.  There is no longer any attribute data shown in the results parameter.

However, in the \arcgisserver\arcgisjobs\job_id I can access the corresponding .shp file; add it to ArcMap; view the .shp file; and open the attribute table.

In my opinion, the results are not getting to the service directory properly; or configured properly.

Any other suggestions?
Eddie
0 Kudos
eddiequinlan
Deactivated User
Hi Dasa,

Sorry I keep responding to myself, but things are beginning to work and I'd like others to know.

This makes no sense to me, but I tried changing the "Result Map Service" in the Geoprocessing Service Parameters to "none".  The results now show all the returned feature attributes in the "Services Directory" and the map results are viewable thru Google Earth.

Eddie
0 Kudos