There are many features introduced in SOA 12c to increase
developers productivity, one of the feature is sub process. We already
discussed about what is sub process and types of sub process available in SOA
12c, click here to read the post if you missed to read earlier. We discussed in
detail about Inline sub processes in previous post. Click here to read that
post. That post explains how to create and use Inline sub processes. 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.
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.
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.
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.
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.
Hi Vivek
ReplyDeleteThanks for an informative post on 12C features.
Have one query
How is this subprocess different from a new BPEL process with pick activity(onMessage option)
Apologies if this is really a vague question
Hi Vamshi,
DeletePick activity is used in below scenario's.
When we call asynchronous service and we need response back in certain time frame otherwise we need to throw exception. Check below post for more details.
http://www.soawork.com/2014/06/pick-activity-use-case-get-response-from-async-service.html
When we want to have multiple entry point for any composite. E.g. when we want our process when it is invoked by client or when any message is put to JMS queue by client.
Check out below post for more details.
http://www.soawork.com/2014/06/pick-activity-use-case-multiple-entry-point-of-composite.html