Show Navigation | Hide Navigation
You are here:
Geoprocessing > Geoprocessing with ArcGIS Server

Creating models for geoprocessing services

Release 9.3
Last modified April 24, 2009
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Geoprocessing with ArcGIS Server"


Related Topics

Note: This topic was updated for 9.3.1.

There are certain rules that must be followed when creating models suitable for publishing to ArcGIS Server. There are two basic rules:


  1. Input and output parameters to models must use data types supported by the server.
  2. Models must write their intermediate and output data to specific locations.
To view some completed models and services, follow the link below.

Learn more about geoprocessing service examples


Data types

Models can only use certain input and output parameter data types, as discussed in detail in Key concepts for geoprocessing services and Input and output data types.

For existing models, the most common modification you need to make is to change input feature class model variables (which are not supported by ArcGIS Server) to feature set variables (which are supported by ArcGIS Server).
Learn more about feature sets

Some data types, such as TIN, are not allowed for parameters and the model will not publish. You will receive an error message when publishing, as illustrated below.

Error dialog for invalid data type

Other parameter data types will publish, but they will be transformed to a String data type. For example, an Areal Unit data type will become a String data type in the published task. If your model has a converted data type as an input parameter, you will need to change its type to String and convert it to your desired data type within your model.
Learn more about converting to and from String data types


Intermediate and output data



When your task executes, ArcGIS Server creates a job directory where you can write the intermediate and output data of your model, as illustrated below. You must write your intermediate data and output data to either the scratch folder or the scratch geodatabase.

Intermediate and output data location

Rules for intermediate data





Rules for output data


Output data must be written to the following:


NOTE: Do not make your output data managed.


NOTE: Do not write output data to in_memory if you have a result map service.


NOTE: Be sure you understand the limitations of using in_memory before writing data to this location.


Learn more about the in_memory workspace

NOTE: Do not set the scratch workspace for any model processes. Do not set the scratch workspace for the model.



Using the toolshare folder structure


When you are developing tools and map documents for publishing, you should use the toolshare folder structure to gather together your resources—toolboxes, map documents, data, and documentation. This folder structure contains a scratch folder with a scratch file geodatabase, just like the geoprocessing service job directory that ArcGIS Server creates for your task, as illustrated below. By using the toolshare folder structure and setting your workspace to the scratch folder, you are emulating ArcGIS Server, which makes testing and debugging your tool much easier.

Setting scratch workspace in the ToolShare folder structure

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.