The basis for a GP Service is a running ArcToolbox Tool (Model or Script).

Geoprocessing model in ArcMap Model Builder
For adjusting the model for a Geoprocessing service some changes have to be done:
•Access rights: Be sure to store your Toolbox in a local directory with access rights for the ArcGISSOC account. Directories for the input, intermediate and output data have to be accessed with read (input) and write (intermediate, output) access. In general the following data structure with full access for the ArcGISSoc account is recommended:

Access schematics of ArcGIS Server services. © by Esri
•Input data: It is recommended to use local data where possible, but it is also possible to use UNC-paths. Connect data with absolute paths inside the model using the properties of the connected Tool (do not use drag and drop from the TOC or the "Add Data" Button). Concerning performance issues it is recommended to store input data in file geodatabases.

Input data of geoprocessing model / tool
•Supported input data types: According to the Esri online help (s. http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_dotnet_help/index.html#/na/009300000029000000/ for details) only certain input parameter data types are supported in the different clients for ArcGIS Server. In the following table the information under the grey header cells is provided by Esri. The information under the orange header cell about the supported input types for use in WebOffice 10 R3 was added by SynerGIS.
Input parameter data type |
Supported on ArcGIS Desktop clients? |
Supported on ArcGIS Explorer client? |
Supported on Web application clients? |
Supported in WebOffice 10R3? |
Feature Set |
Yes |
Yes |
Yes |
Yes (max. 1) |
Record Set |
Yes |
Yes |
Yes |
Yes |
Feature Class |
No (But Feature Class input is supported indirectly with the Feature Set data type) |
No |
No |
As a file |
Table |
No (But Table input is supported indirectly with the Record Set data type) |
No |
No |
As a file |
Raster |
Yes |
No |
No |
As a file |
Standard types (such as Long, Double, Boolean, Date, String) and Linear Unit (for example, "1000 meters") |
Yes |
Yes |
Yes |
Long, Double, String, Linear Unit: Yes Boolean, Date with workaround (calculate value) |
File (such as a .zip or .xml file) |
Yes |
Yes |
Yes |
Yes |
Layer (any type of layer; for example, Feature Layer, Raster Layer, Network Analyst Layer) |
Only those layers found in result map service or source map document |
Only those layers found in result map service or source map document |
Only those layers found in result map service or source map document |
No |
Input types for geoprocessing service (© by Esri) extended by SynerGIS
•Validation of inputs: Because there is no way to transport local Tool validation from the ArcToolbox to a GP Service or to have a generic client-side validation, it is useful to work with preconditions inside a model. To implement if-else-logic in a model, little script tools or the Calculate Value Tool can be used. The output of those tools should be long or boolean variables, providing false, zero or negative values for an unreached precondition and true or positive values for reached preconditions. If e.g. the sum of user specified values has to be 100 a Calculate Values Tool can be used.

Geoprocessing model with integrated input validation - model

Geoprocessing model with integrated input validation - Calculate Value tool
•Output data: Provide absolute, local paths for your result data. Result data has to be a model parameter. If your result is a manipulation of an input dataset and you provide an absolute path, no copy of your result will be saved in ArcGISJobs-Folder. Using the %Scratchworkspace% environment variable is useful for saving individual copies of GP Service results. They are stored in the ArcGISJobs Folder. Note that copies of GP Service results are stored in the specified “local data source” Folder (see chapter Configuring in WebOffice author).
•Supported output data types: According to the Esri online help (s. http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_dotnet_help/index.html#/na/009300000029000000/ for details) only certain output parameter data types are supported in the different clients for ArcGIS Server. In the following table the information under the grey header cells is provided by Esri. The information under the orange header cell about the supported output types for use in WebOffice 10 R3 was added by SynerGIS.
Output parameter data type |
Supported on ArcGIS Desktop clients? |
Supported on ArcGIS Explorer client? |
Supported on Web application clients? |
Supported in WebOffice 10R3? |
Feature Class |
Yes |
Yes |
Yes |
Yes |
Raster |
Yes |
No (Can only be displayed in the map through the use of a result map service) |
No (Can only be displayed in the map through the use of a result map service) |
No |
Table |
Yes |
No (Services that have a table data type as an output parameter will not be shown in the list of available tasks) |
Yes |
No (Support planned) |
Standard types (such as Long, Double, Boolean, Date, String) and Linear Unit (for example, "1000 meters") |
Yes (Viewed in the service result found in the Results tab of the ArcToolbox window) |
Yes (Viewed in the task result) |
Yes |
Yes if pushed to the Geoprocessing Messages |
File |
Yes |
Yes |
Yes |
No |
Output data (© by Esri) extended by SynerGIS
•Symbology: Provide a Layer File based on your input data stored in data directory (access rights).
•Publishing: Do not publish models via context menu of the ArcToolbox, properties have to be set:

Publish Toolbox
•Add New Service --> Geoprocessing Service
•Execution Mode: Asynchronous
Note: It is possible to choose the type of execution mode in the WebOffice 10 R3 project configuration as well. For details, please see chapter Geoprocessing.
•Tools exposed by: Toolbox (No publishing via Tool Layer Method or Result Map Service)
•Set Max Numbers of Records
•Show Messages if you want to prompt useful Error Messages

Geoprocessing service properties
•Enable the Web Access for debugging (Task Name and Configuration can be accessed via http://<server>/arcgis/rest/services/<service name>). Not recommended for production systems.

Geoprocessing service capabilities
•Pooling: Pooled with minimum 2 instances, provide useful timeouts.
•Before adding the GP Service to an application configuration test it in ArcGIS Desktop by adding the GP Service to the ArcToolbox and execute the Task.