Getting started with Sub-Processes

A Sub-Process is a process that is considered a part of a larger process. A Sub-Process comprises various activities, gateways, and events. As a Sub-Process is one business process, it consists of only one non-start event. Every Sub-Process must have at least one end event. There are three types of Sub-Processes, as follows:

  • Embedded Sub-Processes
  • Standalone Sub-Processes
  • Event Sub-Processes

Embedded Sub-Processes

An embedded Sub-Process is defined within the parent process. An embedded Sub-Process is useful to divide the process into small processes and use them. The scope of an embedded Sub-Process is limited to the parent process only. The embedded Sub-Process cannot be accessed outside the parent process. Activiti provides a graphical representation of the Sub Process node (as shown in the following diagram) to help create an embedded Sub-Process:

Embedded Sub-Processes

Standalone Sub-Process

We already know how an embedded Sub-Process is defined and used within the parent process. The standalone Sub-process is the exact opposite of the embedded Sub-Process. A standalone Sub-Process refers to a process that is already available within the Activiti Engine and that you want to reuse within your process. Activiti provides a graphical representation called Call activity to implement a standalone Sub-Process, as shown in the following diagram:

Standalone Sub-Process

Event Sub-Process

The two Sub-Processes discussed so far require a start event to trigger the Sub-Process, but the event Sub-Process is a process that can be triggered by the following events: message events, error events, timer events, compensation events, and signal events. An event Sub-Process doesn't have any incoming or outgoing connections. The graphical representation provided by Activiti for an event Sub-Process is Event Sub-Process as shown in the following diagram:

Event Sub-Process
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset