vteyesriaustralia-com-au-esridist

version delete denied, version in used

Discussion created by vteyesriaustralia-com-au-esridist Employee on Sep 10, 2019
Latest reply on Sep 11, 2019 by taungesriaustralia-com-au-esridist

Hi, I have a button that changes some layers to a specific version. Once a workflow is completed, those layers are then reconcile and post.

 

If there are no conflict, we then move those layers back to default using the tool as shown below.

 

Change

IGPResult gpResult = null;

await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(async () =>

{

var parameters = Geoprocessing.MakeValueArray(constructLayer, "TRANSACTIONAL", newVersion.GetName());

gpResult = await Geoprocessing.ExecuteToolAsync("ChangeVersion_management", parameters);

 

});

 

If there are no issues with the reconciling, we will then delete the version.

 

jobVersion.Delete()

 

HOWEVER, I kept receiving the following message when I the Delete() method is called

 

"Operation not allowed because the version is in use."

 

The version is only used by me. If I restart pro then manually delete the version, it works fine. Can someone please advise what the approach to deleting version.

Outcomes