Usage Guidelines
Because Critical Section groups cause many process instances to wait for one process instance to execute the activities in the group, there may be performance implications when using these groups. In general, you should use the following guidelines when creating critical section groups:
-
Keep the duration of a Critical Section group as short as possible. That is, put only a very few activities in a Critical Section group, and only use activities that execute very quickly.
-
Avoid nesting Critical Section groups. If you must use nesting, ensure that Lock shared configuration resources are used in the same order in all process definitions. Deadlocks can occur if you do not specify the Lock resources in the same order in nested Critical Section groups for all process definitions.
-
Do not include any activities that wait for incoming events or have long durations, such as Request/Reply activities, Wait For activities, Sleep activities, or activities that require a long time to execute.
-
When using Critical Section groups to retrieve or assign a value to a shared variable across multiple process engines, both the Lock and the Shared Variable shared configuration resources should have the Multi-Engine field checked. You can use a global variable to ensure that the Multi-Engine field is set to the same value for both resources.