BPEL structured activities: Flow

In BPEL, the Flow activity specifies processes which are performed concurrently. In this tutorial, we will practice with the Flow activity through a simple example, which returns the combined results from two processes.

Tools: Eclipse 3.6, BPEL Designer 0.5.0 Plugin, Tomcat 7.0.53, ODE 1.3.5

BPEL's Flow activity

  1. Create a new BPEL project named “BPEL_Flow” by selecting File→New→Others→BPEL 2.0→BPEL Project. Select Next. Type the project name as BPEL_Flow and select the Target Runtime as Apache ODE 1.x Runtime. Click Finish.
  2. Create a new BPEL process file named FlowSample by right clicking on the BPEL_Flow/bpelContent folder, select New→Others→BPEL 2.0→New BPEL Process File. Click Next. Fill in BPEL Process Name the string FlowSample, and in the Namespace the string http://flow.bpel.tps. Click Finish.
  3. Select the Template as Synchronous BPEL Process and modify the Service Address as http://localhost:8080/ode/processes/FlowSample (suppose that your Tomcat environment is running on port 8080). Click Finish.
  4. Open FlowSampleArtifacts.wsdl. Right click on FlowSamplePort, select show properties and make sure that the Address is http://localhost:8080/ode/processes/FlowSample.
  5. Open FlowSample.bpel file. Click and drag the Flow control from the Palette to the process, between the receiveInput and replyOutput actions. Drag two Sequence controls and two Assign actions to the Flow. Insert another Assign above the replyOutput action.


  6. At the Variables view, click on the Add(+) symbol to add two new variables. Name them as flow1 and flow2.


  7. Click on the variable flow1, in the Properties view, select Details→Browse. Select the type of this variable is {http://www.w3.org/2001/XMLSchema}string. Keep the Namespace mapping as ns1. Select Ok.


  8. Select the variable flow2 and set its type as ns1:string.
  9. Click on the Assign action in the Sequence1, in its Properties view, select Details→New. Assign the fix value “ is executed by the flow 1” to the variable flow1.


  10. By the same way, at the Assign1 action, assign the string “ and the flow 2.” to the variable flow2.
  11. At the Assign3 action, add the expression concat($input.payload/tns:input,$flow1,$flow2) to the variable output→payload→result. A pop-up dialog appears, select Yes.


  12. Save the files. Right click on the BPEL_Flow/bpelContent folder, select New→Others→BPEL 2.0→Apache ODE Deployment Descriptor. Click Next. Verify that the name of BPEL Project is /BPEL_Flow/bpelContent. Click Finish.
  13. Open the deploy.xml file. And select the Associated port with the Partner Link client is FlowSamplePort.
  14. 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_Flow in the Available projects box and click Add. Then, click Finish.
  15. Start the ODE server and use the Eclipse's Web Services Explorer to test our application. If you deploy the process successfully, you will see the result like the following:


  16. Done.

Exercices

  1. Create a BPEL process using Flow to compute the formula: f=(a+b)*(a-b) with a, b are integers.
teaching_assistant/bpel/bpel_structured_activities_-_flow.txt · Last modified: 2014/04/14 09:13 by IT Courses (NNC)
Back to top
CC Attribution-Share Alike 4.0 International
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0