Groups

A Group is a compound activity. It is composed of a set of flow elements that may include other Groups.

Groups are primarily used to provide exception and compensation handlers to a group of activities. They are also commonly used to handle timeouts for a group of activities.

A Group can be formed by any flow element (also called leaf activity) with the exception of Global Interactive, Global Creation, Global Automatic, Begin and End activities. Also keep in mind that a group cannot contain only a Split or a Join gateway.

Using Groups

Groups are useful in the following scenarios:
  • You need to define a due interval within which a group of activities must be completed.

  • You need to manage a specific exception that can occur in any activity within a group. Instead of handling the exception in each activity, you can define the group and handle the exception from within it.

  • You need to reverse (compensate) a certain situation that involves more than one activity to be rolled back.

  • You need to manage a group of activities as a unique transaction (atomic group)

  • You need to simplify the design. Groups help you better visualize the process design since you can collapse a set of activities into one group element.

Compensating Work in a Group

If you want to undo the actions in a group, you should raise an exception and trigger a Compensate event.