How to deal with asynchonous transitions



If I am right, using the API the execution of human tasks is synchronous (the call to the executeUserTask return when the execution is finished). But after the execution, the transition is executed by Bonita engine asynchronously. So if just after executing a task you ask for the 'next' human task(s) you will retrieve nothing. But if you retry a few times later (100s milliseconds) you will retrieve the 'next', ready human task.

In my process, when I execute a task I need to retrieve immediately the next human task in order to display the corresponding screen to the user.

My application is a sort of dynamic wizard in which each step depends on the previous step. And each step is defined as a human task. Just to explain, currently, in my design, the human tasks are just separated by a single gateway.

Is there a way to deal with the asynchronous behavior in this 'wizard like' approach ? Just to notice, I cannot simply 'wait' in my task execution code as I will have concurrent access (optimistic locks) on my database updates in connector out and in calls

Thanks in advance

No answers yet.