Wednesday 19 October 2016

Benefits of Subprocess and Inline Subprocess - SOA 12c

Benefits of subprocess:
  • Reusability of BPEL code. Now don't have to write same code multiple times, just create subprocess and call that subprocess where ever you want.
  • You don't have to change the logic at multiple times, just change in the sub process i.e. at one place only.
  • Code looks more modularized and easy to understand by any other stakeholder.
  • It is better than calling the invoke activity.
Some points needs to be remembered about subprocess:
  • Subprocess is only supported with BPEL 2.0
  • Correlation sets are not supported with subprocess.
  • Subprocess can not be shared between multiple composites. But you can use the soa template to shared across the multiple composite.
  • Monitor view is not supported from inside the subprocess.
Inline BPEL Subprocess

Inline subprocess is defined inside the parent bpel process that means we can't call the subprocess outside the parent bpel process. This subprocess may be useful in the situation where same activity happens at multiple times in single bpel process e.g.
  • Status updating in database or calling external web service at multiple times in process at various levels.
  • Logging of message at multiple times in a process.
  • Validation of message in a process.

Example: Calculation of two numbers based on the operation (i.e, +, -, *, /)

1) Create a New SOA Project with synchronous bpel - Calculator



























































2) Three elements as an input (number1, number2 and an operation to perform b/w two numbers)





















3) Creating Inline Subprocess - CalculationSubProcess (We will pass the operation we need to perform between 2 numbers to inline subprocess and get back the result b/w the numbers)







































4) Creating two variables (Input: InputOperation and Output: OutputResult)

















5) Calling the Inline Subprocess from Main BPEL by passing Operation we need to perform to InputOperation and result we will get to OutputResult.



























































6) Inline Subprocess will look like below.














7) Main BPEL with calling the Inline Subprocess will look like below.

























Thank You!!!!


Happy Learning!!!!

No comments:

Post a Comment