My organization is trying move our sharing capabilities to ArcGIS Online. I have fumbled through figuring out how to publish the services, edit the feature layer, configure and create web maps from those feature layers, and then attach them to a custom web application created in Web App Builder. This all works just fine, but my question lays in how to handle situations where a revision needs to be applied to that published service. I have been handling it by way of simply overwriting the existing published service, but I have found that when doing so, I believe I have to then go through the entire process again to set the feature layer settings, reconfigure/recreate a new web map, and then tell the previous web application to reference the new web map, which in turn creates further configuration since I use the edit widget and it gets reset once you change the web map.
When we perform revisions, we have a system of version attributes that we use to retain iterations, so I can't simply make the changes through the web application. I have to do them in ArcMap (so I think, anyway). We copy/paste the existing features, and then incrementally increase the version numbers that we use, while subsequently querying out the old version. Then all changes are applied to the newest version.
We found out early on that we had to publish the services as hosted services due to our basic Server license. We were having issues with others not being able to see services in Collector when we published to our server itself, and we were told by a technician that we had to publish them as hosted services for others to see them. Not sure if that matters, but I want to include as much information as possible.
A GIS user here may typically complete 3-5 projects each day, and may subsequently be required to edit any of those projects once or more times within the following days. That being said, you can see the dilemma that we face if we are going to have to go through the entire workflow of going from ArcMap to web application described above each time a project is completed and/or revised.
If an edit is performed in the web map and/or app, how do those edits get sent back to the geodatabase? Does the fact that we are hosting these maps through ESRI prevent us from editing the geodatabase itself when we are viewing via an online interface? I was hoping that once we shared the web maps, any edits done through the web maps/apps would replace the existing attributes in the database so that I could see that change when looking at the data in ArcMap. I have toyed with adding the services to ArcMap via the Add Data button and editing/syncing those edits back to the server, but that is not ideal.
That is likely a pretty convoluted set of information and questions, as I don't fully understand the processes and implications of each therein, so please ask anything that may help you better answer what I have asked.
I just wanted to bump this discussion in hopes of getting an answer or some sort of direction. If the question is too broad, or doesn't make sense, please let me know.
This is a big question and I am very curious to hear what you find out. Have you thought about contacting your local Esri rep to bounce ideas off of them and see what they have to say? Sometimes this could prove to be fruitful and other times... well, we can always hope for the best!
Geojobe has some AGOL admin tools that allow for exporting and importing individual items, which I thought looked promising! However, when I exported the JSON of the broken web layer, applied the fix and then imported it back into AGOL --- it created a new item instead of maintaining it's original item Id for some reason. So, it doesn't "fix" the existing item, it just creates a new item.
This is a difficult issue that we've run into as well at our organization. We are using "Map Image Layers" as the items in AGOL so that the underlying map services can be formalized for sharing, and more importantly, for discovery. We have a sort of elaborate admin design that incorporates specific accounts and groups that help us organize content based upon specific business units of the organization.
Essentially, we are managing content by creating AGOL accounts and groups that are specific to each business unit of the organization -- which works well! However, we've run into the issue of managing that content as Map Image Layers when their underlying map services are altered (as we should expect them to!). This could be a simple schema change to one or more of the feature classes in the service has occurred OR more often, it's simply adding a new feature class to the map service that causes the web layer to break.
This alteration to the map services, expectedly, corrupts the web layers and because each web layer has a unique URL we simply cannot replace it with a new/updated/fixed web layer because that original web layer could have already been added to tons of user's web maps. Now, the next time these users access their web map products they've created, that web layer is broken or corrupted.
There is no simple fix because we cannot alter that original web layer and a new one must be created. This means a new URL is created and those user's do not get the new web layer in those map products.
The suggested fix: some sort of JSON editor that will allow us to update the actual properties of the web layer and save it back in order to maintain that original URL. Then user's web map products that contain that web layer will include those updates automatically.
*** Update ***
ArcGIS Online Assistance works!
It may not be a super efficient process, but I can see implementing a satisfactory process for our map service publication workflow. In essence, here's what I did to "update" an existing web layer that gets broken when overwriting the underlying map service with updates/changes to it:
1. Re-publish the updated map service
2. Create a new web layer from the updated map service: open a new web map and add the map service. Create a "copy", apply any symbol adjustments and popup setup. Save it.
3. Open ArcGIS Online Assistant, navigate to the newly created web layer and copy the JSON (just the "data" portion) of the newly created web layer. Add it to a Text Pad, or just keep it in the clipboard when you copy.
4. From ArcGIS Online Assistant, locate the original web layer that is broken. Select all of the "data" section of the JSON, delete it and paste in the JSON from the newly created web layer.
5. Save the JSON editor.
You should be good to go!
If I understand your issue correctly it is how to edit hosted features in a web app and synchronize the data back to a local geodatabase. Data Interoperability in ArcGIS Pro 1.2 (and ArcMap at 10.4.1) has the tools to read from feature services, do a change detection against a local geodatabase and write the change set, with no downtime. You don't need to republish anything. Email me at work at email@example.com and I can step you through it.