Using the two BPEL projects from the Camel SE examples, this tutorial documents the steps to build the PORouter3 example, using a modified Camel router.
This Camel router checks the size of the orderPrice and if less than 500 routes to the file-writing-BPEL, otherwise routes to the database-inserting-BPEL.
- build service units (SUs)
- build “database-insert BPEL” SU
- build “file-write BPEL” SU
- build “route-to-BPELs Camel” SU
- create/configure/build PORouter3 Composite Application (Service Assembly)
- create Service Assembly
- add “route-to-BPELs Camel” SU
- add “database-insert BPEL” SU
- add “file-write BPEL” SU
- build Composite Application project
- add SOAP SU
- connect SOAP to “route-to-BPELs Camel”
- connect “route-to-BPELs Camel” to “database-insert BPEL”
- (skipped)
- connect “route-to-BPELs Camel” to “file-write BPEL”
- rebuild Composite Application project
- Less Than 500 Test
- create testcase
- edit input
- run test and edit captured output
- rerun test
- inspect written file
- Greater Than (or equal to) 500 Test
- create testcase
- edit input
- run test and edit captured output
- rerun test
- inspect database
Notes:
1. FYI, endpoint names are global in Open ESB, so for the sample projects we are using, only one Composite Application can be deployed (and started) at one time, to avoid endpoint-already-in-use kinds of errors. (alternatively, we could change the project names and namespaces in the wsdl to deploy similar Service Units in different Composite Applications at the same time).
2. at step 3, there should be no Composite Applications deployed. Running the test should perform several pre-requisite steps not mentioned explicitly in the tutorial steps, namely: start glassfish if needed, deploy the composite application, and start the Composite Application.
Updated by: Mike Wright on: October 29, 2008