8

No, you don't need to re-run the script tool and republish the result. You will need to that only if you make any changes to the tool parameters (adding/removing/changing data type). This is required because if you take a look at C:\arcgisserver\directories\arcgissystem\arcgisinput\REF01\%Gpservicename%.GPServer\extracted\v101, you will find a toolbox which ...


7

Execute Task for synchronous GP services and Submit Job for asynchronous GP services. From Esri Help: Asynchronous and synchronous define how the client (the application using the task) interacts with the server and gets the result from the task. When a service is set to synchronous, the client waits for the task to finish. Typically, a synchronous ...


6

There is no clip analysis tool available within the default application, however you can create your own clip geoprocessing service and use that within ArcGIS Explorer. See the following links below: Using geoprocessing services in ArcGIS Explorer for Windows Desktop Geoprocessing service example: Clip And Ship


6

Async writes to the Job directory and those results are persisted until the Server cleans them up. Sync sends the results back to the client. With a GP Service you should return a file or data, not a directory (especially with Sync). The framework is meant to return these outputs, it isn't meant to return a folder you can browse to. You'd have to expose ...


6

Using Pre-existing WPS or Building Them There is a whole description/tutorial on web processing services (WPS) found here. Most of this is going to be done using HTTP requests sent to a server like GeoServer that is hosting this process. The GeoServer link will outline the general process of hosting and calling a WPS using their software. GeoServer's WPS ...


6

You can't publish a geoprocessing service directly to ArcGIS Online. In other words, Esri's servers won't host your geoprocessing service for you and provide the processing power. You need to publish the service to ArcGIS Server, which gives you a REST URL to access the service. With a geoprocessing serice, all you can do in ArcGIS Online is share that REST ...


5

Just to expand on PolyGeo's answer...I've personally put a lot of model/script tools up on arcgis.com that have the purpose of being used as a Geoprocessing Service. In no particular order, heres all the ones I can think of: Tutorials from the ArcGIS Server help. And the download of data, models and scripts which go with those tutorials. Esri UC/DevSummit ...


5

There are a few options: Latitude / Longitude to ZIP + 4, allows you to input the lat, long and receive a Zip code in return. You could also use this to input the values and run the search yourself All US zip codes with their corresponding latitude and longitude coordinates. Comma delimited for your database


5

You cannot use "CURRENT" in a Geoprocessing Service. The GP Service has no idea what "CURRENT" is as the service isn't an open session of ArcMap. CURRENT is reserved for working with a script inside ArcMap only. To use arcpy.Mapping, specifically a reference to a map document, you need to provide the full path to the MXD in place of CURRENT. mxd = arcpy....


4

I find out the issue. The above program is only work with ArcGIS 10.1 Server ,I think if I upgrade my 10.03 version server with 10.1 this feature will work


4

As Vince pointed out in a comment - you could theoretically write code to clip a map/feature service. But that would probably be a lot of custom work. You wouldnt as much be extending the Clip and Ship tool as you'd be writing a custom extraction of JSON from map services. Generally the clip and ship work flow is comprised of 2 services: GP + Map. They both ...


4

The Try/except does work - the problem here is GP Services have defined inputs and outputs. When you publish it and go look at the REST end point of the service, you'll see how these items are defined. Your service expects an output of a certain type. When your service "fails", it doesn't return whats expected of it and you get that error. If you don't want ...


4

Give Quick Tips: Consuming Feature Services with Geoprocessing a read. It should get you started by providing you ideas of how you can actually consume a feature service with geoprocessing. Either have it as a layer inside the map and use a name match in the script to it. Or use a featureset parameter and use the URL to it Either way, unless you want to ...


4

If you use the arcpy.AddMessage(message), it should show up in your published GP, but it shows up on the job messages page (not the server logs as you indicated in your question). You also need to enable this in the service properties (or when you publish the service):


4

You can do this easily with some HTML by using a text box somewhere in your page or in a modal window: <input type="text" id="out-folder"> And then for the params of your GP Service in JavaScript: // set up params var gpParams = { "Boundary": fs, "Layer_URL": dom.byId("layer-choice").value, "Output_Folder_Name": dom.byId("out-folder")....


4

Use the arcpy.env.scratchGDB instead - this will create those C:\arcgisserver\directories\arcgisjobs\scriptgp_gpserver\j002461f550fc4658a08da‌​c98c7bd6672 gdb for each job. Use the SetParameter, not SetParameterAsText. The source script tool: import arcpy import os in_fc = r"C:\GIS\ags_data\pub_data.gdb\_small" output_path = r"C:\GIS\ags_data\pub_data.gdb"...


4

That is exactly what I have done many times. You can author a tool, run it in ArcMap to get a result, you publish this result on an ArcGIS Server instance. Now you have a geoprocessing service (GP) there. If you want to publish this on another machine, there are some alternatives: You need to copy the Result object into another machine with ArcGIS Desktop ...


4

A good tool to have in your arsenal is the Developer console. In your browser, open it by pushing CTRL+SHIFT+I (I will be describing this in Chrome, Firefox is very similar). Switch to the Network Tab and have your app ready to execute the GP tool. Now click the clear button in the console, this should clear out the window for you so you can see what ...


3

At the end of your submit job url, simply append &f=json That will return the response in json, which should give you the jobID and status.


3

I think there is some misunderstatement of the ArcGIS JS API. Its focused on building Web mapping Clients in the browser, and has nothing to do with ArcGIS Server Geoprocessing. For sure ArcGIS Server Services are the major data source for an ArcGIS JS API App, but, you can also use another JS Framework for building your map app, like leaflet, openlayers or ...


3

It does not appear that any of the Javascript options outside of the ArcGIS Javascript APIs for integrating with Esri services offer much beyond feature access and geocoding. You could include the ArcGIS Javascript API in your app and only require/import the esri/tasks/Geoprocessor part. Examples like this seem to separate the Geoprocessing tool call pretty ...


3

You can actually edit the published script file (.py). The only thing you need to do is to edit the file in some IDE (I use PyScripter) and re-run the GP task. No restart of service is required (at least when doing those modifications I needed, it wasn't). However, it is not recommended by Esri and I completely understand why - as soon as you edit the ...


3

The asker (@ConeGIS) has indicated in a Comment that this went away when: import numpy was replaced by: from numpy import *


3

To avoid situations like these, I rework my toolbox until I am satisfied with it, copy it to a shared folder on the AGS machine and publish the service from there, making sure that model's scratch gdb is referenced in the environment settings correctly. You should also register the gdb with ArcGIS Server. Anecdotally, I've found this process to be hit-and-...


3

You need to look at the documentation for the GeoProcessor. Basically, you will create a new geoprocessor object like this: gp = new esri.tasks.Geoprocessor("http://YourServer/ArcGIS/rest/services/foo/GPServer/bar"); Then you will need to create a parameter object, with the two required parameters. for this, I'm assuming you will need to take the user's ...


3

Yes, you can publish this tool so it can reconcile versions that are created dynamically. You need to add a couple other tools to the model though. Most of the tool parameters can/should be model parameters, this will give you the most flexibility. You should not use a parameter for the sde connection since this will be a connection on the server. The ...


3

It's dependent on your Job folder setting. If I remember correctly, it's set to a default of 10 minutes. Read this help topic, it explains how to set the value. You can use that knowledge to check the value and change it if you need.


3

Unfortunately, there isn't any way to change the parameters' values you've used when running the tool for publishing its result later on. I usually deal with these situations in an ugly way but it works. I work with ArcPy, but these should concepts should apply to a Python toolbox tool, too. Specify an input parameter in your script (eg inputDate). Use a ...


3

As @AlexTereshenkov noted, there doesn't seem to be a way to prevent this. So, I have come up with the following work around: I have revised my services so that bad inputs will generate empty output. (For me, this was an empty shapefile or geodatabase.) This is far, far from ideal. An error message would be more useful to users, but my particular scripts ...


3

You can open the service definition (SD) and modify the script content by doing the following: Using 7-zip (note: WinZip won't work)... Right-click on the SD file and select "Open archive" In 7-Zip File Manager, go to v101 > arcgis (you will find you python script) Drag & drop the modified python script Click "Yes" to the prompt asking "Are you sure ...


Only top voted, non community-wiki answers of a minimum length are eligible