i have an app that "clones" features via a QueryTask from an SDE-backed feature service, changes some attributes & re-inserts them via a FeatureLayerTask into the same feature service. seems to be working fine except that every now & again we're seeing errors with a 400 fault code with either:
Another application is currently editing the version. [sde.DEFAULT]
Lock request conflicts with an established lock [sde.DEFAULT]
error messages. the features seem to be inserted ok even when these errors are thrown.
should we be concerned about this? is our approach correct? any workarounds besides swallowing these particular errors?
basically do an asynch query on the features you want to clone. if these are in many layers, capture each query result as it comes back in until you have accounted for all the layers' features you want to clone. then use FeatureLayerTask to re-create them in your mapservice (in this case same mapservice which is probably why i'm seeing the locking issues).
see this thread for code for the latter part (capturing cloned layers/features then applying edits to the map service, kind of simple):