Critical Section

Critical Section groups are used to synchronize process instances. At run time, 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 (msec) 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 This field appears only when the Shared Lock check box is selected.
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 This field appears only when the Shared Lock check box is selected.

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 generated by this activity. For more information about error codes and the corrective action to take, see the TIBCO BusinessWorks™ Container Edition Error Codes guide.

Fault Generated When..
ActivityTimedOutException A timeout has been reached.