Authoring a web tool and a geoprocessing service involves both an authoring and sharing process. The authoring process starts with the creation of a model or Python script tool in ArcGIS Pro. Once you've authored and successfully run your tool, you can share it to an ArcGIS Enterprise portal as a web tool, or a geoprocessing service on a stand-alone server running ArcGIS Server. Certain data, tool parameters, and sharing permissions must be considered when authoring and sharing. Some of these considerations are outlined in the following example and relevant sections in this topic. The workflow involves the following processes:
- Building a script or model using tools from the toolbox to construct your workflow
- Gathering the datasets your tool requires and make them available in a geodatabase or add them to the map in your project
- Running the tool to create a successful entry in the geoprocessing history
- Setting the symbology of output datasets in your map if necessary
- Sharing the history item as a web tool or a geoprocessing service, while setting tool properties for the tool and the service
Example with a ModelBuilder tool
The following model tool is a collection of tools that examine how many people might be impacted by a pipeline leak. The workflow finds intersection points between the pipeline and river and performs a downstream trace to identify how many people could be impacted. This model is set up with project data and parameters and is published as a web tool, in which an analyst or the general public could change the proposed pipeline route to see how a leak could impact the population downstream. The web tool results show the point where the pipeline crosses the river and the summary of the impacted population.

Tool design
Tools have input and output parameters. These parameters allow you to supply different values each time the tool is run, and in turn, the tool will produce different analysis. In addition to input and output parameters, tools generally have project data and intermediate data. These are datasets that the user running the tool generally has no control over. In a model, the input parameters are marked with the letter P. When the model is run as a tool, any input with a P is available on the tool dialog box for you to set a value to be used when running the tool. From the pipeline model, you can specify the pipeline path and a distance to buffer when performing the downstream trace. When someone uses this tool, the pipeline location and buffer size change to show the number of people ultimately impacted by the pipeline. The pipeline intersections and trace line in this example are intermediate datasets that the model tool produces. These intermediate datasets are not required by the user running the tool, and they're not returned as a result. When this model is shared, the underlying geoprocessing service handles where to write the intermediate data and ultimately cleans it up when it is no longer needed.

The output parameter allows the tool to return a result to the user running the tool. In ArcGIS Pro, output parameters are important because these datasets are automatically added to the map. A tool without an output parameter would generate output but would not automatically display this information. Web tools work in much the same way; one or more output parameters are required to return the result to the end user. In the pipeline model, two output parameters exist: impact areas population showing the downstream buffer locations and the population summary table with the summary of the entire impacted population. Note that the Impact areas population parameter is both intermediate and output data. This parameter is intermediate because it is required by the Summary Statistics tool, but it has been defined as a model parameter (P) and will have this result returned to the client when the tool successfully finishes.

Tip:
The same principles of tool input and output parameters, project data, and intermediate data apply to creating script tools .
Document the tool
You need to provide documentation for your web tool so the tool can be discovered, understood, and used by others. Good documentation starts with the original tool. You can supply the same type of metadata to your model or script tool as a system tool.
Run the tool
After the tool has been authored, you must ensure that it runs successfully. Running the tool creates an entry in the geoprocessing history. A tool that has failed to run cannot be shared.
Note:
Running a model in ModelBuilder does not produce an entry in the Geoprocessing History list. Model tools must be run as a tool in the Geoprocessing pane.
Share your web tool to ArcGIS Enterprise
Before sharing your web tool, ensure you have signed in to a portal with sufficient publishing privileges. To share the web tool, click Analysis > History to open the History pane. Then right-click an item to share, and select Share As. To share as a new web tool, select Share Web Tool to open the Share As Web Tool pane. To overwrite an existing tool, select Overwrite Web Tool to open a pane with all the existing web tools published in My Content.
Select the tool to overwrite and click OK to open the Overwrite Web Tool pane. The processes of prepublished web tool configurations are the same for both Share Web Tool and Overwrite Web Tool, as shown below.
Note:
Overwrite a web tool is not reversible. Once the overwrite operation is finished, there is no option to revert to the previous web tool.
Alternatively, click Share > Web Tool to choose either Share Web Tool or Overwrite Web Tool. If you choose the Share Web Tool option, select an item from a tool sharing pane with all the successful running items.

If you choose the Overwrite Web Tool option, select an item to overwrite from the pane with all the existing web tools you published in My Content. Then select an item from the pane with all the successful running items to overwrite with. The overwrite steps in this workflow are reversed when you choose Analysis > History.
Analyze
Analyzing a potential web tool ensures that you can successfully publish the tool to your portal. Additionally, warning messages about data may appear, and you can take action if you deem necessary. The spill assessment tool already has the data store set up, tool documented, and supported tools included that work in a web tool, so no such warning or messages will appear.
Publish
After the web tool properties have been set and you've resolved any analyzer errors, publish the web tool to your portal. Depending on how much data needs to be consolidated and sent to the server, this process could take a few minutes.
Share a geoprocessing service to a stand-alone server running ArcGIS Server
A geoprocessing service can only be shared to a stand-alone server through ArcGIS Server Connection with an administrator connection type. To add the server connection with the right type, follow the steps below.
Add an ArcGIS server connection
There are two ways to add a connection using New ArcGIS Server Connection.
- From ArcGIS Pro, on the Catalog tab under the Project pane, right-click anywhere in the pane and select New ArcGIS Server Connection to launch the connection window as shown below.
- On the Insert ribbon tab, choose Connection and choose New ArcGIS Server to launch the connection window as shown below.

Provide the Server URL path and administrator login credentials. A new server connection item with the .ags extension is added under Servers in the Project pane.
Configure ArcGIS server connection type
The initial connection created in the previous step uses Publisher Connection as the connection type. To share a geoprocessing service, an administrator connection is required. To modify the connection type, right-click the server connection item and select Properties to launch the ArcGIS Server Connection Properties window. Change the type from Publisher Connection to Administrator Connection.
Publish a geoprocessing service
If the connection type of the server connection is administrator, right-click the server connection and choose Publish. Use the Geoprocessing Service option to launch the Selected History Item(s) window. Select the item from the list to launch the Publish Geoprocessing Service window. Examine the properties of the General, Configuration, and Content panes before publishing the service.
Analyze
Analyzing a potential geoprocessing service ensures that you can successfully publish the tool. Additionally, warning messages about data may appear, and you can take action if you deem necessary. The spill assessment tool already has the data store set up, tool documented, and supported tools included that work in a web tool, so no such warning or messages will appear.
Publish
After the geoprocessing service properties have been set and you've resolved any analyzer errors, publish the service to your server. Depending on how much data needs to be consolidated and sent to the server, this process could take a few minutes.
Overwrite a geoprocessing service
If the connection type of the server connection is administrator, you can overwrite a published geoprocessing service by right-clicking an existing service from ArcGIS Server Connection and select Overwrite to open the Select Tool to Publish pane. The pane lists all the analysis result items you have run in ArcGIS Pro. Select the item you want to overwrite with and click OK to open the Overwrite Geoprocessing Service pane. Configure the service properties you want to update in the pane, and click Publish to overwrite.
Data, configuration, and parameter settings
In the sharing pane, you can configure the tool you will publish.
Copy, reference, or use URL data
Most web tools and geoprocessing services will have input or project data. When sharing the spill assessment model as a web tool, you must examine whether any of the input or project data is None-URL Data or URL Data. You can copy None-URL data to the server and make a static copy of the data the service will use, or skip copying the data but create a reference that the service can access. URL data provides the input from a service URL.
When sharing the spill assessment model as a web tool, the project data includes river and population datasets that are static, which are infrequently updated. Copying this project data to the server is a solution. The publishing process collects and converts the data, if needed, into file geodatabase feature classes where they will be extracted on the server and used by the service. In this case, check the Copy all data check box under the None-URL Data heading.
Consider whether the analysis method was modified slightly and the user did not propose their own pipeline. The alternative pipeline proposals came through another process, and the user provided different inputs to the tool. In this case, the proposed pipeline becomes project data. Consequently, it would be advisable to include this dataset in an enterprise geodatabase or folder with a Universal Naming Convention (UNC) path that the server can access and have the tool reference the dataset. When publishing, check the Reference registered data check box under the None-URL Data heading and set a reference to the data using the ArcGIS Server data store. The publishing process maintains a reference to the database or folder instead of making a static copy. At a later time, a project analyst could update the data in the enterprise geodatabase or folder, and the web tool would perform analysis against the newest pipeline proposal.
Another option is to provide a feature dataset that is neither from the user's pipeline nor is frequently updated to provide the input from a web feature layer (feature service) or map image layer (map service) with a feature sublayer. When publishing, uncheck the Convert feature layer check box to preserve the URL data during the process. If this check box is checked, the data will be copied to the server during publishing and the referenced data used in the tool is static on the server. If your input is from a raster dataset, provide the URL data with a web imagery layer (image service). In this case, you do not need to check the Convert feature layer check box since the URL is always maintained during publishing.

Set the web tool and geoprocessing service properties
The spill assessment tool outputs features and a table. The amount of data that this tool generates and returns is limited in size, so the web tool will be set up as an asynchronous service without a result map service. A default setting of 1000 max records will be sufficient. Set Message Level to Error to ensure that only messages relating to a possible tool failure are returned. When the web tool runs successfully, normal processing messages will not be returned to the end user.

A web tool is available in My Content. You can share your tool with your organization, everyone, or select groups. The spill assessment tool allows you to share to specific stakeholders in the organization who need to perform pipeline analysis. Selecting the appropriate groups will allow those users to quickly find and use the tool.

Use the web tool or geoprocessing service
Web tools on ArcGIS Enterprise can be found and opened from the Portal section of the Catalog pane.
Geoprocessing services on a stand-alone ArcGIS Server can be found and opened from ArcGIS Server Connection in the Catalog pane.
In addition to running the tool in ArcGIS Pro, the geoprocessing service can be used in a Python script or web app.