In Bizagi multiple sub-processes can also be executed as an asynchronous activity. See Launch multiple instances asynchronously. However, you need to keep in mind best practices when you run sequences or a combination of asynchronous activities with asynchronous sub-processes. This section explains recommendations when you execute a series of activities in sequence.
Execution of activities in sequence
When you model a sequence of activities like service tasks or multiple sub-processes configured as synchronous, Bizagi executes all the tasks in the same transaction.
This is NOT a recommended practice. We recommend using asynchronous behaviors.
For the multiple sub-process, cases are created synchronously and treated under the same transaction, unless there is an asynchronous element within the sub-process. In case any of the execution fails, Bizagi will stop the transaction, and there is no roll backing, therefore is not a recommended practice. When you have a long set of synchronous executions, you can potentially slow down the system do to a high charge of resources to execute one big transaction.
Asynchronous execution as best practice
In this scenario is best practice to set each execution for both service tasks and multiple sub-processes using the asynchronous property. This property lets Bizagi run each task separately (in single transactions), instead of running a long transaction.
Asynchronous activities with the show feedback disabled, and retries, are executed by the Scheduler. Therefore, it is important to monitor the Scheduler server performance, and if needed fine-tune it. See How to fine-tune the Bizagi Scheduler.
When you have various asynchronous activities combined in sequence with other BPMN elements, the transaction of the async task extends the execution of other elements until it finds any of the following elements:
•Convergent gateway as synchronization and the condition is not met yet.
•User or manual task /event.
•Another asynchronous task.
For example, when an asynchronous activity starts its execution by the Scheduler, the same transaction continues until it finds any of the elements previously mentioned.
This is very important to consider when you define the Asynchronous activity timeout because, if there are other elements executed in sequence, this can affect the response time of the asynchronous activity. The best practice is to avoid long-running transactions by converting as many automatic tasks as possible to asynchronous activities.