Publishing geoprocessing services

To publish any GIS resources, including geoprocessing services, to ArcGIS Server, you must have administrator access to the server. Your server administrator—the person in charge of setting up and maintaining accounts for your ArcGIS Server installation—is responsible for setting up an account for you and granting you administrator privileges.

Administrator access

Learn more about connecting to ArcGIS Server

Two methods

There are two primary ways to publish a geoprocessing service to ArcGIS Server from ArcGIS Desktop:

The first method creates the service with the default properties, while the second allows you to configure all properties.

Two ways to publish

You can always change service properties after publishing as follows:

  1. In ArcCatalog, navigate to the server.
  2. Right-click the service and click Stop.
  3. Right-click the service and click Service Properties.
  4. Change properties.
  5. Right-click the service and click Start.

Three service configurations

There are three ways to configure your geoprocessing service:

Three configurations
NoteNote:

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.

Geoprocessing service

Publish to ArcGIS Server

In the ArcToolbox or Catalog window, right-click the toolbox and choose Publish to ArcGIS Server. This opens the Publish to ArcGIS Server wizard.

Publish to ArcGIS Server wizard
  • 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. After clicking Finish, the geoprocessing service is created.

    Summary panel

Add New Service

  1. In the Catalog window in ArcMap or ArcCatalog, right-click an ArcGIS Server instance and choose Add New Service. This opens the Add GIS Service wizard.
  2. Enter a name for the service. The name should not contain spaces.
  3. For Type, choose Geoprocessing Service.
  4. Click Next.
  5. Enter or browse to the path of the toolbox.
  6. Other options on this panel are discussed in the Service properties section below.

    Add New Service panel two

  7. Click Next.
  8. If desired, you can disable Web access. Enabling Web access means that clients can connect to your service via displayed URL.
  9. Click Next.
  10. If needed, you can change pooling and timeout options.

    Learn more about pooling and timeout options.

  11. Click Next.
  12. If desired, change how service instances run. Learn more about recycling and isolation.
  13. Click Next. This opens the summary panel. You can choose to start the service immediately or start it later.
  14. Click Finish.

Geoprocessing service with a source map document

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

  1. In the Catalog window in ArcMap or ArcCatalog, right-click an ArcGIS Server instance and choose Add New Service. This opens the Add GIS Service wizard.
  2. Enter a name for the service. The name should not contain spaces.
  3. For Type, choose Geoprocessing Service.
  4. Click Next.
  5. Since the tools to be exposed by the geoprocessing service are tool layers in a map document, enable the map option and enter or browse to the path of the map document.
    Geoprocessing service with source map document
    Other options on this panel are discussed in the Changing service properties section below.
  6. Click Next.
  7. If desired, you can disable Web access. Enabling Web access means that clients can connect to your service via displayed URL.
  8. Click Next.
  9. If needed, you can change pooling and timeout options.

    Learn more about pooling and timeout options

  10. Click Next.
  11. If desired, change how service instances run. Learn more about recycling and isolation.
  12. Click Next. This opens the summary panel. You can choose to start the service immediately or start it later.
  13. Click Finish.

Geoprocessing service with result map service

Publishing to ArcGIS Server

  1. In the Catalog window in ArcMap or ArcCatalog, right-click the map document and choose Publish to ArcGIS Server. This opens the Publish to ArcGIS Server wizard.
    Publish to ArcGIS Server wizard
    • 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.
  2. Click Next. This opens the capabilities panel, as illustrated below.

    Capabilities 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.

  3. Click Next.
  4. 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:

  • Add the map service.
  • Then add the geoprocessing service with the same name as the map service, 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.

Service properties

There are four properties particular to geoprocessing services:

  1. Execution type: Synchronous versus Asynchronous
  2. The jobs and output directory
  3. Maximum number of records
  4. Show messages
Geoprocessing service parameters

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.

NoteNote:
  • A geoprocessing service with a result map service cannot be synchronous. If you change a geoprocessing service to synchronous execution, the result map service will be set to None.
  • You should choose synchronous only for tasks that execute quickly and will not be subject to any timeouts set by the ArcGIS service or your Internet service.

    Learn more about timeouts

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 0 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 processes write messages during execution. These messages include warnings, errors, and other information. The messages can contain paths to data residing on your server or local area network, and you may not want the paths to this data to be viewed by users. You can hide all warning, error, and informational messages by unchecking the Show Messages property.

Changing service properties

These four geoprocessing service properties can be modified as follows:

  1. Navigate to the server.
  2. Right-click the server and choose Stop to stop the geoprocessing service.
  3. Right-click the service and click Service Properties.
  4. Click the Parameters tab.
  5. Change the desired parameters and click OK.
  6. Right-click the geoprocessing service and click Start.

Modifying a published service

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, follow these steps:

  1. In the Catalog window, navigate to the server containing your service.
  2. Right-click the service and click Restart.

Restarting is the same as stopping the service, 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:

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

Related Topics


3/6/2013