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. Manager includes the following set of tasks that initially populates the list of available tasks:

You can also use the developer libraries included with the Web ADF to create custom tasks. See the Developer Help for more instructions.

Some tasks require that you define supporting services in order for them to run. For example, the Find Address task requires you to select an existing ArcGIS Server geocoding service, an ArcIMS service enabled for geocoding, or an ArcWeb Service that can geocode. You can select these services in the Supporting Resources tab.

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

The following sections describe the available tasks in more detail.

Editor task

The Editor task provides a suite of tools for Web-based editing of features in a geodatabase. This task requires an ArcGIS Server map service that contains atleast one layer from a versioned or non-versioned geodatabase. If the geodatabase layer/feature class is versioned, a non-pooled ArcGIS Server map service is required. If the geodatabase feature class is non-versioned, the editor task can use either a pooled or non-pooled ArcGIS Server map service.

When you add the editor task to an application, users can use its 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.

When configuring an editing task for your application, you'll see a 3-tabbed user interface.

Click the 'General' tab:

  1. Give a name to the task (optional). This is the label that will be displayed in the Web application's 'Task' category.
  2. Select the editable layers and versions that will be available to your application.

Click the 'Settings' tab:

  1. Determine the types of editing tasks that will be allowed within your application: Adding Features, Editing Features,  Attribute Editing.
  2. Specify edit tolerance, snapping tolerance, highlight and verticie colors, and snapping rules for each editable layer.

Click the 'Advanced' tab:

  1. Here, determine the reconciliation policy for the edits in the application.
  2. When all configuration settings are complete, you must click the 'Apply' button to save the configuration

 

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 geocode service, an ArcIMS service with geocoding enabled, or ArcWeb Services.

ArcGIS Services

The Find Address task is based on a locator. Once you add a Find Address task to your Current Tasks list, you need to specify the locator using the Supporting Services tab.

The text you see in the user interface for the Find Address task comes from the locator itself. You can change this text by opening the locator (.loc) in a text file before publishing it to the server. Changing it in the locator, however, will also change how the text appears in ArcGIS Desktop.

  1. Navigate to the location of the locator.
  2. Edit it in a text editor.
  3. Search for the text "FieldAliases." For instance:

    FieldAliases = Zone

  4. Edit the field alias. For example, you might change Zone to ZIP Code.

    FieldAliases = ZIP Code

For more information on locators, see the ArcGIS Desktop Help.

ArcIMS Services and ArcWeb Services

If you are using an ArcIMS service or ArcWeb Service, you must select a supporting service that supports geocoding, and then configure the task.

  1. Click the Supporting Resources tab to see a list of services that support geocoding. For ArcIMS, any service that has a geocode extension is listed. For ArcWeb Services, see Which ArcWeb Services do I use?.
  2. Select the service layer you wish to use, and click Add.
  3. Click the Select Tasks tab.
  4. Select the Find Address task, and click Add.
  5. Click Next to go to the Configure Tasks page.
  6. On the Configure Tasks page, select the Find Address task from the pick list.
  7. Change the title name, if desired.
  8. Confirm the supporting resource is correct.
  9. When done, click Apply.

Find Place task

The Find Place task allows a user to type in the name of the place to search on the map. The application accesses an ArcWeb Service to search for the place name supplied by the user; therefore, to configure this task you must have an ArcWeb Services account. The Find Place task does not support custom lists of places.

  1. Click the Supporting Resources tab to see a list of supporting ArcWeb Services. See Which ArcWeb Services do I use? for a list of valid services for this task.
  2. If you have not already done so, add an ArcWeb Server.
  3. Select the ArcWeb Service layer you wish to use, and click Add.
  4. Click the Select Tasks tab.
  5. Select the Find Place task, and click Add.
  6. Click Next to go to the Configure Tasks page.
  7. On the Configure Tasks page, select the Find Place task from the pick list.
  8. Change the title name, if desired.
  9. Confirm the supporting resource is correct.
  10. When done, click Apply.

You specify and configure a Find Place task to work in your application during the Web application creation process. In the task configuration page, select the  task from the pull-down. Specify the name of the task as it will appear as a label in the task UI during application runtime. Then choose the "supporting resource" that will be used for the place search.

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 Resources tab. Geoprocessing services are based on models and can be published from either a toolbox or a map document containing a tool layer. See the topic "Geoprocessing services" in the ArcGIS Server Help for more information on how to create one.

Task configuration

To configure a Geoprocessing task for a Web application, you can follow these general steps:

  1. After specifying a resource from within the 'Create a Web Application' wizard, click Next to choose the tasks for your application.
  2. Select 'Geoprocessing Task' in the list of available tasks and either double-click it or click the 'Add' button to add it to the list of current tasks.
  3. Select the 'Supporting Resources' tab
  4. Here, if you haven't already, add the ArcGIS Server that is hosting your Geoprocessing toolbox. After connecting, expand the host node to see the Geoprocessing service. You can hover the mouse cursor over it to review it's service type. It should read 'Service Type = GP'.
  5. Double-click it or select it and hit the 'Add' button to add it to the list of Selected Services. NOTE: you can chose more than one. Click Next.
  6. Here, you will configure the task to determine its behavior and user experience while running withing the Web application. Select the Geoprocessing Task from the pull-down.
  7. Specify a Task Name. This will be the label for the task in the Web application UI. There is a default name, which you can keep. Changing it is optional.
  8. Select the Geoprocessing service to be used in this task. This is the service that you chose as the Supporting Resource.
  9. Select the Geoprocessing Task. This is a tool that lives within the toolbox that your Geoprocessing service was configured with.
  10. You can check Show Job Messages if you wish to display the Geoprocessing messages from within the running application during the execution of the task.
  11. Enter the button text for the task. 'Run' will be the text by default.
  12. Click 'Apply'. This is not optional. You must click Apply before clicking the Next button or else your configuration will not be reflected in your application. You should see a message at the top of the page in green that confirms the success of configuring your task.

Runtime experience

An end user who opens a geoprocessing task will see a pallette of tools that allow for 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 of the parameters, he or she can then invoke the model by clicking a button on the task. As the job runs, the end user can see any messages from the task in the Results Control. If the geoprocessing service has an associated map service which 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 and save out result information to a file and use this file to check task results in another session. The Save 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 alive to view the results until they are available.

Query Attributes task

The Query Attributes task helps users select or view certain data on the map, based on that data's attributes. 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, in order to query the data.

  1. ArcWeb Services only. Select the Supporting Resources tab and select a query service from the list of ArcWeb Services. See Which ArcWeb Services do I use? for a list of valid services for this task.
  2. Under the Select Tasks tab, select Query Attributes and click Add.
  3. Click Next to go to the Configure Tasks page.
  4. On the Configure Tasks page, select the Query Attributes task from the pick list.
  5. In the dialog, change the title name, if desired.
  6. Change the tool tip message, if desired. This provides more detailed instructions when the end user puts the mouse over the text box.
  7. Change the label text, if desired. You can phrase the label text any way you'd like such as "Search for rivers" or "Enter the last name of a parcel owner".
  8. Change the Find button text, if desired. The Find button is what users click after they have added query criteria.
  9. Select which service you want your users to search on. Only one service is allowed per query task.
  10. Select which layer in the service you want your users to search on. Only one layer is allowed per query task.
  11. Select a field you want your users to query on.
  12. Select the comparison operator you want to use.
  13. Set a default value, if desired.
  14. Select which fields you want returned in the response.
  15. When done, 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 Results control lists the features on the map whose attributes match the search. The user can then select, zoom to, or pan to any of these features.

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

  1. ArcWeb Services only. Select the Supporting Resources tab and select a query service from the list of ArcWeb Services. See Which ArcWeb Services do I use? for a list of valid services for this task.
  2. Under the Select Tasks tab, select Search Attributes and click Add.
  3. Click Next to go to the Configure Tasks page.
  4. On the Configure Tasks page, select the Search Attributes task from the pick list.
  5. In the dialog, change the title name, if desired.
  6. Change the tool tip message, if desired. This provides more detailed instructions when the end user puts the mouse over the text box.
  7. Change the label text, if desired. You can phrase the label text any way you'd like such as "Search for rivers" or "Enter the last name of a parcel owner".
  8. Change the Find button text, if desired. The Find button is what users click after they have added search criteria.
  9. Select which service you want your users to search on. Only one service is allowed per search task.
  10. Select which layer in the service you want your users to search on. Only one layer is allowed per search task. The selected layer must have one or more text or string fields. If the layer has no text fields, no values are listed in the Search Fields box.
  11. Select which fields you want your users to search on. You can select one or more of the fields listed.
  12. Select which fields you want returned in the response. This list does not need to be the same as the previous list.
  13. When done, click Apply.

Which ArcWeb Services do I use?

You need to select supporting ArcWeb Services resources when using Search Attributes, Query Attributes, Find Address, and Find Place. When you click on the Supporting Resources tab, and select an ArcWeb Services server, you will see a list of all supporting services. Each service allows one function: querying, geocoding, or finding a place. See the ArcWeb Services Service Finder page for a list of valid services along with a description.