# Sync Behaviour of Process Execution

**URL:** <https://forum.flowable.org/t/sync-behaviour-of-process-execution/4700>\
**Category:** Flowable Engine\
**Created:** [October 15, 2019, 7:04pm UTC](https://forum.flowable.org/t/sync-behaviour-of-process-execution/4700 "2019-10-15T19:04:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jit](https://avatars.discourse-cdn.com/v4/letter/j/2acd7d/32.png) [@jit](https://forum.flowable.org/u/jit)\
**Post date:** [October 15, 2019, 7:04pm UTC](https://forum.flowable.org/t/sync-behaviour-of-process-execution/4700/1 "2019-10-15T19:04:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jit](https://avatars.discourse-cdn.com/v4/letter/j/2acd7d/32.png) [@jit](https://forum.flowable.org/u/jit)\
**Post date:** [October 18, 2019, 6:07pm UTC](https://forum.flowable.org/t/sync-behaviour-of-process-execution/4700/2 "2019-10-18T18:07:27Z")

</div>

Hi @joram

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

> [@Calling Process Asynchronously](https://forum.flowable.org/t/calling-process-asynchronously/956):
>
> Hi I have created few Flowable processes, which are triggered by a REST call . The issue with it is that consumer has to wait for the call to complete before a response is sent back . I want to make the call Asynchronously i.e. Flowable should send the response even before all the steps are done . I agree, that this response full have all the information e.g. “Status” attribute value , but at-least it should have the process- Instance-Id (id). Is there any key which I need to pass in the inpu…

Have you done any improvement related to this issue?

Thanks.
