A geoprocessing task is a geoprocessing tool running on a server and its execution and outputs are managed by the server. Each task is created from a single result in the Results window. When publishing a geoprocessing result, a geoprocessing task is created from the tool that created the result. The Service Editor lists the task in a geoprocessing service as illustrated below.
The Service Editor allows you to view and edit the geoprocessing tasks before publishing. You can edit the task properties, preview the task, and add and remove tasks.
Task properties
Each geoprocessing task has a Name and Description property as illustrated above. These properties are derived from the tool that created the result. To edit these properties, click the task in the left pane of the Service Editor and revise the Name and Description, if needed.
Note:
The modified name and description of the task applies only to the geoprocessing task; the display name and description of the tool is not modified.
Task parameter properties
A task has one or more input and output parameters. These task parameters come from the parameters of the tool that created the result.
To edit a task parameter, click the parameter in the left panel. The property page on the right shows the properties of the selected parameter. Each property page has a help link that opens a topic that explains all the different settings for the task parameter.
Each input task parameter has a Name, Description, Type, and Input mode.
Name and description
A meaningful name and description for the parameters helps your clients understand and provide appropriate values for the parameter. By default, the Service Editor copies the description of the parameter from the tool's item description.
Type
The parameter type defines whether the
client must supply a value for the task to execute successfully. In the Service Editor, you can only change optional parameters to required. To change a required parameter to an optional parameter, you'll need to exit the Service Editor, edit the properties of your tool, and run the tool again to create a new result.
Input mode
The Input mode of the task parameter defines how a client will provide values for the task parameter. The settings that you can choose vary based on the data type of the tool parameter; that is, the Input mode settings for raster input are a bit different then the settings for feature input. In most cases, there are three input mode choices you can make:
- User defined value: the client provides a value for the parameter.
- Choice list: the client is given a list of strings (the choice list) and must choose one or more of the strings from the choice list. Depending on the data type of the input, the strings in the choice list can be the names of layers or simple keyword options.
- Constant value: the task will use the value you supplied for the tool parameter when you created the result. Since the value is constant, the client can't change it, so it will not become a task parameter when the service is published. When a parameter is made a constant value, the Name and Description properties are disabled because it is no longer a task parameter.
These options, as well as other options that appear on a parameter property page, such as Default value, are discussed in detail in the links below.
These input mode options are discussed in greater detail in the following topics.
Topic | Notes |
---|---|
Parameter properties for Feature input. | |
Parameter properties for Raster input. | |
Parameter properties for Table Input. | |
Parameter properties for File input. | |
Properties for non-dataset data types: Boolean, Long, Double, Date, String, and Linear Unit parameters. | |
Some parameters are set to a constant value by the Service Editor due to the non-transportable nature of the parameter. | |
Properties for any output parameters. |
Adding a task
A geoprocessing service can contain more than one geoprocessing task. Click the Add Result button to add a new task.
Removing a task
To remove a geoprocessing task, right-click the task and select Remove. When you remove a task, the task is removed from the service—the corresponding geoprocessing result or its tools will not be deleted.
Previewing a task
Click the Preview button to show how the task dialog box will appear when used in ArcGIS for Desktop. Previewing a task helps you verify modifications you may have made to task parameters. If you have multiple tasks, select the task (or one of its parameters) before clicking the Preview button. You can preview your tasks as many times as you wish during publishing.