IF Activity in BPEL Process in SOA Suite 12C

We have already discussed about the synchronous and asynchronous BPEL process in my previous articles. Now we will discuss about the operations of different activities in BPEL process.

In this example we will see the use of IF activity in BPEL process. Here the output will come on the basis of IF condition.

  1. Create a SOA project. Click on File -> New -> Project -> SOA Project and Enter project name as IFActivityIF_ACTIVITY_BPEL_1
  2. Click on NEXT button and select the option Composite With BPEL ProcessIF_ACTIVITY_BPEL_2
  3. Click on FIINISH button. BPEL process creation wizard will open. Select the option Synchronous BPEL Process in the template field and also select the checkbox Expose as a SOAP ServiceIF_ACTIVITY_BPEL_3
  4. Create a variable in BPEL processIF_ACTIVITY_BPEL_4
  5. Click on green plus sign to create a variable. Enter variable name as inputVar and select string as variable typeIF_ACTIVITY_BPEL_5
  6. Select Assign activity from component palate and drag and drop it in between receiveInput and replyOutput.IF_ACTIVITY_BPEL_6
  7. Double click on Assign activity and map the inputVariable to inputVarIF_ACTIVITY_BPEL_7
  8. Select IF activity from Structured Activities component and drag and drop it after Assign activity.IF_ACTIVITY_BPEL_8
  9. Now click on plus sign in IF activity and add else if condition like below screenshot. Change the label of IF conditionIF_ACTIVITY_BPEL_9
  10. Drag and drop three Assign activities under each IF and else-if conditionIF_ACTIVITY_BPEL_10
  11. Add conditions in IF and ELSE IF and leave the ELSE partIF_ACTIVITY_BPEL_11 IF_ACTIVITY_BPEL_12 IF_ACTIVITY_BPEL_13
  12. Assign some value to the output payload in each assign activity under IF conditionIF_ACTIVITY_BPEL_14 IF_ACTIVITY_BPEL_15 IF_ACTIVITY_BPEL_16
  13. Save the project and the BPEL process will look like belowIF_ACTIVITY_BPEL_17
  14. Deploy the project and test it in the Enterprise Manager console.IF_ACTIVITY_BPEL_18
  15. Test the project by giving different input values.IF_ACTIVITY_BPEL_19 IF_ACTIVITY_BPEL_20 IF_ACTIVITY_BPEL_21 IF_ACTIVITY_BPEL_22 IF_ACTIVITY_BPEL_23 IF_ACTIVITY_BPEL_24

Leave a Reply

Your email address will not be published. Required fields are marked *

Show my latest post here