Creating a new Geoprocessing widget

2670
14
11-04-2010 04:32 AM
PrestigeMakanga
New Contributor
I am running a geoprocessing service and would like to consume the service in the ArcGIS viewer for flex. i understand I have to create a widget for this. Would anyone be able to assist me in this regard. The link to the GP service is http://cuo.geomatics.uct.ac.za/ArcGIS/rest/services/CUO_Tools2/GPServer/Buildable_Accessible_Areas and I have attached a picture of the interface as is appears in a pp based on the ArcGIS server ADF.

Regards
Prestige
Tags (2)
0 Kudos
14 Replies
RobertScheitlin__GISP
MVP Emeritus
Prestige,

   I can not get anything other than job failed using this service even from your rest service directory link you provided... Any Ideas?
0 Kudos
BjornSvensson
Esri Regular Contributor
It works within REST if you use the following as an input at http://cuo.geomatics.uct.ac.za/ArcGIS/rest/services/CUO_Tools2/GPServer/Buildable_Accessible_Areas/s... and then wait almost a minute:
{ "distance" : 0.5, "units" : "esriMiles" }

Result:
http://cuo.geomatics.uct.ac.za/ArcGIS/rest/services/CUO_Tools2/GPServer/Buildable_Accessible_Areas/j...
0 Kudos
PrestigeMakanga
New Contributor
I am running the service successfully in the following app. http://cuo.geomatics.uct.ac.za/informalsettlements/. It is also running fine through arcgis explorer.

Can some access constraints on our server possibly cause this?

Robert, on the above link click on the "potential housing land" task to see the default input values. If you just click submit it should. I am still refining the model so at the moment it returns a result after about 5 mins.
0 Kudos
PrestigeMakanga
New Contributor
I have attached a typical result from running the model. I have run it with two different sets of parameters as shown by the different colours. If you still have a problem with running the GP service let me know.

Regards
Prestige
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Prestige,

   Have you read these articles about deploying GP Processes for use in server? Most people think that just because it runs in ArcMap that it will work fine for the web and normally it does not. By the looks of it you have this figured out though as you are running it from your web adf site. My big question is are you publishing a MXD or a toolbox when you deployed this to the server?

http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_dotnet_help/0093/00930000000r000000.h...

http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_dotnet_help/0093/00930000005v000000.h...
0 Kudos
PrestigeMakanga
New Contributor
I have not read these specific articles since I am still on 9.3.1. But I have understood the basics of publishing a model from the 9.3.1 tutorials.

I am publishing a tool box. So r u still getting errors in running the model?

Regards
Prestige
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Prestige,

   Yes here is one of the errors I get

    * esriJobMessageTypeInformative: Submitted.
    * esriJobMessageTypeInformative: Executing...
    * esriJobMessageTypeInformative: Executing (Buildable_Accessible_Areas): Model "0.5 Miles" "0.5 Miles" "0.5 Miles" "0.5 Miles" "0.5 Miles" "0.5 Miles" "0.5 Miles" "0.5 Miles" F:\CUOData\CMA\Shapes\Model_Output.gdb\Vacant_Land
    * esriJobMessageTypeInformative: Start Time: Tue Nov 09 16:00:52 2010
    * esriJobMessageTypeInformative: Executing (Buildability_Model): Model4 "0.5 Miles" "0.5 Miles" "0.5 Miles" "0.5 Miles" F:\CUOData\CMA\Shapes\Model_Output.gdb\Buildable_Areas
    * esriJobMessageTypeInformative: Start Time: Tue Nov 09 16:01:01 2010
    * esriJobMessageTypeInformative: Executing (Buffer (3)): Buffer F:\CUOData\CMA\Shapes\CMA_Vectors_2.gdb\WETLANDS F:\CUOData\CMA\Shapes\Model_Output.gdb\WETLANDS_Buffer "0.5 Miles" FULL ROUND ALL #
    * esriJobMessageTypeInformative: Start Time: Tue Nov 09 16:01:06 2010
    * esriJobMessageTypeError: ERROR 000210: Cannot create output F:\CUOData\CMA\Shapes\Model_Output.gdb\WETLANDS_Buffer
    * esriJobMessageTypeError: A locator with this name does not exist.
    * esriJobMessageTypeError: Failed to execute (Buffer (3)).
    * esriJobMessageTypeInformative: End Time: Tue Nov 09 16:01:07 2010 (Elapsed Time: 1.00 seconds)
    * esriJobMessageTypeError: Failed to execute (Buildability_Model).
    * esriJobMessageTypeInformative: End Time: Tue Nov 09 16:01:08 2010 (Elapsed Time: 7.00 seconds)
    * esriJobMessageTypeError: Failed to execute (Buildable_Accessible_Areas).
    * esriJobMessageTypeInformative: End Time: Tue Nov 09 16:01:08 2010 (Elapsed Time: 16.00 seconds)
    * esriJobMessageTypeError: Failed.

What is the WKID you are using for the GP Task?
0 Kudos
PrestigeMakanga
New Contributor
Hi Robert,

Surprisingly i got the same error today. However the service is now running ok after clearing the output Geodatabase. Try and see if it does not run fine now. Let me know if there are any other errors.

I am not inserting any wkid through the adf app or in explorer.

Regards
Prestige
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Prestige,

   Here is a widget for your GP Task. I have test and it works well.
0 Kudos