Monday 19 June 2017

SOA 12c - Standalone Subprocesses

. In this post we will discuss about standalone sub processes. We will see how to create standalone sub process and how to use existing standalone sub process inside composite.

Opposed to inline sub processes, standalone sub processes are not confined to parent BPEL process, we can use these standalone sub process across different BPEL process but we can use these processes inside one composite only. These sub process are used when we need to re-use the whole component multiple times in one composite. If we have logic which needs to implemented in one composite multiple places then we write that logic inside standalone sub process and call that sub process from BPEL process using call activity.

How to create Standalone Sub Process

We have created one sample SOA composite and added one synchronous BPEL process to it. Inside BPEL process we simply assign request message to output. Now we will create a standalone sub process in this composite.

To create a standalone sub process, right-click on the composite and click on Insert and choose “Subprocess” option. This opens another pop-up window where we can the process details. You can edit the details as per your environment, once done click on ok. This will add one standalone sub process to the composite file. Once you create the standalone sub process, you can see that sub process inside component palette. If you notice this sub process further categorized as standalone sub process.



Standalone subprocess Sample composite

Create Standalone Subprocess




How to make changes to Standalone Sub process

Once we are done with standalone sub process creation, next step is to edit the standalone sub process. To edit the standalone sub process, right click on the sub process and click on edit. This opens sub process flow and you can add required logic inside that.

Edit standalone subrocess



How to use Standalone Sub Process

Once we add the required logic in the standalone sub process, next step is to use above created standalone sub process inside BPEL process. To call the standalone sub process from BPEL process, drag the above created sub process from component palate and drop it to BPEL process. You can rename the call activity as per your naming standards.

Add standalone subprocess to BPEL


You can drag multiple sub processes in one BPEL process, you can also use this sub process in another BPEL which is there is same composite. Once you are done with above step, your BPEL process should look like below. You also see BPEL component get wired to standalone sub process through dotted wire.

Standalone subprocess


Once we are done with above steps, deploy your composite to server. All the sub process automatically get deployed to server when we deploy composite as these sub process are part of composite only. Test the composite and you can see that standalone sub process get triggered.



Standalone subprocess testing

No comments:

Post a Comment