Authoring with ModelBuilder

Authoring and sharing a web tool or a geoprocessing service means creating a tool or workflow and defining the input and output parameters and the location of any data used.

ModelBuilder is used to create, edit, and manage geoprocessing models. Models are workflows that string together sequences of geoprocessing tools, passing the output of one tool into another tool as input. ModelBuilder can be thought of as a visual programming language for building workflows and authoring geoprocessing tools.

With an existing model with parameters that runs successfully in ArcGIS Pro, the model can be shared as a web tool on ArcGIS Enterprise or as geoprocessing service on a stand-alone ArcGIS Server without modification.

Create history items from models

Before a tool can be shared, it must first be run successfully. This ensures that a tool with errors in its logic is not published. To create a history item, a model must be run as a tool. A history item is not created when running a model in ModelBuilder.

Note:

In most cases, a model will have tool parameters. See an example of a model tool with parameters in A quick tour of authoring and sharing web tools.

Learn more about creating a model tool

Output data

When creating models, output paths can be written to almost any location. When the model tool is shared as a web tool, these output paths are updated to run on the server.

The memory workspace can be used to improve the performance of writing intermediate and output data. When writing data to the memory workspace, instead of writing output to disk, the tool writes output to the system's memory. This generally allows a web tool to run faster.

Learn more about writing geoprocessing output to memory

Caution:

Do not write output datasets to memory when planning to configure a service so that output data is drawn by a map image layer.

When choosing to view the web tool output as a map image layer, there are two services created on the server: the geoprocessing service and the map service. These two services run independently of each other. When the tool runs, the geoprocessing service runs first. The map service then runs to draw the output. Because of the run order, the resultant map service requires the geoprocessing service to write datasets to disk.

When using the output map image layer or a tool that must write its output to disk, there are variables that provide control over output locations. The inline variables, %scratchGDB% and %scratchFolder%, can be used in a model to direct output to a file geodatabase or a folder. These variable exist in ArcGIS Pro and as web tools and geoprocessing services.

Note:

When a model includes full paths to data on disk, the sharing process updates the output paths in the model to reflect one of these variables depending on the data output type. The sharing process always maintains a path written to memory.

Get started with ModelBuilder

If you are unfamiliar with ModelBuilder, the following table lists topics that will help you get started:

Help topicContent

What is ModelBuilder?

ModelBuilder vocabulary

These topics provide an introduction to ModelBuilder.

Create a model tool

This tutorial provides the basics of creating a tool in ModelBuilder. A model tool is a model that exposes variables as parameters.