One of the new feature of soa suite 12c is subprocess. BPEL subprocess is a reusable component that can be used during the bpel process execution. soa suite supports two type of subprocess: standalone subprocess and inline subprocess. Lets start with standalone subprocess
standalone subprocess:
standalone subprocess is a separate process that can be invoked from main bpel process. For standalone bpel subprocess a separate file is create with .sbpel extension. A subprocess call activity is used to invoke subprocess from main bpel process. Now I will show how to invoke standalone subprocess.
1. create a new application with Composite with subprocess option.
inline subprocess:
inline subprocess a subprocess that is a part of main bpel process. A reusable scope is converted into subprocess and this subprocess is used in the main bpel process for code reuse. inline subprocess is not shown in composite file, it is a part of bpel process.
1. Create a BPEL application
2. Create a synchronous bpel process
3. create a file adapter
4. wire the file service with bpel process
5. open bpel process and add scope activity between receive and reply
6. within the scope activity drag invoke activity and wire the invoke activity to writefile service. I am making this scope as reusable. so i am converting this scope to subprocess. click on convert to a subprocess button.
7. enter scope name as InlineScope
8. drag assign activity between receive and call1 activity. open assign activity and wire input variable to invoke input variable.
9. expand subprocess component. drag inlinescope subprocess and drop it next to call1 activity
10. drag assign activity between call1 and call2 subprocess
11. open assign activity and add expression to invoke input variable
12. call1 activity creates a file with the input which you have give during testing. call2 activity creates another file with the input which you have assigned in assign2 activity.
standalone subprocess:
standalone subprocess is a separate process that can be invoked from main bpel process. For standalone bpel subprocess a separate file is create with .sbpel extension. A subprocess call activity is used to invoke subprocess from main bpel process. Now I will show how to invoke standalone subprocess.
2. enter the subprocess name.
3. subprocess design page is displayed.
4. create Synchronous BPEL Process.
5. drag a file adapter to write a input data into a particular location. I will use this file service in bpel subprocess. so wire the file service with subprocess.
6. Open bpel process. drag a assign activity and add simple concat code to output variable.
7. Now open subprocess and drag one invoke activity. Wire invoke activity with file service and accept default input variable name and click ok.
9. create on variable of string type in the subprocess
10. drag assign activity and wire the newly created variable with the file service input variable.
10. back to main bpel process. expand subprocesses at components, drag and drop the subprocess next to
the assign activity.
11. Double click on subprocess call activity. select input variable in the value field for variable1(this variable is created in subprocess). so that we are passing the input value from main bpel process to subprocess.
12. build and deploy the project. The main bpel process call the subprocess and also sends the input data to
subprocess. The subprocess will create a file.
inline subprocess a subprocess that is a part of main bpel process. A reusable scope is converted into subprocess and this subprocess is used in the main bpel process for code reuse. inline subprocess is not shown in composite file, it is a part of bpel process.
1. Create a BPEL application
2. Create a synchronous bpel process
3. create a file adapter
4. wire the file service with bpel process
5. open bpel process and add scope activity between receive and reply
6. within the scope activity drag invoke activity and wire the invoke activity to writefile service. I am making this scope as reusable. so i am converting this scope to subprocess. click on convert to a subprocess button.
7. enter scope name as InlineScope
8. drag assign activity between receive and call1 activity. open assign activity and wire input variable to invoke input variable.
9. expand subprocess component. drag inlinescope subprocess and drop it next to call1 activity
10. drag assign activity between call1 and call2 subprocess
11. open assign activity and add expression to invoke input variable
12. call1 activity creates a file with the input which you have give during testing. call2 activity creates another file with the input which you have assigned in assign2 activity.