Page 1 of 1

Frontend File removing in processmaker

Posted: Tue Aug 09, 2016 4:27 am
by Srinivas
Hi,

I am using script in php

$caseId = '44756102555c4e859630f43089650367';
$caseFileId = '97205510555e4a28a092857090745482';
$delIndex = 2;
$url = "/api/1.0/{workspace}/cases/$caseId/$delIndex/input-document/$caseFileId";
$oRet = pmRestRequest("DELETE", $url);

if ($oRet->status == 200) {
print "Input Document file deleted.\n";
}
but didn't deleted file display error: {code: 400, message: "Bad Request: **ID_CASES_INPUT_DOCUMENT_DOES_NOT_EXIST**"}}

Re: Frontend File removing in processmaker

Posted: Fri Jan 06, 2017 8:10 am
by zainab
Hello,

Check whether the value assigned to $caseFileId is actually the UID of the input document uploaded in that particular case. The APP_DOCUMENT table stores the information of the uploaded input documents for every case. The app_doc_uid passed in the url is the UID of the input document uploaded in a case and not the UID when an input document object is created from the Designer interface.

Also the user trying to delete the input document should have the Process Supervisor permission.