Search Results

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 New BusinessWorks Sub Process.
  • Right-click on the Processes folder in the Project Explorer view, and then select New > BusinessWorks Sub Process.
  • Right-click on the Processes folder in the Project Explorer view, and then select New > BusinessWorks Process.

Specify the values for the following fields in the wizard:

  1. Process Folder: Name of the module and the special folder where the subprocess will be located.
  2. 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.
  3. Process Name: Name of the subprocess.
  4. Modifiers: Designate whether the process will be public or private. This can be changed later.
  5. 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.
  6. Click Finish to create a service 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