Home > Oracle, SOA > BPEL structured activities: Pick with Ecplipse -2-

BPEL structured activities: Pick with Ecplipse -2-

BPEL’s Pick activity

  1. Create a new BPEL project named “BPEL_Pick” by selecting File→New→Others→BPEL 2.0→BPEL Project. Select Next. Type the project name as BPEL_Pick and select the Target Runtime as Apache ODE 1.x Runtime. Click Finish.
  2. Create a new BPEL process file named PickSample by right clicking on the BPEL_Pick/bpelContent folder, select New→Others→BPEL 2.0→New BPEL Process File. Click Next. Fill in BPEL Process Name the stringPickSample, and in the Namespace the string http://pick.bpel.tps. Select the Template as Synchronous BPEL Process. Click Next.
  3. Modify the Service Address as http://localhost:8080/ode/processes/PickSample (suppose that your Tomcat environment is running on port 8080). Click Finish.

  4. Open the PickSampleArtifacts.wsdl file in your project. Right click on the PickSample Port Type. Select Add Operation.
  5. Rename the new operation as sayGoodbye . Rename the existing operation from process to sayHello.

  6. Open the Outline→Bindings→PickSampleBinding. In the Properties view. Click Generate Binding Content... Keep default declaration, select Overwrite existing binding InformationFinish.

  7. Open the PickSample.pbel file to design the process. Click and drag the Pick activity from the Palette to the process before the receiveInput activity.
  8. In the Details tab of the Pick activity, select the option Create a new Process instance if one does not already exist.
  9. Remove the receiveInput activity and move the replyOutput activity to the OnMessage event, inside the Pick. Click and drag an Assign activity to the process, before the replyOutput. A Sequence is automatically created.

  10. Click on the OnMessage activity. In the Details tab, select the operation sayHello.

  11. Right click on the Pick activity. Select Add OnMessage. In the Details tab, select the operation sayGoodbye. Add an Assign activity and a Reply activity to the sayGoodbye branch.

  12. Click on the Reply activity of the sayGoodbye branch, in the Details tab, assign the PickSample→sayGoodbye→sayGoodbyeResponse→parameters→out to the clientResponse variable.

  13. The same way with the replyOutput activity, assign PickSample→sayHello→PickSampleResponseMessage→payload→result to the output variable.
  14. Click on the Assign activity, select Details→New. Assign the expression concat(“Hello ”,$input.payload/tns:input) to the output→payload→result variable. A pop-up dialog appears asking you about the variable initiation. Select Yes.

  15. The same way, at the Assign1 activity, assign the expression concat(“Goodbye ”,$clientRequest.parameters/tns:in) to the clientResponse→parameters→out variable.
  16. It’s now finish the design part. Verify that there is no error in the dessign. We move to the service declaration and registration.
  17. Right click on the BPEL_Pick/bpelContent folder, select New→Others→BPEL 2.0→Apache ODE Deployment Descriptor. Click Next. Verify the BPEL Project name as /BPEL_Pick/bpelContent. Click Finish.
  18. Open the deploy.xml file. And select the Associated port with the Partner Link client is PickSamplePort.
  19. Save file and open the Server view, right click on the Ode v1.x Server at localhost, select Add and Remove Projects. Select the BPEL_Pick in the Available projects box and click Add. Then, click Finish.
  20. Start the ODE server and use the Eclipse’s Web Services Explorer to test our application. You will see two operations sayHello and sayGoodbye that you can select to use. Depending on the operation you select, BPEL will execute the respective process.

     

Advertisements
Categories: Oracle, SOA Tags: , , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: