Unable to Create project in BCC(createProjectForProcess Exception)

ATG BCC Exception

Exception Details:
 

Logging Exception:

/atg/epub/workflow/process/WorkflowProcessManager       Error executing action createProjectForProcess[] on process instance 81200003; deleting the process instance   CONTAINER:atg.process.ProcessException; SOURCE:atg.epub.project.InvalidStateException: Process status is in a state where a new project cannot be created.

Why this error? 

BCC contains the workflows and process related to existing workflows in database, which are not in sync. So workflows and process needs to deleted and new workflows needs to loaded using server start up.

Solution:

Execute following scripts in versioning DB and restart BCC application. So when server starts up, it loads appropriate workflows into DB.

delete from EPUB_PR_HISTORY;
delete from EPUB_PROJECT;

delete from EPUB_PROC_TASKINFO;
delete from EPUB_WORKFLOW_STRS;

delete epub_workflow_info;
delete epub_coll_workflow;
delete from EPUB_IND_WORKFLOW;

delete from EPUB_PROC_HISTORY;
delete from EPUB_PROCESS;

delete from avm_asset_lock;

Its also good check to delete servers Ids.