Configuring tasks

You will define the GIS functionality in your web applications by selecting and configuring tasks. Tasks encapsulate specific functionality for your application, such as querying or editing. Web Applications Manager includes the following set of tasks:

You can also use the developer libraries included with the ArcGIS Web Applications setup to create custom tasks. Refer to the developer help for more instructions.

When you create or edit a web application in Web Applications Manager, a wizard panel is included specifically for the purpose of adding and editing tasks. Click the Add Task link on this panel to select the task you want.

The Editor and Geoprocessing tasks are valid only with ArcGIS Server services. Other tasks can work with multiple types of services. For example, the Search Attributes task can search the attributes of layers from either ArcGIS Server or ArcIMS. Some tasks require that you define supporting services for them to run. For example, the Find Address task requires you to select an existing ArcGIS Server geocoding service or ArcIMS service enabled for geocoding.

For each task that you add to your application, you can customize the specific look and behavior of the task. In many cases, this involves selecting the layers and fields that you want the task to work with. If you want to see field aliases appear in the task, you can configure this in the layer properties of the source map document or in Web Applications Manager.

For each task that you add to your application, Web Applications Manager lets you customize the specific look and behavior of the task.

The following sections describe the tasks in detail.

Editor task

The Editor task provides a suite of tools for web-based editing of features and attributes in ArcSDE geodatabases. Shapefiles, personal geodatabase layers, and file geodatabase layers are not editable; however, you can include these types of layers in the map service.

When you add the Editor task to an application, users of that application will be able to access various tools to edit data and save their edits. The Editor task includes tools for creating, moving, copying, splitting, merging, and deleting features. Additionally, you can view and edit the locations of feature vertices. When you configure the Editor task for your application, you can select which versions and layers users will be able to edit. When editing, users of your application can adjust the snapping and selection options.

Editing in the web environment has a slightly different feel from desktop editing, and you may want to use a practice dataset to accustom yourself to the available tools and their behavior. For instance, when editing with snapping enabled, you will not see the snapping occur on the screen until after you place the vertex. The placed vertex will be snapped to the appropriate vertex, edge, or end.

You cannot use the Editor task to create multipoint features. However, you can move, copy, or delete existing multipoint features with the Editor task. You can also use the Editor task to edit the attributes of existing multipoint features.

Only one Editor task can be configured per application using Web Applications Manager. However, the Editor task can be configured to work with all the editable resources that have been added to the web application.

The Editor task configuration page contains the following items:

General tab

  • Configuration Name: Enter a unique descriptive name for the editing configuration in this text input box. When the Editor task is executed, this descriptive name is used when listing the available configurations.
  • Editable Layers: This column lists the editable layers in the selected workspace. Choose the layers you want to edit.
  • Editable Versions: This column lists the available versions if the selected workspace is versioned.

Settings tab

  • In the Edits Allowed section, check or uncheck the boxes next to each option listed to allow or disallow edits:

    • Add Features: New features can be added if this box is checked.
    • Edit Attributes: The fields associated with a feature can be edited if this box is checked.
    • Edit Features: The geometry of features can be edited if this box is checked.

  • Tolerance: Enter a tolerance value to apply to a point on the map selected via a mouse click. The larger the tolerance value, the larger the selection area. This is helpful when selecting feature components like vertices. A value that is too small will make it hard for users to select a vertex. A value that is too large can result in the selection of other features located near the vertex to be selected.
  • Snapping Tolerance: The tolerance in pixels used to determine if a moved vertex should snap to an existing vertex, edge, or end.
  • Highlight Color: The color used for features that have been selected for editing. The color is specified by three numbers between 0 and 255 that represent red, green, and blue values in that order. The default color is yellow.
  • Vertices Color: The color used for newly added vertices. The color is specified by three numbers between 0 and 255 that represent red, green, and blue values in that order. The default color is red.
  • Snapping Rules: When working with a map that contains small feature components, it can become difficult to select a feature with a click. When enabled, the snapping feature selects the feature closest to the location of the click. In this section, check or uncheck the boxes next to each option to enable or disable snapping. The available options are Vertex, Edge, and End. An edge is a line that forms a boundary for a feature. An end is a vertex that has only one edge connecting to it.

Advanced tab

The Advanced tab contains autoreconciliation options to resolve conflicts between edits made by two different users. The Editor task autoreconciles conflicts based on two important settings:

  • Are conflicts defined by object (row) or by attribute (column)? If two users edit different attributes of the same feature, is this considered a conflict? If you've chosen to define conflicts by object (row), this situation is treated as a conflict and only one of the users' edits can be applied. However, if you've chosen to define conflicts by attribute (column), both edits may be applied. In this case, a conflict would only occur if the two users edited the same attribute.
  • Are conflicts resolved in favor of the database or the edit session? If someone else edits the same feature as you and saves his or her edits first, what happens when you save? If you've chosen to resolve conflicts in favor of the database, your edits will not be applied. This setting can be thought of as "first in wins." If you've chosen to resolve conflicts in favor of the edit session, your changes will overwrite the other user's edits. Resolving conflicts in favor of the edit version can be thought of as "last in wins."

Once saved, all available editing configurations are listed as shown in the screen shot below. Click the Edit icon to update an existing editing configuration or click the Delete icon to remove it from the Editor task.

Find Address task

The Find Address task prompts the user for an address, then displays the resulting address on the map. It can be configured with an ArcGIS Server geocoding service or an ArcIMS service with geocoding enabled.

ArcGIS services

The Find Address task is based on an address locator service. Once you add a Find Address task to your Current Tasks list, you need to specify the geocoding service using the Supporting Services link in the right panel.

The text you see in the user interface for the Find Address task comes from the geocoding service's locator file. You can change this text by opening the locator (.loc) in a text file before publishing it to the server.

ArcIMS services

If you are using an ArcIMS service, you must select a service that supports geocoding, then configure the task.

  1. Click the Add Task link, choose Find Address, then click Add.
  2. In the left panel, choose the task, then click the Supporting Services link in the right panel to specify your service. Any service that has a geocode extension is listed.
  3. Choose a Find Address service and click Add.
  4. After selecting the geocoding service, specify a name for this task. This is the name that users will see in the web mapping application for this task.
  5. Enter values in the Button Text and Help Tip text boxes that are displayed when the task is run.
  6. Click the Results tab to configure how results will appear on the map.
  7. By default, MapTips are enabled, which means geocoded address will appear on the map with an interactive display. If you want to turn this feature off, uncheck Show Map Tips.
  8. If you want to use a special symbol for the results of this task, select special symbols. If no symbols are specified, the defaults for the layer will be used.
  9. When finished, click Apply.

Geoprocessing task

With the Geoprocessing task, you can make use of services that run ArcGIS geoprocessing jobs on the server and send the results back to the client application. The geoprocessing task requires an ArcGIS Server geoprocessing service, which you specify using the Supporting Services link. Geoprocessing services are based on models and can be published from either a toolbox or a map document containing a tool layer. Refer to the geoprocessing service section of the help for more information on how to create one.

Task configuration

To configure a Geoprocessing task for a web application, follow these steps:

  1. Click the Add Task link, select Geoprocessing from the list of available tasks, then click Add.
  2. In the left panel, choose the task, then click the Supporting Services link in the right panel to specify your service. If no services are listed, click Add GIS Server to add the ArcGIS Server that is hosting your geoprocessing service.
  3. Choose a geoprocessing service and click Add.
  4. Choose the desired geoprocessing tool from the service.
  5. You can check Show Job Messages if you want to display geoprocessing messages during the execution of the task.
  6. Click the General tab. Accept the default or enter a name for the task in the Task Name field. This will be the label for the task in the web application.
  7. Accept the default value or enter text in the Run Button Text field.
  8. Click Apply to finish.

Runtime experience

An end user who opens a geoprocessing task will see a palette of tools that allow specification of the model parameters. For example, if the underlying model requires a line feature class as input, tools will be available in the task for drawing lines. When the user has specified all the parameters, he or she can then execute the task. As the job runs, the end user can see any messages from the task in the Results panel of the web application. If the geoprocessing service has an associated map service that was added to the application at design time, the results will also be visible on the map.

Geoprocessing services have a property that determines whether they run synchronously or asynchronously. If the service is configured to run asynchronously, the user has the option of viewing the results of the task even after closing the web application. If the task had not finished executing before the user closed the browser, and if the user has cookies enabled, the results will be retrieved automatically when the user next visits the web application. Otherwise, the user can click the Save link on the results node, save result information to a file, and use this file to check task results in another session. This link will only be available if the VirtualDirectory property of the Geoprocessing task is set. If the service is configured to run synchronously, there will be no Save link available and the user will have to keep the session open until the results are available.

Print task

The Print task allows the user to print the map along with any task results desired. When invoked from the web application, the task displays a printing dialog box that allows the user to enter a title for the map, set the map size, and choose any task results to print under the map. Clicking the button to create the printed page opens a new browser window with a preview of the printed page. The user can then print to any available printer.

The Print task doesn't require any configuration in Web Applications Manager unless you want to change the default settings that Web Applications Manager provides. For example, you can change the default map title and select the legend items that you want to print.

To add and configure the Print task in Web Applications Manager, follow these guidelines:

When setting the page size and quality, keep in mind that the GIS server imposes limits on the maximum image size it can return. For example, ArcGIS Server map services, by default, restrict the image size to a maximum of 2048 x 2048 pixels. This means that a 10-inch-square map with a quality of 200 dpi is 2000 x 2000 pixels. If the Print task map request exceeds the limits of the GIS server, the particular service does not print.

Query Attributes task

The Query Attributes task helps users select or view certain data on the map, based on that data's attributes. A Query Attributes task creates a single query on one map layer. However, the query can have compound criteria. For example, you can define a query on a cities layer that selects cities with a population greater than a value entered by the user and with a name that begins with a value entered by the user.

Additionally, the Query Attributes task supports relates and stand-alone tables. Relates simply define a relationship between two tables without appending the associated data in each table. In many cases, the relates point toward stand-alone tables, which lack geometry but often contain valuable attribute information. For example, if you published a map service that contained relates between city parcels and a stand-alone table of parcel owners, you could use the Query Attributes task to display the owners and location of the parcel in the query results.

When you configure the Query Attributes task, you create an easy-to-understand form that will guide the user through the process of making the query. This way, users of your application will not have to know the details about the dataset, nor will they have to construct a Structured Query Language (SQL) statement, to query the data.

The following instructions describe the process to add a Query Attributes task to a web application:

  1. When creating or editing a web application in Web Applications Manager, in the Tasks step, use the Add Task link to add a Query Attributes task to the list of tasks. Click the Query Attributes task on the left panel to display the configuration page for it on the right panel.
  2. On the General tab, you can change the wording that users will see when they run your task. You can change the Task Name, Button Text, and Help Tip values.
  3. Use the Settings tab to build your query. After selecting a map service and a layer to query, click the Add button to add a condition to your query. You can add multiple conditions to create a compound query. When configuring the task with multiple query expressions, the expressions are joined using the AND operator.
  4. Use the Label Text field to describe the Query Attributes task so that the users of the web mapping application can understand what the task does.
  5. Choose the desired field and comparison operator for the query using the drop-down menus.
  6. Use the Value field to specify a default query criteria if desired. You can also limit the values that will be passed to the query by using the Select from List option.
  7. When finished configuring the parameters for the Query Attributes task, click Apply.

Search Attributes task

The Search Attributes task allows a user to enter some text that will be used to search the attributes of the layers on the map. This kind of search is similar to the simple web search that sites like Yahoo! and Google provide. The user can then select, zoom to, or pan to any of these features.

Additionally, the Search Attributes task supports relates and stand-alone tables. Relates simply define a relationship between two tables without appending the associated data in each table. In many cases, the relates point toward stand-alone tables, which lack geometry but often contain valuable attribute information. For example, if you published a map service that contained relates between city parcels and a stand-alone table of parcel owners, you could utilize the Search Attributes task to display the owners and location of the parcel in the search results.

To configure the Search Attributes task, you'll need to specify the display settings, the search fields, and how you want the results to appear.

  1. When creating or editing a web application in Web Applications Manager, in the Tasks step, use the Add Task link to add a Search Attributes task to the list of tasks. Click the Search Attributes task on the left panel to display the configuration page for it on the right panel.
  2. On the General tab, you can change the wording that users will see when they run the Search Attributes task. You can change the following:
    • The name of the task. This name appears along the top bar of the web mapping application.
    • The text of the button users will click to execute the task.
    • The label text, which appears next to the search text box. You can phrase the label text any way you want, such as "Search for rivers" or "Enter the last name of a parcel owner."
    • A help tip that will display when a user pauses the mouse pointer over the task.
  3. Use the Settings tab to determine which fields and layers in your map will be searchable. A list of the layers and fields in your map appears on the left. Choose which fields you want to be searchable and click the right arrow ( > ) button to move them to the list on the right.
  4. The best fields for the Search Attributes task are usually nominal fields where most records have a unique value, for example, the name of the feature. When working with ordinal, interval, or ratio fields—for example, the average temperature or the cost of a feature—consider using the Query Attributes task instead.
  5. Use the Results tab to configure how task results will appear.
    • You have the option to limit the number of results that are returned from a search. This can prevent the server from becoming unavailable if a search is made that would return an unreasonably large number of records.
    • If you want your task to return a large number of results, be aware that ArcGIS Server map services limit the number of records returned by a query to 1,000. To change this default behavior, you need to manually edit the configuration file and change the MaxRecordCount property.
    • You can disable the default behaviors of grouping the results by layer and showing the attributes of the records returned by the search. You may want to test different settings to find which appearance best meets your needs.
    • If you choose to enable MapTips, users can click result features to see an informational pop-up window. Result features will also be highlighted when users pause the pointer over them.
    • You can change how the results appear on the Results panel and in MapTips by choosing Custom formatting. When you do this, additional tabs appear that allow you to change the color of the result features, the information to be included, and the text format.
10/19/2012