Publishing Geoprocessing Services to Arc Server

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.


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:

 

  • Publish to ArcGIS Server: Right-click the resource (map document or toolbox) and click Publish to ArcGIS Server.
  • Add new service: Right-click a server and click Add New Service.

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

 

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:

  • A geoprocessing service
  • A geoprocessing service with a source map document
  • A geoprocessing service with a result map service

    *Note:

    If you are publishing a geoprocessing service with a source map document, you cannot use thePublish 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.


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

    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.
    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.
    11. Learn more about pooling and timeout options.
    12. Click Next.
    13. If desired, change how service instances run. Learn more about recycling and isolation.
    14. Click Next. This opens the summary panel. You can choose to start the service immediately or start it later.
    15. 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 Servicemethod described below.

    Add New Service

  • 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.
  • Enter a name for the service. The name should not contain spaces.
  • For Type, choose Geoprocessing Service.
  • Click Next.
    1. 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.

      1. Click Next.
      2. If desired, you can disable Web access. Enabling Web access means that clients can connect to your service via displayed URL.
      3. Click Next.
      4. If needed, you can change pooling and timeout options.
      5. Learn more about pooling and timeout options
      6. Click Next.
      7. If desired, change how service instances run. Learn more about recycling and isolation.
      8. Click Next. This opens the summary panel. You can choose to start the service immediately or start it later.
      9. 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.


          • 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:


        • 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:

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


          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 execution, the result map service will be set toNone.

          • 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:


          • Remove the existing tool layer.
          • Drag the tool into the ArcMap table of contents 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.

Advertisements

About berrymanchris

I recently graduated from University of Wisconsin - Whitewater and I work as a Senior Analyst at PANGEA Studios at the University in Whitewater, WI.

Posted on August 1, 2012, in Blog. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s