- Overview of this exercise
- BPEL Designer in JDeveloper
- Partner Link
- Process Activities - Receive, Invoke, Assign
- Data Transformation
- Compilation
- Deployment
- Accessing Enterprise Manager
- Creation of Test Suite
We will create a very simple BPEL process. The process does not orchestrate any services. It just takes an input from the client and transforms it and sends it back as a response.
Example
Input = "Hello"
Output = "Hello CrystalTrain"
Creation of BPEL Process
This involves the following steps
- Creation of Application
- Creation of Project
- Data Transformation
- Compilation, Deployment and Testing
This prompts you to create a BPEL Process
The default process comprises of the following
Below is the design view of the process
Let us take a look at the Receive BPEL Activity. It receives the request from the client and holds the payload of the request in the inputVariable.
Let us take a look at the Reply BPEL Activity. It sends a response back to the client with the data stored in outputVariable.
Our intent is to modify the message received from the client. This is stored in inputVariable.
This can be done in Assign BPEL Activity as can be seen below.
Drag the Assign BPEL Activity that is avalable in the ComponentPalette>BPEL Activities and Components
Drag and Drop the Assign BPEL Activity in the highlighted circle in between Receive and Reply Activities
Now edit the Assign Operation.
In General Tab, Rename it to "TransformMessage"
In Copy tab,
You will see "Create Insert-After Operation" window
In the left hand side pane, select "Expression" as the Type
Now using "XPath Expression Builder", modify the inputVariable as seen below.
Assign the transformed value to the outputVariable
Build and Deploy
Save the project.
Right click on the project and make "HelloWorld.jpr". This will compile the project and output any errors to the log window.
Now right click on the project and select Deploy>HelloWorld>to Crystal
Note : Your ApplicationServer connection in the IDE should be up.
Accept the default values in "SOA Deployment Configuration Dialog".
Enter the domain credentials when asked.
Check the Deployment log to see that the status of the deployment.
Testing the BPEL Process
Go to EnterpriseManager at http://localhost:7001/
After entering your credentials you will be taken to the Home page (The login takes a looooong time)
To the left side, you will see
Click on the "Test" button
Enter the Input now
The response looks as follows
As show above, click on "Launch Message Flow Trace" to see the Audt Trail, Flow, XML from the request till the response.
Click on "Simple Process" to view the Flow Trace.
See below for the Audit Trail of this instance of the process.
Select the "Flow" tab to see the flow of request throgh the process actvities
Now, since you have successfully created your first BPEL process, start playing with the BPEL Designer and the EnterpriseManager. Make as many mistakes as possible and try to figure out the resolution for each. Be BOLD and try out the following. The more mistakes you make now the less you will make in future.
- In the BPEL Designer in JDeveloper, view the Source of the .bpel file and see if you can make any sense of it.
- Remve the expression from the Assign activity and try to build the project. See the compilation errors.
- Open the logs at C:\oraclesoa\user_projects\domains\crystal_domain\servers\soa_server1\logs to familiarise yourselves.
- Go to the Design mode and edit the Assign process activity and change the expression value. Save the changes and deploy it. Follow the steps shown in the figure below.
It 's excellent posting and useful for developers
ReplyDeleteOracle SOA Online Training