Delete a case from the Portal
I would Like to implement a scenario where a User is able to delete a case from the Portal.
I would like to use API to delete a case.
From the List of BPM Api's, There is a example as http://../API/bpm/case/ .
Now its mentioned that the Method is Delete. I assume that we need to change the action type of a button to Delete.
But What do I pass to the data sent on click . Do i send the API as data with correct case number.
Would a user have permission to execute the function ?
Any other way to implement such a scenario ?
I tried it last week and that's not a documentation error.
You have to call the DELETE method on URL : http://[[BONITA_SERVER]]/bonita/API/bpm/case
The payload you send is a table containing a list of cases ids to delete. For example : ["1001","3001"]
Thanks for your response.
I tried but I am getting a 403 forbidden error.
Below is the Request Header. I dont see any Response header.
Status Code:403 Forbidden
Date:Mon, 27 Feb 2017 12:49:07 GMT
Accept:application/json, text/plain, /
Accept-Encoding:gzip, deflate, sdch, br
Cookie:JSESSIONID=9B49BB1F76D323974B33E69876342BA1; bonita.tenant=1; X-Bonita-API-Token=aefbcf3a-f6d8-43da-be30-0a7bc2d305b0; BOS_Locale=en
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
Also I checked, csrf is disabled .
Could you describe the Process that you had followed in your scope.
I had taken a Blank page, added a Button, changes the Method type to Delete and hard coded the url to call as http://localhost:8080/bonita/API/bpm/27006 .
Now I added the page to the Portal resource. Added the page to Application menu and launched the page.
Upon clicking , i am getting the Error.
Am I following the Right Process here ?
Sorry I Missed your First Question.
I am using 7.3.1 subscription .
Thanks for your Feedback.
The Second method sounds good. I am planning an automatic task and could execute the Script there.
I am not familiar with SOAP UI .
I am planning a complete Process to delete Both Case as well as BDM records corresponding to that case.
Also What do you recommend for deleting records from the Database.
Should I search Records with Case id or Persistence Id ?
Interesting - the documentation isn't up to date...I would report this as a bug.
I would assume the correct text should be something like:
Delete a case
Success Response Code: 200
PS: As this reply answers your question, please mark as resolved by ticking the tick mark on the left of this reply.