Accidentally deleted act_hi_procinst

Hi,

I know I completely messed up, but I deleted the table act_hi_procinst from the postgresdb and now I’m getting the following error:

postgresdb | ERROR: column “id_” of relation “act_hi_procinst” does not exist at character 37
postgresdb | STATEMENT: insert into ACT_HI_PROCINST (
postgresdb | ID_,
postgresdb | PROC_INST_ID_,
postgresdb | BUSINESS_KEY_,
postgresdb | PROC_DEF_KEY_,
postgresdb | PROC_DEF_ID_,
postgresdb | START_TIME_,
postgresdb | END_TIME_,
postgresdb | DURATION_,
postgresdb | START_USER_ID_,
postgresdb | START_ACT_ID_,
postgresdb | END_ACT_ID_,
postgresdb | SUPER_PROCESS_INSTANCE_ID_,
postgresdb | SUPER_CASE_INSTANCE_ID_,
postgresdb | CASE_INST_ID_,
postgresdb | DELETE_REASON_,
postgresdb | TENANT_ID_,
postgresdb | STATE_
postgresdb | ) values (
postgresdb | $1,
postgresdb | $2,
postgresdb | $3,
postgresdb | $4,
postgresdb | $5,
postgresdb | $6,
postgresdb | $7,
postgresdb | $8,
postgresdb | $9,
postgresdb | $10,
postgresdb | $11,
postgresdb | $12,
postgresdb | $13,
postgresdb | $14,
postgresdb | $15,
postgresdb | $16,
postgresdb | $17
postgresdb | )
camunda | 06-Mar-2019 18:28:47.962 SEVERE [http-nio-8080-exec-3] org.camunda.commons.logging.BaseLogger.logError ENGINE-16004 Exception while closing command context: ENGINE-03083 Exception while executing Batch Database Operations with message ’
camunda | ### Error flushing statements. Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.HistoricProcessInstanceEntity.insertHistoricProcessInstanceEvent (batch index #4) failed. 3 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: Batch entry 0 insert into ACT_HI_PROCINST (
camunda | ID_,
camunda | PROC_INST_ID_,
camunda | BUSINESS_KEY_,
camunda | PROC_DEF_KEY_,
camunda | PROC_DEF_ID_,
camunda | START_TIME_,
camunda | END_TIME_,
camunda | DURATION_,
camunda | START_USER_ID_,
camunda | START_ACT_ID_,
camunda | END_ACT_ID_,
camunda | SUPER_PROCESS_INSTANCE_ID_,
camunda | SUPER_CASE_INSTANCE_ID_,
camunda | CASE_INST_ID_,
camunda | DELETE_REASON_,
camunda | TENANT_ID_,
camunda | STATE_
camunda | ) values (
camunda | ‘accd5059-403d-11e9-a377-0242ac1d0008’,
camunda | ‘accd5059-403d-11e9-a377-0242ac1d0008’,
camunda | NULL,
camunda | ‘rpd_staging’,
camunda | ‘rpd_staging:70:bb498895-3f51-11e9-ad14-0242ac1a0009’,
camunda | ‘2019-03-06 18:28:44.789000 +00:00:00’,
camunda | NULL,
camunda | NULL,
camunda | NULL,
camunda | ‘StartEvent_1pn3ikk’,
camunda | NULL,
camunda | NULL,
camunda | NULL,
camunda | NULL,
camunda | NULL,
camunda | NULL,
camunda | ‘ACTIVE’
camunda | ) was aborted. Call getNextException to see the cause.

Is there any way to create an empty table with all the columns, constraints & indexes that are required for act_hi_procinst? Please help me out!

Hi,

You can try to recreate it from here:

1 Like

And just a heads up, depending on your Camunda version and setup, you can expect other errors once you restore the missing table. For example Camunda version < 7.10, the webapps won’t work properly in some cases.

1 Like

Thank you so much for your replies