POST
|
Thanks for the reply, Kevin. We re-authorized our server with an Advanced license and the geoprocessing service works now. I did a little digging and finally found a brochure that mentions "Advanced Geoprocessing" and license leveling. I think it would be good if this was mentioned in the help somewhere.
... View more
05-21-2013
07:40 AM
|
0
|
0
|
282
|
POST
|
Well, after much trial and error, I discovered that when you run the Manage Map Server Cache Tiles geoprocessing tool from Desktop, it actually calls the corresponding geoprocessing service in the System folder. So, I don't think the service is meant to be run directly, but only through the Desktop tool. Just an assumption. As a side note: just like any other service, sometimes those System folder geoprocessing services need to be restarted if you get funky errors or they seem to be running for longer than normal.
... View more
05-21-2013
06:13 AM
|
3
|
0
|
531
|
POST
|
I ended up not using the Clear Workspace Cache tool and couldn't figure out a solution with it. So, we ended up moving the main body of code to a standalone Python script that is called from the Python toolbox using subprocess. Connections aren't getting refreshed in ArcGIS Server, so we had to move the script to its own process that gets called every time. Adds an extra file to run, but it works.
... View more
05-21-2013
06:06 AM
|
0
|
0
|
1349
|
POST
|
I have a Python toolbox custom tool that exports maps from a template MXD, and one of the geoprocessing tools I'm using in the custom tool is Feature Outline Masks. This tool only works at the ArcGIS Desktop Advanced license level. When I run it in Desktop with this license, the tool works as desired. We want to use this as a georpocessing service, and got it to publish successfully. Yet, when I run the service, the tool fails at Feature Outline Masks because it says that the tool is not licensed. Our ArcGIS 10.1 Server has Desktop installed on it and the license level is set to Advanced. I've also put the "import arcinfo" statement in my script, but that doesn't seem to make a different. In the script, I check to see if an Advanced license is available, and I get no complaints back from the tool. The "SetProduct" function is a legacy function, so that won't work. Any tips? What am I missing? Is our Desktop install on the server conflicting with the licensing?
... View more
05-16-2013
12:38 PM
|
0
|
2
|
520
|
POST
|
I ran the tool (the service version) and got the same error code that I mentioned before, but with a different description: "Failed retrieve configuration for [service URL]. ArcGIS Server requires a service type (ParentType) and a server object extension type (Type)." I was reading up on SOEs this morning, and I understand that you can build them off of REST or SOAP, but from the documentation it sounds like I need to add my own custom one? Or was there something I needed to enable on my cached service in order for the geoprocessing services to work?
... View more
12-10-2012
04:36 AM
|
0
|
0
|
531
|
POST
|
I'm trying to use the Manage Map Cache Tiles geoprocessing service that comes out-of-the-box with ArcGIS 10.1 for Server, and I've been getting this error: ERROR 001428: Failed to retrieve configuration for service [insert URL here]. The service itself seems pretty self-explanatory, but I haven't been able to find any documentation on these services so that I can verify that I'm passing in the right parameters. I'm assuming you use the REST Map Server URL, put in the list of scales, number of caching instances, and select the Update Mode. I think the issue is the URL, but I'm copying it directly from my REST endpoint and don't understand wha the issue might be. Could anyone direct me to some documentation or examples they've found, or share your experiences with this tool? Thanks!
... View more
12-07-2012
11:53 AM
|
0
|
5
|
3519
|
POST
|
I thought I'd give a short update on this issue. The reason why I wasn't getting any results back in my SDE database was because I had some hard-coded paths to databases and features classes in my script, and when I published my toolbox to ArcGIS Server, those objects were getting copied locally on the server, which I was unaware of. I didn't want this to happen because I needed the results to be written to an SDE database so that I could query to see if results were actually returned by the tool. All I had to do was remove those hard-coded paths, make them parameters and set them as constants, and make sure that I had all my data sources registered on the server's data store. The tool has been running the way it was designed. Also, my code was getting changed in my toolbox when I published it to the server, so I had to go to the copy on the server and change some of the code back to the way it was before publication.
... View more
11-15-2012
10:55 AM
|
0
|
0
|
719
|
POST
|
I want to use the Clear Workspace Cache tool in a geoprocessing service published from a Python toolbox in ArcGIS 10.1, because I need a way to clear/refresh SDE database connections for the service to run properly. When I use this tool in my script, it does not have any affect on the established connections made by the service. To test to see if the tool actually worked, I created a simple model in Model Builder using the Make Feature Layer tool and Feature Class to Feature Class tool, and setting Clear Workspace Cache as a precondition before running the previous two tools. The reason why I used these tools in my example is that, I came across an issue with adding new features to a feature service and running Make Feature Layer to create a layer from those newly added features. When you have a fresh geoprocessing service, and you pass a query into the Make Feature Layer tool to make the layer from the newly added features, the layer gets successfully created with those features. Say you have the feature service in a Flex viewer, and you end your session, come back to it, add new features, and run the geoprocessing service, the feature layer will NOT get created because the previous connections made by the geoprocessing service from the original session have (assumingly) not been refreshed or reconnected to see the newly added features. The same "blind" behavior occurs in ArcMap. Now, Clear Workspace Cache seems to get rid of this problem IF I use it in Model Builder as a precondition and publish the whole model as a geoprocessing service. When I add the tool to my Python script, that precondition logic is lost and I'm stuck with not getting the new features that I need after editing to make my feature layer. Hopefully this makes some sense. It's caused quite the headache. Thoughts? Is there any way to simulate the Model Builder preconition in my script besides placing the tool call at the top of the script before everything else runs?
... View more
11-15-2012
10:23 AM
|
0
|
2
|
5813
|
POST
|
Thanks for your reply, Kevin. I'll have to try to put the tool in my other toolbox. The Execute Reviewer Batch Job tool needs a Data Reviewer license. I don't think that's the issue though. When I run my tool as a GP service, ArcGIS Server says that it ran successfully, but I didn't get any results back.
... View more
10-02-2012
09:30 AM
|
0
|
0
|
234
|
POST
|
The only result I want from the tool is whether or not the features passed or failed. The way that I programmed my tool to determine this is by querying the table that contains the results from the Execute Reviewer Batch Job tool by using the OBJECTIDs of the features that were checked since they are stored in that table. If records are returned from the query, then one or more of the features failed. If nothing is returned, then the features passed. The Execute Reviewer Batch Job tool should, after executing, automatically write any error records to the REVTABLEMAIN table in the database containing the Data Reviewer schema. This isn't happening in the service. I don't think any of the individual tools are running. When I run the tool from ArcMap before publishing it to a geoprocessing service, do the results have to be referencing the data in the map document or can I navigate to my inputs on the file system?
... View more
10-02-2012
09:19 AM
|
0
|
0
|
485
|
POST
|
So, even though it works correctly from the Desktop the way that it is now, it won't work correctly as a geoprocessing service if I don't have outputs? I mean, when I run my tool, no errors get written to the Data Reviewer database even when I pass in features that I KNOW are going to return errors. As far as I can see, NOTHING happens when I run the geoprocessing service. I should mention that this geoprocessing service is going to be used in a Flex application, not in a geoprocessing widget, but called in underlying code.
... View more
10-02-2012
08:29 AM
|
0
|
0
|
485
|
POST
|
Here are my parameters. The first one is accepting an input feature class, the second is a query where the user is passing in a list of OBJECTIDs from the input feature class, and the last variable is a value that helps a function later on in the code query a table for a path name to a Data Reviewer check. def getParameterInfo(self):
### Define parameter definitions
param0 = arcpy.Parameter(
displayName="Input Feature Class Location",
name="edit_fc",
datatype="Feature Class",
parameterType="Optional",
direction="Input",
multiValue=True)
param0.filter.list = ["Polygon", "Polyline", "Point"]
param1 = arcpy.Parameter(
displayName="OID Query Expression",
name="oid_query",
datatype="SQL Expression",
parameterType="Optional",
direction="Input")
param1.parameterDependencies = [param0.name]
param2 = arcpy.Parameter(
displayName="Workflow",
name="wf_name",
datatype="String",
parameterType="Optional",
direction="Input")
params = [param0, param1, param2]
return params Ultimately, with this tool (including the Data Reviewer part of it), I'm writing records to the Reviewer table after the Execute Reviewer Batch Job tool runs and querying the database to find out if those records are there. The only thing I want to return is if those records exist or not; a pass or fail.
... View more
10-02-2012
08:14 AM
|
0
|
0
|
485
|
POST
|
I had already set up the service to create two layers, one from the Make Feature Layer and another from the Selection (which I'm also making in to a feature layer). I'm trying to output them to a folder that the service can see, but I get nothing. Should I be outputting this to a map instead?
... View more
10-02-2012
07:52 AM
|
0
|
0
|
485
|
POST
|
Hello all, I've created a custom tool in a Python toolbox and want to publish it as a geoprocessing service. It has three parameters, and it uses Make Feature Layer tool, Select By Location Tool, and the Execute Reviewer Batch Job tool. It runs perfectly in Desktop. Yet, when I publish it and go to run it as a service, ArcGIS Server says that it runs successfully, but I get no results back. I honestly don't think that any of my code runs, even though ArcGIS Server says that it completed. I even started picking apart my tool to see if there was an issue with certain parts, but even when I tear it down to something extremely simple, I get nothing from ArcGIS Server. I've registered the databases and folder locations that I'm using too with Server. Has anyone else been having issues trying to publish their geoprocessing tools to services? Could I get some help?
... View more
10-02-2012
07:12 AM
|
0
|
13
|
2946
|
POST
|
"parameters[0].values" worked without a hitch. All I had to do was set that equal to a variable name and then get the value in the list at the right index. Thank you so much! fc_list = parameters[0].values
edit_fc = fc_list[0]
... View more
09-24-2012
08:35 AM
|
0
|
0
|
1055
|
Title | Kudos | Posted |
---|---|---|
3 | 05-21-2013 06:13 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|