Creating a Subprocess

Subprocesses are designed for complex business processes to make the main process easier to understand and debug. Subprocesses are called inside the main process and their output is used in the main process.

The BusinessWorks Process Creation wizard helps create a subprocess. There are multiple ways to launch the wizard:

  • From the main menu, select File > New > BusinessWorks Resources and then select BusinessWorks Sub Process.
  • From the Module Descriptors > Overview getting started area, click Create a BusinessWorks Sub Process.
  • Right-click the Processes folder in the Project Explorer view, and then select New > BusinessWorks Sub Process.

Specify the values for the following fields in the New Subprocess wizard:

Field Description
Process Folder Name of the module and the special folder where the subprocess will be located.
Package Name of the package in the module where the new subprocess is to be added. Accept the default package, or browse to select a different package name.
Process Name Name of the subprocess.
Modifiers Designate whether the process will be public or private. This can be changed later.
Interface Mechanism Select either Direct or Service
  • Direct: Select this option to create a non-WSDL-based subprocess. When you select this option, a new subprocess, containing a Start and End activity, is created.
  • Service: Select this option to create a WSDL-based subprocess. Next, choose one of the following options:
    • Default: Select Inline to create an inline subprocess. Select Standalone to create a standalone subprocess.
    • Custom: Select this option and click Next to create a new WSDL interface or use an existing WSDL interface for the subprocess.
  • Right-click the Processes folder in the Project Explorer view, and then select New > BusinessWorks Process.

Specify the values for the following fields in the New BWProcess Diagram wizard:

Field Desscription
Process Folder Name of the module and the special folder where the subprocess will be located.
Package Name of the package in the module where the new subprocess is to be added. Accept the default package, or browse to select a different package name.
Process Name Name of the subprocess.
Modifiers Designate whether the process will be public or private. This can be changed later.
Patterns Select Standard Patterns > Process and then select one of the following options:
  • Direct Subprocess
  • Service Subprocess

See the preview of the selected subprocess.

Click Finish to create a subprocess.

Result

A subprocess with the specified name, and containing a Start and End activity, is created and opened in the Process Editor.

Parent Process and a SubProcess Example

Consider an example that illustrates how a parent process is designed to call a subprocess and collect data from that subprocess.

The parent process consists of a getEvent activity that calls the subprocess.
Parent Process


The subprocess implements the interface getEvent and returns the output back to the parent process. The parent process then logs the output received from the subprocess in a log file.
Sub Process