Activate Geoprocessing
Follow the instructions in this chapter to activate geoprocessing functionality for the WebOffice 10.9 R4 Sample Project. The functionality is configured in the project configuration but turned off by default since there have to be done some adjustments.
You can only activate geoprocessing if you already have a working WebOffice Sample Project. If this is not the case, start with chapter Copy WebOffice Sample Project Data instead. |
Copy WebOffice Sample Project Geoprocessing Data
You will need the following files from the WebOffice10.9R4-DVD:
•WebOffice10.9R4-DVD\SampleProject\WebOffice directories Add-On\WebOfficeGeoprocessing
•WebOffice10.9R4-DVD\SampleProject\WebOffice directories Add-On\WebOfficeLayerFiles\SewerSections.lyr
First, add a folder called Geoprocessing at your data directory (e.g. D: Data\SampleProject\). Copy the files Geoprocessing.gdb, the Python Script CalculateSewerProperty.py and the toolboxes CalculateAreaTable and SewerSections, which are located at WebOffice10.9R4-DVD\SampleProject\WebOffice directories Add-On\WebOfficeGeoprocessing\SampleProject in the generated folder.
Sample toolboxes in the Geoprocessing.gdb
In the second step copy the folder WebOfficeGeoprocessing into C:\arcgisserver\directories\. This folder contains two file geodatabases with the base data needed to run the geoprocessing tools. Assign the ArcGIS Server account full access rights to the file geodatabases.
Tool file geodatabases in WebOfficeGeoprocessing
In order to run the geoprocessing tools the correct paths are important. If you save the WebOfficeGeoprocessing folder in a different location than C:\arcgisserver\directories, or your Sample project data is stored in another location than D:\data\SampleProject several paths in the model/script have to be adjusted. |
Run the Geoprocessing Tools in ArcGIS Desktop
Before being able to publish a geoprocessing service you have to register the file geodatabases on your ArcGIS Server and run the tools once in ArcGIS Desktop. Therefore, open ArcMap and add the folder to your registered folders via ArcGIS Server Properties.
Register the folder WebOfficeGeoprocessing on the ArcGIS Server
Publish the Geoprocessing Service
Then open the Results window in ArcMap and right click the respective entry. Now choose Share as > Geoprocessing Service to publish your result as a geoprocessing service.
Publish the geoprocessing result
In the Publish a Service dialog leave the default service name but choose to publish service to folder SampleProject. In the Service Editor window go to Parameters and change Execution Mode to Synchronous. Optionally, you can choose Message Level: Info. Then publish the service.
Activate Geoprocessing in the WebOffice Sample Project
Start WebOffice author and open the WebOffice_SampleProject. Navigate to EDIT > Tools > Geoprocessing - Calculate Municipality Area and change the parameter Use tool? to Yes. Then save the project configuration and publish the project.
Activate the Geoprocessing - calculate municipality area tool in the WebOffice author
If you published the geoprocessing service with a different name, you will have to adjust the server name in ArcGIS Server Geoprocessing Service. |
Finally, open SynAdmin and reload the resources of the WebOffice_SampleProject in order to make the new geoprocessing service available. Now the Calculate Municipality Area tool is available in the WebOffice 10.9 R4 clients. With this tool you can calculate the area of a municipality of Graz and display the result as a table in WebOffice 10.9 R4. Optionally, you can add a date into the table.
Activated Calculate Municipality Area tool in the WebOffice html client
Sewer Sections per Property
If not existing yet, copy the entire folder WebOfficeLayerFiles from WebOffice10.9R4-DVD\SampleProject\Project\ into C:\arcgisserver\directories. Otherwise, just copy the file SewerSections.lyr.
If you use another directory than C:\arcgisserver\directories\WebOfficeLayerFiles for saving the SewerSections.lyr you have to adapt the Symbology of the Sewer Section Parameter in SewerSections Properties. |
Repeat the steps described above for the second tool, the script SewerSections. When running the tool in ArcGIS Desktop use the following sample inputs:
•Object ID: 59,490,1349
In the Service Editor set Execution Mode:Asynchronous, activate the checkbox View results with a map service and set Message Level: Info. Then publish the result.
Service Editor settings for SewerSections
Then activate the tool in WebOffice author and reload resources in SynAdmin.
Activate the Geoprocessing - sewer sections per property tool in the WebOffice author
When using the tool in the WebOffice html client, you can either start the tool from the toolbar and enter input parameters manually or pass Object IDs from a selection. For the second option, change map view to Sewer System + Orthophoto and select a couple of Sewers - Combined Wastewater. Then start the tool by clicking the button from the search result.
Select Sewers - Combined Wastewater to pass Object IDs to the geoprocessing tool
The geoprocessing tool will automatically run and add a new temporary map service to the table of content. Since the geoprocessing service runs asynchronous with activated checkbox, it is possible to use a predefined layer symbology saved in WebOfficeLayerFiles.
Geoprocessing result with defined output symbology
•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. •See chapter Geoprocessing Input Parameter for details about the configuration of geoprocessing input parameters in WebOffice author. •See chapter Geoprocessing for details about using geoprocessing in WebOffice html client. |