10.1 Geoprocessing Service Questions/Issues

273
4
10-01-2012 01:08 PM
RyanCoodey
Occasional Contributor III
Very excited about most of what I am seeing with 10.1 server until I got around to publishing a geoprocessing service.  Seems like AGS took a few steps backward with these but I am hoping I am just doing something wrong...

A few questions if I may:
1) We can no longer just right click a toolbox and publish it... WHY???  Is this correct?

2) So we have to "run" the tool first and then we can publish from the results window... But the tool I am trying to publish is inputting data into our corporate warehouse, so I don't want to run it.  I did just so I could try publishing it, but then had to immediately go into the feature class and manually delete out the test data.  Am I missing something?  There has to be another way?

3) When the tool gets published, it takes the values I entered when running it (since we have to run it to publish it) and uses those as default values... I do not want those as defaults... I want the field to stay blank.  And I don???t see anywhere to change these values either before or after it is published.  How can I either not use those as defaults or change the default parameter values?

4) I see in ArcCatalog under the GIS server it still shows a toolbox with the same name as the tool it contains (I think that is just the name of the service which I didn???t change)??? so does each toolbox now only have the one tool?  So no actual concept of a toolbox anymore really?  No way to add multiple tools (tasks) to the same service (toolbox)?

Thanks a lot for any help or information.
Tags (2)
0 Kudos
4 Replies
KevinGooss
Occasional Contributor
I feel your pain 100% Ryan
http://forums.arcgis.com/threads/66230-Anyone-using-the-new-Python-Toolboxes-at-10.1?p=233368#post23...

I have been struggling with this since we started working in 10.1
We had many upgrade tasks to get our old apps up to snuff at 10.1 (editing, printing, etc.). I never would have guessed that upgrading the gp tools would have been the most time consuming. Now my estimates are off and i'm bleeding on this task.

To answer only one of your questions - you can add multiple tools to a toolbox that you turn into a service. In the publish dialog inside of ArcMap there is a button up at the top near the Stage/Analyze buttons that says something like Add Result. That is for adding another tool to a current toolbox.

I think this page describes the issue quite succinctly:
http://resources.arcgis.com/en/help/main/10.1/index.html#/Migrating_geoprocessing_services_from_vers...

the top explains the process for publishing at 10.0 (note the single line of text describing a very easy process). The rest of the page (40 or 50 lines) describes the 'new and improved' process for publishing at 10.1

After a few discussion with esri support the gist i got was that we could not 'just publish' tools because we need to make sure they work properly. Or rather, esri needs to make sure they work properly. So everything must run successfully in ArcMap before it is stamped with approval for publishing. Never mind that some tools require extensive setup to be run, some run against data you don't want to modify, some run with entirely different datasets and needs from the other tools you want in the toolbox, and a whole host of other reasons why you wouldn't run all of the tools you want to create in a single map document.

And it gets worse. When you run your tool in ArcMap, so it gets the stamp of approval, esri will modify your script for you so that it works better!
0 Kudos
RyanCoodey
Occasional Contributor III
Kevin,

Thanks a lot for all that information.

I understand why they would want the tools to be ran and validated before publishing... but very frustrating for the power user that does not want this.  I imagine they get a number of support calls for tools that just do not work though.  I guess we can only hope they bring this functionality back.

I did not know that it would change the underlying scripts either... so thanks for pointing that out!
0 Kudos
KevinGooss
Occasional Contributor
There are ways around some of these restrictions. In your case you could run your tool in arcmap but just comment out the line that commits to the db.
Then publish your service and try to find out where esri is hiding the modified copy of your py file -search your ags machine.
Then you can edit that py file to uncomment your commit line.
Not a glamorous workflow. But i think as long as you dont mess with the parameters or external data sources you can get away with that.
0 Kudos
RyanCoodey
Occasional Contributor III
Ahh, nice... thanks for that info. 

I found the toolbox and script under "arcgisserver\directories\arcgissystem\arcgisinput\Geoprocessing\<tool_name>.GPServer".  I was looking to try and remove those default parameter values but doesn�??t look like I can.  I see there is a result file (.rlt) which contains them but I cannot edit it (its binary and ArcMap can open it but cannot edit the values).  In the "arcgisoutput" folder it also has some files, including an xml file with those default parameters... but those files get deleted and recreated whenever the server stops and starts so don�??t want to change it there.

Thanks for all the help Kevin!
0 Kudos