I am testing true async task execution and error handling in such parallel tasks.
What i have is a simple parallel async tasks, 1 of which throws BPMN Error and the other “Does something for X milliseconds” and sets variable in the context.
The problem I have is that the whole test crashes with “Referential integrity constraint violation…” in mybatis engine.
I suspect the issue is that, since both tasks are executed in true async manner, the whole process have completed before the second task have completed. And tries to write in context of already completed process. However the exception is completely weird and happens in the main thread.
First question is:
- What happens if we run a parallel true async tasks (one of them fails with BPMNError , while other continue) and try to write in the context.
- Can I handle this more gracefully? Since it seems the main thread running the process crashes with the mentioned exception
Best Regards, Chavdar