Issue:

If there is any indication of corruption in the JBPM4 tables or Performance has become an issue. Removing the JBPM4 tables and restoring back to defaults can help with these issues.

**Warning** – Please make sure to backup your database before performing this procedure. Also, these steps are recommended to be used only when there are no batches in READY_FOR_VALIDATION, READY_FOR_REVIEW OR RUNNING. If there are any batches in these states you will need to restart them all from the Folder Import Module.

Solution:

  1. Remove the JBPM4 tables from the Ephesoft database.
You will need to run the following SQL command in the Command Line of Database Connection Client:

For MySQL:

 SET foreign_key_checks = 0;
 DROP TABLE jbpm4_deployprop;
 DROP TABLE jbpm4_job;
 DROP TABLE jbpm4_variable;
 DROP TABLE jbpm4_lob;
 DROP TABLE jbpm4_deployment;
 DROP TABLE jbpm4_participation;
 DROP TABLE jbpm4_task;
 DROP TABLE jbpm4_swimlane;
 DROP TABLE jbpm4_execution;
 DROP TABLE jbpm4_hist_detail;
 DROP TABLE jbpm4_hist_var;
 DROP TABLE jbpm4_hist_actinst;
 DROP TABLE jbpm4_hist_task;
 DROP TABLE jbpm4_hist_procinst;
 DROP TABLE jbpm4_property;
 SET foreign_key_checks = 1;

For MSSQL:

 EXEC sp_MSForEachTable 'ALTER TABLE ? NOCHECK CONSTRAINT ALL' 
 GO
 DROP TABLE jbpm4_deployprop;
 DROP TABLE jbpm4_job;
 DROP TABLE jbpm4_variable;
 DROP TABLE jbpm4_lob;
 DROP TABLE jbpm4_deployment;
 DROP TABLE jbpm4_participation;
 DROP TABLE jbpm4_task;
 DROP TABLE jbpm4_swimlane;
 DROP TABLE jbpm4_execution;
 DROP TABLE jbpm4_hist_detail;
 DROP TABLE jbpm4_hist_var;
 DROP TABLE jbpm4_hist_actinst;
 DROP TABLE jbpm4_hist_task;
 DROP TABLE jbpm4_hist_procinst;
 DROP TABLE jbpm4_property;
 EXEC sp_MSForEachTable 'ALTER TABLE ? CHECK CONSTRAINT ALL'
 GO

Once you have done this you will need to re-create the JBPM tables by doing the following:

  1. Go to the following file – [Ephesoft Installation Folder]\Application\WEB-INF\classes\META-INF\dcma-workflows\dcma-workflows.properties
  2. Set the workflow.deploy setting to true in the dcma-workflows.properties file
  3. Restart Ephesoft
  4. Confirm that all JBPM4 tables have been created

The following are extra step for those using MSSQL:

  1. Shut down Ephesoft Service
  2. Run the following Deadlock Prevention SQL Scripts
  3. Restart Ephesoft

 

Was this article helpful to you?

BJ Waples

Comments are closed.