mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Changed status response code of DELETE workflow-instance REST API to 200 to be consistent with all other DELETE APIs
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21747 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -20,8 +20,6 @@ package org.alfresco.repo.web.scripts.workflow;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.extensions.webscripts.Cache;
|
||||
import org.springframework.extensions.webscripts.Status;
|
||||
import org.springframework.extensions.webscripts.WebScriptRequest;
|
||||
@@ -55,7 +53,6 @@ public class WorkflowInstanceDelete extends AbstractWorkflowWebscript
|
||||
workflowService.cancelWorkflow(workflowInstanceId);
|
||||
}
|
||||
|
||||
status.setCode(HttpServletResponse.SC_NO_CONTENT);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@@ -560,8 +560,8 @@ public class WorkflowRestApiTest extends BaseWebScriptTest
|
||||
|
||||
WorkflowInstance adhocInstance = startTask.getPath().getInstance();
|
||||
|
||||
Response response = sendRequest(new DeleteRequest(URL_WORKFLOW_INSTANCES + "/" + adhocInstance.getId()), 204);
|
||||
assertEquals(Status.STATUS_NO_CONTENT, response.getStatus());
|
||||
Response response = sendRequest(new DeleteRequest(URL_WORKFLOW_INSTANCES + "/" + adhocInstance.getId()), 200);
|
||||
assertEquals(Status.STATUS_OK, response.getStatus());
|
||||
|
||||
assertNull(workflowService.getWorkflowById(adhocInstance.getId()));
|
||||
}
|
||||
|
Reference in New Issue
Block a user