NOTE: If you are publishing a geoprocessing service with a source map document, you cannot use the Publish to ArcGIS Server method. Instead, use the Add new service method.
Publish to ArcGIS Server
In ArcCatalog or ArcToolbox, right-click the toolbox and choose Publish to ArcGIS Server. This opens the Publish to ArcGIS Server wizard, as illustrated below.
- The Service Name should not contain spaces.
- The wizard allows you to create folders and place services in a particular folder. For example, you might have a folder containing services for a particular study area, or a folder containing services by analysis type. While there is no restriction on the number of folders, you cannot create a folder within a folder.
- The next panel of the wizard contains a summary, as illustrated below. After clicking Finish, the geoprocessing service is created.
Add New Service
- In ArcCatalog, right-click an ArcGIS Server and choose Add New Service, as illustrated above. This opens the Add New Service wizard.
- Enter a name for the service. The name should not contain spaces.
- For Type, choose Geoprocessing Service.
- Click Next.
- Enter the name of the toolbox, as illustrated below.
- Other options on this panel are discussed in the Service properties section below.
- Click Next.
- If desired, you can disable Web access. Enabling Web access means that clients can connect to your service via a displayed URL.
- Click Next.
- If needed, you can change pooling and time–out options.
Learn more about pooling and timeout options.
- Click Next.
- If desired, change how service instances run.
Learn more about isolation and recycling options.
- Click Next. This opens the summary panel. You can choose to start the service immediately or start it later.
- Click Finish.
Publishing to ArcGIS Server
You cannot use this method to publish a geoprocessing service with a source map document. Instead, use the Add New Service method described below.
Add New Service
- In ArcCatalog, right-click an ArcGIS Server and choose Add New Service, as illustrated above. This opens the Add New Service wizard.
- Enter a name for the service. The name should not contain spaces.
- For Type, choose Geoprocessing Service.
- Click Next.
- Since the tools to be exposed by the geoprocessing service (the tasks) are tool layers in a map document, enable the map option and enter the name of the map document, as illustrated below.
Other options on this panel are discussed in the Service properties section below.
- Click Next.
- If desired, you can disable Web access. Enabling Web access means that clients can connect to your service via a displayed URL.
- Click Next.
- If needed, you can change pooling and time-out options.
Learn more about pooling and time-out options.
- Click Next.
- If desired, change how service instances run.
Learn more about isolation and recycling options.
- Click Next. This opens the summary panel. You can choose to start the service immediately or start it later.
- Click Finish.
Publishing to ArcGIS Server
- In ArcCatalog, right-click the map document and choose Publish to ArcGIS Server. This opens the Publish to ArcGIS Server wizard, as illustrated below.
- The Service Name should not contain spaces.
- The wizard allows you to create folders and place services in a particular folder. For example, you might have a folder containing services for a particular study area, or a folder containing services by analysis type. While there is no restriction on the number of folders, you cannot create a folder within a folder.
- Click Next. This opens the capabilities panel, as illustrated below.
Since you are publishing a map document, the Mapping capability is always enabled—you cannot disable it. Since the map document contains tool layers, the Geoprocessing capability is enabled by default. Because you want to publish a geoprocessing service with a result map service, both Mapping and Geoprocessing must be enabled. All other capabilities are optional.
- Click Next.
- The next panel of the wizard contains a summary. After clicking Finish, both the geoprocessing service and the result map service are created.
Add New Service
Using the Add New Service method, you can create a geoprocessing service with a result map service by
- Adding the map service, then
- Adding the geoprocessing service with the same name as the map service, then setting the result map service to the previously added map service
Although it is possible to create the services in this manner, it is far easier (and less prone to error) to right-click the map document and click Publish to ArcGIS Server, as described above.
There are four parameters particular to geoprocessing services:
- Execution type—synchronous versus a synchronous
- The jobs and output directory
- Maximum number of records
- Show messages
These parameters can be modified as follows:
- Navigate to the server.
- Right-click and choose Stop to stop the geoprocessing service.
- Right-click the service and click Service Properties.
- Click the Parameters tab, as shown below.
- Change the desired parameters and click OK.
- Right-click the geoprocessing service and click Start.
Execution type
Synchronous means that the client waits until the server has finished executing the task. Asynchronous means that the client is free to do other work while the server executes the task.
NOTE: A geoprocessing service with a result map service cannot be synchronous.
If you change a geoprocessing service to synchronous, the result map service will be set to None.
NOTE: You should choose synchronous only for tasks that execute quickly and will not be subject to any time-outs set by the ArcGIS service or your Internet service.
Learn more about time–outs.
Jobs and output directory
The jobs directory is where ArcGIS Server creates a scratch workspace for your tools. The output directory is where result map service images are created.
Learn more about managing the jobs directory.
Maximum Number of Records Returned by Server
Clients such as ArcGIS Desktop allow users to copy data from the server to their local machine. The number you enter is the maximum number of records or features that can be transferred from the server to the client. A value of zero means no records can be transferred. Be aware that transferring a large number of records can clog the network.
Copying data from the server is allowed even if there is a result map service that draws the data.
Show Messages
Geoprocessing models write messages during the execution of model processes. These messages include warnings, errors, and informational messages. These messages can contain pathnames to data residing on your server or local area network, and you may not want the pathnames to these data to be viewed by users. You can hide these messages by unchecking the Show Messages parameter. When you uncheck Show Messages, all messages are hidden, including warnings and errors.
After publishing your service, you may need to make changes to your model or script. After making changes, you need to restart the service—it is not necessary to delete and republish the service. To restart a service
- In ArcCatalog, navigate to the server containing your service.
- Right-click the service and click Restart.
Restarting is the same as stopping the service and then starting the service.
The only time you need to delete and republish a service is when you want to change the name of the service.
If you are using a tool layer to define tasks in your service and you change any of the parameters of the corresponding model or script, you should re-create the tool layer, as follows:
- Remove the existing tool layer.
- Drag and drop the tool to create a new tool layer.
- Right-click the tool layer, click Open, and run the tool.
- Save the map document.
Changes you make to your tool or tool layer do not take effect until you restart the service. (Note that services have a recycling schedule for automatically restarting services. By default, restarting occurs every 24 hours at midnight. If you make changes but do not restart the service, the changes will be applied when the service is recycled.)
Learn more about starting, stopping, and pausing services.