AnsweredAssumed Answered

Supply a feature class for a GP service

Question asked by tereshenkov on Feb 10, 2013
Latest reply on Feb 13, 2013 by tereshenkov
A model I built with ModelBuilder works as expected in Desktop yet generates numerous error messages when published as a geoprocessing (GP) service in ArcGIS Server 10.1 SP1. I've decided to start simple then and am trying to get just a single tool to work.

Here is my model. It has one parameter, a table or a feature class to truncate. When running in ArcGIS Desktop 10.1 SP1, user can specify what object should be truncated. When publishing as a model after getting a successful result, I use default settings for all settings (and Info for Message Level).


When running the GP service task in the same ArcGIS Desktop, I get this window in order to supply an object for truncating.


After pointing to a dataset (stored in a 10.1 file geodatabase on a local disk drive), the GP task gets running. The task does not truncate table and produces an error: 000187 : Only supports Geodatabase tables and feature classes.

My guess is that it has something to do with the Input mode of the task (User defined value) which makes it impossible to supply to my task a feature class from a file geodatabase in the file system. It seems as model uses the empty FeatureSet object instead of a feature class I supply when running the GP service task.

Is there a way to make the Truncate Table GP tool to use another feature class (not the same used when running the model first in Desktop before publishing) when published as a GP service?

EDIT: the model for truncating a table works fine when there are no parameters exposed and when running the GP task of a published service, it runs over the same feature class I've used when running the model first to generate a result. So, the GP service does work with feature classes yet only with the same one used when running the model before publishing.

Question: is it possible to supply a feature class to a GP task that differs from the feature class used to run the model and generate the result? NB: the feature class is not copied to the arcgisserver folder, it is being processed properly right in the geodatabase on the disk, so this part works properly.