After marking a project for deletion and executing the 'Delete Investments' job ; the Project is still showing up in the application. We checked the Background (BG) Server Log file and it indicates there is something preventing the deletion of this project. The message does not provide enough information to resolve the issue.
Steps to Reproduce:
- Mark an existing Project 'Inactive'
- Mark the project for 'deletion'
- Execute the 'Delete Investments' job
- Search for the Project in the Project List view, check the BG log file
Expected Result: The project is successfully deleted
Actual Result: The project is not deleted. There is some error in the log file.
ERROR 2015-07-13 23:00:09,009 [Dispatch Thread-4034 : bg@myserver] xql2.xbl (none:none:none) Error while attempting to delete < Investment ID> (5252135)
Some projects are not deleted if the user running the 'Delete Investments' jobs does not have sufficient security access rights to all custom sub-pages and sub-objects for the investment.
Turning on the following debugging options in the CSA can help decipher where the job is failing.
Once debug is turned on and the job is executed, the log will give additional details. It will show all the steps the job is doing. Once it gets to a custom sub-page or sub-object the log will show the following:
INFO 2015-07-28 14:08:05,814 [Dispatch Thread-492 : bg@myserver] xql2.xbl (none:none:none) Start deletion of custom object through customDeleteService.xbl...
DEBUG 2015-07-28 14:08:05,830 [Dispatch Thread-492 : bg@myserver] odf.out (none:none:none) ODF Service call received an error: ID = odf.objectIllegalDelete TYPE = error VALUE =
DEBUG 2015-07-28 14:08:05,830 [Dispatch Thread-492 : bg@myserver] service.ODFService (none:none:none) processRequest Exception com.niku.union.odf.exception.ODFServiceException: <?xml version="1.0" encoding="UTF-8"?>
<deleteService type="xbl" componentId="odf" description="custom/customDeleteService.xbl" transaction="dbTransaction" xmlns="http://schemas.niku.com/2002/objectTypes"/>
To resolve this issue, first identify the set of sub-objects and sub-pages associated to the investment or project object in Studio.
For the user running the job, add the "Edit All" right for any investment or project sub-objects (i.e., "My Custom SubObject - Edit All").
In addition, you may need to add sub-page rights for 'secured' sub-pages. Look for sub-page rights, and add them to the user who runs the job. (i.e. "Project - Subpage My Subpage (ID: mysubpage) - Edit All")