Implementing Link Activity on Oracle BPEL Process Editor
Business Process inherently supports sequencing of business tasks. The business processes, in real time, however, are always desired to run in parallel. Business process specification provides a structured activity called ‘Flow’ to achieve parallelism.
Illustratively, business process like Loan Approval would be looking in to run the Paper work, Field Investigation and Background Checking processes in parallel, so that the total turn-around time could be lessened. However, in this when scrutinized,
The bank won’t like to initiateApprovalProcess until FieldIntvestigation and BackgroundChecking process is complete. So here we have a scenario of holding activity in one sequence till other activities in parallel flow have completed.
This means I would like to somehow suggest the BPEL Process Manager, not to initateApprovalProcess Activity, till the other two sequences have been completed. Oracle BPEL does not provide any direct BPEL process activity to meet this end. However BPEL specification does not fail to mention an activity to cater this need. This activity is called the LINK activity.
In this scenario, we would declare a link name in scope of flow, as –
Now this link name is mentioned as source on the activity, which must complete, and as target for the activity, which needs to wait. In the above scenario, we would name two link activities, BackgroundCheckLink and FieldInvestigaitonLink.
BackgroundCheckLink is mentioned as source on BackgroundCheckSequence and FieldInvestigaitonLink is mentioned as source on FieldInvestigationSequence. Since both these links must have executed, both the links are mentioned as target on Invoke Activity.
So, after this addition to your .bpel file, the activity would wait before activating initiateApprovalProcess invoke until, both the sequences, BackgroundCheck and FieldInvestigation have completed.
I need to present a case on how to provide conditioning on THE LINKS. May be some time soon.