Critical Section

Critical Section groups are used to synchronize process instances. At runtime multiple process instances can be executed concurrently. You can use Critical Section groups to synchronize the set of actions performed in the process across multiple process instances. Only one process instance can execute the critical section group and its contents at any specified time. Other concurrently running process instances that are associated with the corresponding critical section group wait at the start of the critical section group, until the process instance that is currently executing complete the critical section group.

General

The General tab has the following fields.

Field Description
Name The name to be displayed as the label for the group in the process.
Group Type The type of the group. The default is Critical Section.
Timeout The maximum time (in milliseconds) that a process instance waits at the start of the critical section group while another process instance is executing the critical section. When a timeout occurs, the process instance that is waiting to execute the critical section fails with an Activity Timeout Exception.

The timeout field can be used to avoid deadlock situations.

Shared Lock Select this check box to synchronize multiple critical section groups that use the same shared variable as a lock.
Shared Variable Type The Shared Lock option can be defined using a Module Shared Variable or a Job Shared Variable. When a module shared variable is used against job shared variable to define Shared Lock, it has different implications.
  • Module Shared Variable: provides a shared lock to synchronize process instances from different processes that are within a module. Using a module shared variable, you can synchronize multiple Critical Section groups that can be part of different process instances.

    These Critical Section groups can be in the same process or in another process, provided all processes are contained within a module.

  • Job Shared Variable: provides a shared lock to synchronize within a job. Using a job shared variable, you can synchronize multiple Critical Section groups that are part of the same job. These Critical Section groups can be in the same process or in an another process, provided all process instances are part of the same job.
Shared Variable Name of the Module Shared Variable or Job Shared Variable.

Description

Provide a short description for the group in this field.

Variables

The Variables tab provides a way to declare variables that are only limited to the scope of this group.

You can select from the following available Variable Type options:

  • String
  • Integer
  • Decimal
  • Boolean
  • Date&Time

Fault

The Fault tab lists the possible exceptions thrown by this activity.

Fault Thrown When..
ActivityTimedOutException The specified timeout is attained.