Creating models for geoprocessing services |
|
Release 9.3
Last modified April 24, 2009 |
Print all topics in : "Geoprocessing with ArcGIS Server" |
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:
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.
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
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.
NOTE: Do not set output variables to Managed, only intermediate variables.
%scratchworkspace%/templines.shp %scratchworkspace%/scratch.gdb/outWatershed
in_memory/tempdata
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.
NOTE: Do not set the scratch workspace for any model processes. Do not set the scratch workspace for the model.