Prepare a Geoprocessing Service
Consider this chapter to see what has to be prepared in order to use the geoprocessing functionality in WebOffice 10.9 R4. In general, always test your geoprocessing service first in ArcGIS Desktop before adding it to your WebOffice 10.9 R4 project.
General
In order to use the Geoprocessing tool in WebOffice 10.9 R4 it is necessary to provide your geoprocessing task(s) within a ArcGIS Server geoprocessing service. Like a toolbox in ArcGIS Desktop, a geoprocessing service is just a container that does not perform any geoprocessing. But it defines several properties, e.g. the execution mode, the maximum number of records returned by the server, etc. A geoprocessing service may contain one or multiple geoprocessing tasks. The geoprocessing task represents the tool that runs on the server.
WebOffice 10.9 R4 can work with the following parameters:
Data Type |
Description |
Example JSON representation |
Direction |
||
---|---|---|---|---|---|
GPLong |
An integer value between −2,147,483,648 to 2,147,483,647 |
345 |
Input |
||
GPDouble |
Decimal values |
1.414 |
Input |
||
GPString |
String |
TestString |
Input |
||
GPMultivalue:GPString |
An array of GP parameter values of the data type GPString.
|
["Parcels, Street Lights"] |
Input |
||
GPBoolean |
true or false |
true |
Input |
||
GPLinearUnit |
A value that has a distance value and its unit of measurement such as miles, kilometers, feet, and so on. |
{ distance : 345.678, units : esriMiles } |
Input |
||
GPDate |
Number that represents the number of milliseconds since epoch (January 1, 1970) in UTC. |
1199145600000 |
Input |
||
GPDataFile |
Any file type such as .txt, .pdf, .csv, and so on. |
{ url : http://myserver/myfile } |
Input |
||
GPRecordSet |
Tables that are represented in rows and columns. |
|
Output |
||
GPFeatureRecordSetLayer |
Features that have a geometry, spatial reference, field definitions, and features. |
|
Output |
||
A result map service created by asynchronous GP tasks with activated checkbox. Use this option to display results with the symbology specified in your model/script.
|
|
Output |
Task parameter properties (REST) (© by Esri) extended by VertiGIS
Authoring
Authoring a geoprocessing service, respectively the tasks within it, means that you have to
•select one or more geoprocessing tools that will become the tasks of your service. You can use one of the many system tools delivered with ArcGIS or create your own tools using ModelBuilder or Python scripting.
•gather the input data necessary to execute the tool. These datasets may be layers in the ArcMap table of contents or are to be defined within the tool dialog.
•execute the tool to create a result in the ArcGIS Results window.
•For details regarding the authoring of geoprocessing services, please see the ArcGIS Resources - A quick tour of authoring and sharing geoprocessing services and the subsequent topics. •Also consider the performance tips in ArcGIS Resources - Performance tips for geoprocessing services. |
Geoprocessing model in ArcMap ModelBuilder
Publishing
To publish a geoprocessing service, you need to execute your tool in ArcGIS Desktop in order to create a result in the Results window of ArcMap. Assumed that an administrator or publisher connection to ArcGIS Server is configured, you can right-click the result and choose Share As > Geoprocessing Service to start the publishing process similar to publishing a map service. You can add additional results to the service, and each result becomes a task within the service.
For details regarding the publishing of geoprocessing services, please see the ArcGIS Resources - A quick tour of publishing a geoprocessing service and the subsequent topics. |
It is possible to use geoprocessing services with multiple geoprocessing tasks within WebOffice 10.9 R4, although you will have to configure one geoprocessing tool per geoprocessing task in the WebOffice 10.9 R4 project configuration. |
Share a result as geoprocessing service
In the Service Editor it is possible to specify various settings how you geoprocessing service should work. Find the most important settings listed below (for a complete description see the link to ArcGIS resources above).
•Capabilities > Geoprocessing: Check the option Operations allowed: ⎕ Uploads if your geoprocessing task contains some sort of file upload to the server
Geoprocessing settings in the service editor
•Parameters > Execution Mode: Specifies, whether a task will be executed in synchronous or asynchronous mode.
oSynchronous: The client waits until the task is finished and is not available during the execution of the task.
oAsynchronous: After starting the task, the client will be available again instantly. The client does not monitor the execution of the task.
▪View results with a map service: the geoprocessing server creates an accompanying map service with visual representation of outputs
•Parameters > Message Level: Specifies the level of message that will be returned to the client
Parameter settings in the service editor
•Geoprocessing Task Settings (Name of the geoprocessing task) > Task Parameter Properties
oType: Defines whether the client must supply a value for the task to execute successfully. Note that in the Service Editor you can only change optional parameters to required. Required parameters have to be changed to optional parameters in the properties of the tool instead.
oInput Mode: Specifies how the client will provide the value for the task parameter. Possible input modes are: user defined value, choice list, constant value.
Geoprocessing task settings in the service editor
Using
Test your geoprocessing task first in ArcGIS Desktop before adding it to the WebOffice 10.9 R4 project. Execute your geoprocessing task by opening the tool dialog box from your geoprocessing service.
Execute your geoprocessing service task in ArcGIS for Desktop
Use the Results window to observe the status of tasks submitted to the server. If the result output data type is a file or raster dataset, the output will be saved on a local scratch directory. Others, like feature classes, will be added to the current session displaying the name of its output datasets.
View result in the Results window
If the tests were successful, you are ready to configure the geoprocessing tool in your WebOffice 10.9 R4 project.
•See chapter Geoprocessing for details about the tool configuration in WebOffice author. •See chapter ArcGIS Server Geoprocessing Service for details about the configuration of the ArcGIS Server Geoprocessing Service in WebOffice author. |