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
BusinessWorks Sub Process.
and then select
- From the
Create a BusinessWorks Sub Process.
getting started area, click
- Right-click the Processes folder in the Project Explorer view, and then select .
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 is 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 is public or private. You can change this option later. |
Interface Mechanism | Select either
Direct or
Service
|
- Right-click the Processes folder in the Project Explorer view, and then select .
Specify the values for the following fields in the New BWProcess Diagram wizard:
Field | Description |
---|---|
Process Folder | Name of the module and the special folder where the subprocess is 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 is public or private. You can change this option later. |
Patterns | Select
See the preview of the selected subprocess. |
and then select one of the following options:
Click Finish to create a subprocess.
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.
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.