Add to a Feature Service using "Create Feature" and "Add Features"
I have been able to successfully create a feature using the Create Feature command, however each time I use the Add Features command it is unsuccessful.
The feature service I am trying to add to is a table feature, and right now I am only trying to add two fields with the rest null. When I use the Create Feature command I only add the fields that I want to fill out and assumed the rest would be set to null.
I'm stumped on this one so any help would be appreciated!
-
Hi Andrew,
Some thoughts as to why Add Features might fail:
- The service is secured and needs a token in order to be accessed, which hasn't been provided by the workflow
- You're using the MapServer url instead of the FeatureServer one
- One of the fields is in an unexpected format (eg, it's sent as a string when it should be a double)
- One of the fields you left null isn't allowed to be null according to the service
I don't think you need to specify null for the fields that should be null. You can just include the two fields that you do want to be used, leave out the rest, and ArcGIS Server should figure it out.
For troubleshooting, use Fiddler, or your browser tools (F12 > Network tab) to check your network traffic while the workflow runs. You can look for the exact request that is sent to ArcGIS Server when Add Features runs. Then you can check the response on that request and see if ArcGIS Server provided a reason why it failed. Or you could look at the request body and see if any of the data that was sent looks out of place. If checking that stuff is foreign to you, maybe you could attach screenshots or a Fiddler capture of the network traffic for us to check out.
0 -
Hi Amanda,
Thank you for responding so quickly. I have been looking at the browser tools you mentioned and didn't see anything that stands out. I have tried striping down the complexities of this process to see if I can get it to work.
I removed the security around the service, and I took out all attributes in the create feature command. I thought if I just use a blank Create Feature command and add it to the Add Feature command pointing to an unsecured service. I thought that would create a blank service, but that is not successful.
Am I missing something fundamental about the Add Feature command?
0 -
Hi Andrew,
Stripping it down to be as simple as possible is usually a good idea. I think your logic for testing makes sense, so long as there aren't any non-nullable fields on the layer (aside from objectid). If you have fields that aren't allowed to be null, then ArcGIS Server won't be able to perform the operation.
I tested using a blank Create Feature activity with an Add Features activity, and that worked on my end when using one of our public services. I've attached that test if you'd like to import it into designer and confirm it's similar to yours or try plugging your service into it.
If that doesn't help and you're certain the layer has no non-nullable fields, then I think we'd need access to the workflow/service to troubleshoot further. Then we could double check the workflow and also the console log and network traffic when the workflow runs. You could either attach the workflow here, or start up a support case for that.
0 -
Thanks for the example! Turns out it was working with a blank feature and I was not getting the resulting success message to display correctly. I have been troubleshooting and was able to piece together an issue with the security and the tool is working fine now. Thanks for your help!
0 -
Awesome, glad to hear you were able to figure it out!
0 -
Hi Amanda. I am trying to do something similar to this - but instead of adding it to a non-spatial table - I want to add it to a spatial feature service. I am using the Geometry picker to get the geometry. It seems to work when i run it in the Sandbox of Workflow - but when i try and implement it in Web App Builder Dev edition. Any thoughts. Attached is my super basic workflow.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
6 Kommentare