Provided with the As-Built Editing and Analysis solution are the scripts required to append data to a feature service or remove data from a feature service. To create a repeatable workflow for your organization, you can create a series of geoprocessing models that call the scripts provided with parameters for your organization already populated.
Publish Group
To create a model to publish the results in a group layer to a feature service in your ArcGIS organization, complete the following steps:
- Browse to the PublishTracing.tbx and add a new model.
- In this model, add the Append Group Layer to Feature Service tool from the scripts folder.
- Expose the Group Layer parameter as a model parameter.
- Fill in the feature service item ID with the ID of your published feature service to store the results.
- Select the LayerMap table from the provided geodatabase. This table defines the layer names returned from the trace and to which layer in the service they should be loaded.
- Verify Match Full Name is unchecked.
- If publishing to ArcGIS Online, select WGS_1984_Web_Mercator_Auxiliary_Sphere (WKID 3857) as the output spatial reference.
- Save and close the model.
Reset Service
To create a model to remove data from a feature service, complete the following steps:
- Browse to the PublishTracing.tbx and add a new model.
- In this model, add the Remove Data from Feature Service tool.
- Fill in the feature service item ID with the ID of your published feature service to store the results.
- Enter the names of the layers from which to remove data.
- Specify a SQL statement. To remove all data from the feature service use the expression 1=1.
- Save and close the model.