Salesforce

WorldServer: spDeleteProject fails with error trTasksU: Cannot set taskstep of active task to NULL, transaction terminated

« Go Back

Information

 
Article TypeSolution Article
Scope/EnvironmentWorldServer
Symptoms/Context
We need to delete some projects from the Database. To do so, we follow the instructions in this article:

WorldServer - How to delete active or completed/cancelled Projects or Tasks from a Worldserver Database

However, for some projects, we are getting the error below when running spdeleteproject in our Oracle Database

Error report - ORA-20099: spDeleteProject: Failure updating tasks.currentTaskStepId=NULL, transaction terminated: (-20099) ORA-20099: trTasksU: General Error: (-20001) ORA-20001: trTasksU: Cannot set taskstep of active task to NULL, transaction terminated ORA-06512: at "WSNADM.XXXXX", line 38 ORA-04088: error during execution of trigger
Resolution
The cause of the error is that at least one task or more of the project has not been completed. All Tasks of a project must be already completed in order to run the stored procedure.
You can complete the Tasks manually in the User Interface.

Alternatively, to complete the tasks of the project using a Database query, execute the following SQL:

update tasks
set completionstatus =3
where projectid = xxxx


To confirm the change, run this query:

select * from tasks
where projectid = xxxx


If the completionstatus is now indeed 3, perform a commit of your first. The cause of the error is that the tasks of the project have not been completed

Note: in the query, xxxx is to be replaced with the value of projectid that has been previously specified in the failed spdeleteproject stored procedure.

Once the above SQL has been executed spdeleteproject will succeed.
Root Cause
Reference
Attachment 1 
Attachment 2 
Attachment 3 
Attachment 4 
Attachment 5 

Powered by