Throw within catch: constraint violation ACT_FK_EXE_PROCINST

Hello,
I have a standalone subprocess, within which a BPMN error can be thrown. The resolution of the error can be either retry or rethrow.

I would like to catch this rethrow in parent process, which uses call activity to call the subprocess.

The logic works. It really retries if the decision is to retry. It rethrows if not and even the parent process catches the error, so it can be handled there. However the process ends with an exception:

org.h2.jdbc.JdbcSQLException: Referential integrity constraint violation: "ACT_FK_EXE_PROCINST: PUBLIC.ACT_RU_EXECUTION FOREIGN KEY(PROC_INST_ID_) REFERENCES PUBLIC.ACT_RU_EXECUTION(ID_) 
...........
    ) {1: '30', 2: '24', 3: NULL, 4: 'helloWorldSubProcess:1:11', 5: 'rethrowErrorEndEvent', 6: TRUE, 7: FALSE, 8: FALSE, 9: FALSE, 10: FALSE, 11: '24', 12: NULL, 13: '14', 14: 1, 15: '', 16: NULL, 17: TIMESTAMP '2017-06-28 16:55:55.781', 18: NULL, 19: FALSE, 20: 0, 21: 0, 22: 0, 23: 0, 24: 0, 25: 0, 26: 0, 27: 0}

I’m new to flowable. Could you please help me what might be my issue?

Thank you :slight_smile: ,
Andrej

Hi Andrej,

It’s difficult to say without having the full error message and the BPMN XMLs of these process definitions. Would it be possible to create a unit test showing the issue? That would make it easy for us to reproduce.

Best regards,

Tijs

Hi Tijs,
Please find the failing unit test here. Please let me know if any further input would make it easier for you to analyze this issue.

Thank you,
Andrej

I added further unit tests to the repo to demonstrate this issue (ProcessTestHelloWorldWithBothSubprocessTypes).

One unit test is failing:

  • Calling standalone subprocess - the process fails, when error is caught within standand subprocess and then thrown to parent process from error handling

Two unit tests are passing:

  • Calling embedded subprocess - here the error flow works, altough it’s logically the same as the non-working error handling in standalone subprocess

  • Calling standalone subprocess - here the error flow works, if the error is not thrown from local error handling, but from the process directly

Please let me know if there is anything we can try to resolve this issue.

Thank you,
Andrej

Hi Andrej,

Thanks a lot for your unit test, that helped to easily reproduce it.
A fix has been committed to solve the issue.

Best regards,

Tijs

Hi Tijs,
Thank you for the fix.

Please when is the minor bugfix release expected to be released to maven central?

Thank you,
Andrej