tsgrp / HPI

OpenContent Management Suite (OCMS)
http://www.tsgrp.com/products
17 stars 5 forks source link

Cancel Checkout Fails when configured to delete cloud copy after normal checkout #2354

Closed gsteimer closed 2 years ago

gsteimer commented 3 years ago

For customers that use only "normal" checkout/in or "cloud" checkout/in, cancel checkout works fine. However, if both are configured (as we have on most of our demo environments), then cancel checkout fails in the following case:

  1. Checkout document normally
  2. Ensure that the Cancel Checkout configuration is set to delete the cloud copy (as it should be for cloud checkout)
  3. Cancel checkout. This fails with the following error:
2021-01-21 14:28:41,258 24869843    ajp-apr-8009-exec-4 ERROR   RESTService CheckinFromCloudServiceActionExecuter #getDocIDAndDriveID error getting document because of status code: 404, Not Found. With error: 
com.tsgrp.opencontent.core.exception.OCRuntimeException: CheckinFromCloudServiceActionExecuter #getDocIDAndDriveID error getting document because of status code: 404, Not Found. With error: 
    at com.tsgrp.opencontent.core.action.executer.CancelCheckoutActionExecuter.getDocIDAndDriveID(CancelCheckoutActionExecuter.java:226)
    at com.tsgrp.opencontent.core.action.executer.CancelCheckoutActionExecuter.executeImpl(CancelCheckoutActionExecuter.java:126)

Our code should handle the case where cancel checkout cannot find the document to delete on the cloud service. Note that I only tested this while using Microsoft Online. We should also test against Google docs as well.

As a workaround, temporarily change the configuration for Cancel Checkout to NOT delete the cloud copy, execute your cancel checkout, and then switch it back.

gsteimer commented 2 years ago

Moved to Jira: https://alfresco.atlassian.net/browse/SEP-36