Foreign Key Constraint Fails while activiti tries to end some execution.

Description

  1.  

    1.  

      1. Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`activiti_schema`.`ACT_RU_VARIABLE`, CONSTRAINT `ACT_FK_VAR_EXE` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`))↵### The error may involve org.activiti.engine.impl.persistence.entity.ExecutionEntity.deleteExecution-Inline↵### The error occurred while setting parameters↵### SQL: delete from ACT_RU_EXECUTION where ID_ = ? and REV_ = ?↵### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`activiti_schema`.`ACT_RU_VARIABLE`, CONSTRAINT `ACT_FK_VAR_EXE` FOREIGN KEY (`EXECUTION_ID_`) REFERENCES `ACT_RU_EXECUTION` (`ID_`)). Error Code:1502865123638"

Environment

None

Activity

Show:
akshay_rivigo
August 24, 2017, 8:43 AM

Any update on this issue?

akshay_rivigo
October 12, 2017, 11:48 AM

We faced this issue again recently. Any updates on this?

Panos G
November 23, 2017, 10:59 AM

Hello.
I recently upgraded from 5.14 to 5.22 and are experiencing the same exact issue in a constant behavior.
I have a process with an event gateway that has two routes: one message event and one timer event. When I the timer event is fired, I have a service task after that that fires a CDI event that triggers the completion of a user task on another process (it's complicated I know). The error appears when the engine tries to remove the act_ru_execution row related with the user task.

Hope this helps

imd
December 26, 2017, 6:48 PM

Hi. Panagiotis.

Please share your bpmn.
And, maybe you have asynchronous option to user task?
If so, you may be able to avoid this bug by invalidating the asynchronous option.

Assignee

Bassam Al-Sarori

Reporter

akshay_rivigo

Affects versions

Priority

Highest
Configure