Designer > Planning Your BPEL Process > Creating a BPEL Process as a Service for Another BPEL Process

Creating a BPEL Process as a Service for Another BPEL Process

A BPEL process uses an invoke activity to call out to a Web service to perform a task. You can create a BPEL process for this purpose.
You can choose between two different invocations of a process:
More about Subprocesses
A subprocess is subject to the fault and compensation handling rules of the enclosing scope of the parent process from which it is invoked. A subprocess is compensated whenever either the fault handler or the compensation handler for the scope enclosing the invoke activity is run. This work is performed implicitly. However, you can enable process-level compensation and termination for the subprocess to select what compensation and termination tasks to do. For a discussion of compensation, see Compensation.
The enclosing scope for the invoke activity does not complete until the subprocess completes. If the subprocess is compensatable when it completes, the enclosing scope compensates the subprocess during its compensation.
If the subprocess throws a fault, the invoke activity of the parent process faults.
Creating a Process as a Service
To create a BPEL process as a service, you must do the following:
  1. 1. Add a WSDL file to Project Explorer for the BPEL process. There are many ways to create a WSDL file. See Interfaces, Service References, and Local WSDL.
  2. 2. Create the BPEL process to be used as a service.
  3. 3. If desired, set the process property Process Level Compensation/Termination to Yes. Two additional tabs are added to the Process Editor, and you can add compensation and termination activities to them. The following illustration shows the tabs that are added to Process Developer.
  4. 4. In the Process Deployment Wizard, identify a service name for the My Role partner link, just as you would for any process.
  5. 5. Create a business process archive (.BPR), as described in Deploying Your Processes.
  6. 6. Deploy the process to the server.
  7. 7. Create the main process that invokes the BPEL process using an invoke activity.
  8. 8. In the Process Deployment Wizard for the main process, do the following for the Partner Role partner link:
    1. a. Select process or sub-process as the invoke handler.
    2. b. Select static as the endpoint reference.
    3. c. Select the Dialog button to fill in the sub-process information.
  9. 9. Deploy the main process.
When the main BPEL process is running, and it invokes another BPEL process, the invoked process has the status of a subprocess, with its own state information. The main process awaits the completion of the subprocess before continuing its own execution. For more information on actively running processes, see the Process Console Help.