Practices for Lesson 4 Practices Overview
Practice 4-2: Test a Composite Application Overview
In this practice you create a test instance of the HelloWorldComposite application, examine the application Flow Trace pages to track the message flow through the composite application, and familiarize yourselves with application and component metrics displayed in the Oracle Fusion Middleware Control console Web pages.
Assumptions
You have successfully deployed the HelloWorldComposite application as described in the previous practice.
Tasks
Your tasks here are to:
• Initiate a composite application and view the response message.
• Examine specific details about the composite application by using its Flow Trace pages.
Initiate a Composite Application
1. On the HelloWorldComposite [1.0] home page, click Test.
Note: If the HelloWorldComposite [1.0] home page does not already displays and you are logged into Oracle Fusion Middleware Control, expand the SOA > soa-infra > default node in the Farm navigation tree, and then click the HelloWorldComposite [1.0] entry.
2. On the Test Web Service page, accept all default settings. However, you must provide an input string for the test. To provide the input string and test the service:
a. On the Test Web Service page, scroll down until you find the Request tab.
b. On the Test Web Service page > Request tab page, scroll down to locate the Input Arguments section with the default Tree View mode. In the request > input field, enter the value: First test, and click Test Web Service.
3. On the Test Web Service page, the page is refreshed with the Response tab becoming active and showing the response message “Mediator sends: BPEL Hello: Mediator recv:
First test” in the Web page, use the following image as a guide:
Oracle University and (Oracle Corporation) use only.
Note: The response message echoes the original input message with some addition pre-pended text that modifies the initial message for the response. You could trace the changes to the message by using the composite application Flow Trace pages.
Examine the Composite Application Flow Trace Pages
4. On the Test Web Service > Response page, note the Response Time (ms) in milliseconds and click the Launch Message Flow Trace link.
5. By using information on the main Flow Trace page as shown in the following image:
Oracle University and (Oracle Corporation) use only.
Note: You may need to refresh the page by using the refresh icon (in the top right corner of the page) to ensure you can see the results represented in the image above.
Answer the following questions:
a. Given the fact that the HelloWorldComposite service uses a synchronous (request-response) style message exchange, what is the order of the message flow through the composite application components?
Answer: The sequence of the message flow from the service entry point and back to the client (in this case the Web browser) is:
1) HelloMediator, which receives the input message from the Web service entry point and prefixes the text “Mediator recv” to the input message
2) Then HelloBPEL, which adds the text “BPEL Hello” to the start of the message received from the HelloMediator component
3) Finally BPEL returns its response to the HelloMediator, which adds the “Mediator sends” text to the front of the entire message before it is returned to the client (the Web browser).
Note: In summary, for a synchronous exchange the message flow is represented by traversing down the Flow Trace tree, and back up to the initiating component (which depends on how the composite application entry point is wired to the first component in the application).
To drill down into each component in the flow, you can click the HelloMediator link in the Instance column of the Flow Trace tree to examine the Audit Trail for that
component. Similarly, you can click the HelloBPEL link to examine the Audit Trail (or visual Flow) of the BPEL process component.
The example used here is a simple use case, and keep in mind that a Flow Trace tree may represent a more complex message flow than the example used in this practice.
The message flow pattern for an asynchronous exchange pattern is entirely different because it may be a one-way or a two-way operation.
b. Which component takes up the most processing time?
Note: The results for your test example may (and can) vary from the results presented in this document. The purpose of this question is to ask you to examine specific
Oracle University and (Oracle Corporation) use only.
information that can be viewed and monitored about a composite application and its components.
Hints: To determine the answer for this questions perform the following tasks:
1) Click the HelloWorldComposte [1.0] entry in the Farm navigator frame to display the Dashboard tab page on the composite application’s home page.
2) On the HelloWorldComposte [1.0] > Dashboard tab page, scroll down to view the Component Metrics and Services and References sections. Take note of the
“Average Processing Time (secs)” column for the HelloMediator_ep (in the Services and References section). Use the following image as a guide:
Note: the “Average Processing Time (secs)” value for the document example is 0.125 seconds or 125 milliseconds.
3) On the HelloWorldComposite [1.0] > Dashboard tab page, in the Component Metrics section, click the HelloMediator link to drill down and view the details in its Routing Statistics section. Expand the Route Target section as well and observe the values for Average Processing Time and Average Invocation Time in each
section (all in millisecond values). Use the following image as a guide:
Oracle University and (Oracle Corporation) use only.
Note: The example shows that the Mediator component averaged 0.109
milliseconds most of which was consumed by the service invocation. Return to the HelloWorld Dashboard page by clicking the HelloWorldComposite [1.0] Locator link in the top left corner of the page.
4) On the HelloWorldComposite [1.0] > Dashboard tab page, in the Component Metrics section, click the HelloBPEL link to drill down and view the details of the BPEL component. Comparing to the HelloMediator component, which component consumes more time?
Note: The Average Execution time in the BPEL component does not exceed 0.016 milliseconds.
5) The answer for the execution sequence shown in this material indicates the HelloMediator component took a little more time. Your answer may be different and the timings are likely to be different.
Note: One possible reason why the HelloMediator component takes a bit more time is because of the XSL Transformations that it has to perform on the request and response message data. Whereas the HelloBPEL process roughly copies received data and additional text to the response, and lacks complexity. In the real
Oracle University and (Oracle Corporation) use only.
world it is more likely that a BPEL component will be consuming the more of the processing time as BPEL components usually do much more work.