Sync Behaviour of Process Execution

Hi,

Before I dive into my problem I want to give a brief description of what I am doing. I have a worker thread pool and the threads of this pool’s only responsibility is to start a flowable process instance and wait until the process ends and then returns back to pool to start an another flowable process instance.

I have process definitions fully consists of sequential tasks. After one of my thread in the thread pool starts a process and if the execution fails in the middle of workflow, the process completely rolls back as it never happened or started. To overcome this issue I put a timer trigger after the start event of the process definition(to make the execution async) and this way I was able to see what went wrong in my process execution(because flowable keeps track of async executions in its db). And at the same time I wrote my own AsyncExceptionHandler logic to end the process, I did this because if an exception occurs during the async execution, it remains as a running process and since my thread assumes this process as a running process, the worker thread never returns to thread pool. By the way I am checking the process instance end time every 60 seconds to see if it is finished and returning the worker thread to pool back again.

My question is why there is not any SyncExceptionHandler concept in engine. If there is, please show me the way. If there is no such a feature, how can i simply put a timer trigger after start event of every process programmatically to make it async and make the exceptions candidate for my own AsyncExceptionHandler.

Thanks.

Hi @joram

I think my problem looks similar to the question in this topic :slight_smile:

Have you done any improvement related to this issue?

Thanks.