Step 15: Run and Test the Request Quote Business Process With the Quote Validation Service
In the same way you ran and tested the business process you created when you finished Part III of the tutorial, you can run and test the functionality of the business process you created in Part IV using WebLogic Workshop's browser-based interface.
To Launch the Test Browser
- Ensure that the RequestQuote business process is displayed in the Design View.
- If the WebLogic Server is not already running, from the WebLogic Workshop menu, choose Tools —> WebLogic Server —> Start WebLogic Server.
If WebLogic Server is running, the following indicator is visible in the status bar at the bottom of the WebLogic Workshop visual development environment:
- From the WebLogic Workshop menu, click Build —> Build Application. WebLogic Workshop builds your application.
- Click the Start button
on the menu bar to run your business process. The Workshop Test Browser is launched, through which you can test your business process using sample input values.
- If necessary, open the Test Form page.
You can enter data that your business process can receive as part of a client request directly on the Test Form page. Alternatively, you can browse your file system and upload a file which contains your test data. In this case, test XML data are provided in the tutorial application for you to use.
- Click Browse beside the xml requestXML (file value) field to open the file browser.
- Select QuoteRequest_a.xml from the testxml folder in your project (Tutorial_Process_ApplicationWeb\requestquote\testxml\QuoteRequest_a.xml).
Note: QuoteRequest_a.xml contains data that specify an order for a quantity of widgets of 400 or more. This data is designed to fail the validation check carried out by the ValidateOrder business process.
- Click the button labeled with the method name on your business process (quoteRequest) to invoke the method. The Test Form page refreshes to display a summary of your request parameters and the response from the external services in the Message Log:
The message log reflects the order of execution of methods in your RequestQuote business process and the services it calls. For the scenario logged in the preceding figure, note the following entries in the message log:
- quoteRequest—Was called by the client (you in this test instance) to start the RequestQuote business process.
- mbPubValidate.publish—The publish node in your business process published the Request for Quote to the ValidateOrder Message Broker channel.
- taxCalcProcess.requestTaxRate—The RequestQuote business process continues to execute. In this case, it calls the requestTaxRate() method on the tax calculation business process before it is interrupted by the mbSubValidate.onMessage message.
- mbSubValidate.onMessage—In this scenario, when the ValidateOrder process determines that the Request for Quote is invalid, it publishes a message to the StopQuote Message Broker channel. Your RequestQuote business process subscribes to the StopQuote channel—when RequestQuote receives the message, it executes the logic in the OnMessage path, sends a response to the client that sent the Request for Quote (see callback.denyQuote in the Message Log in the preceding figure), and terminates the business process.
- taxCalcProcess.returnTaxRate—The business process receives a response from the tax calculation service (returnTaxRate()) before it executes the logic in the OnMessage path. (Remember that the after execute property on the OnMessage path specifies that the process engine terminates the business process after execution of the message path. In other words, in this case, the returnTaxRate call is received as part the normal flow of execution because the logic in the OnMessage path is not yet executed.)
- callback.denyQuote—Your RequestQuote business process sends a denyQuote message to the client that sent the Request for Quote.
- Instance instanceID is finished—The quote is determined to be invalid by the ValidateOrder service. Therefore, further processing of the quote via the RequestQuote business process is not required. After the callback.denyQuote message is sent to the client from the message path, the business process is terminated.
instanceID represents the ID generated when the first method in your business process was called.
Note: For this business process, the first and second messages in your Message Log are quoteRequest and mbPubValidate.publish. However, the order of subsequent messages can vary depending on your system. For the case shown in the preceding figure, the asynchronous message (taxCalcProcess.requestTaxRate) was sent to the tax calculation service before the interrupt message (mbSubValidate.onMessage) was received from the Stop Quote Message Broker channel. In addition, a response message (taxCalcProcess.returnTaxRate) was received from the tax calculation service before the business process was terminated as a result of receiving the mbSubValidate.onMessage message.
You can click any log entry to see the details of that interaction in the right panel of the Test Form.
To Monitor Instances of Your Business Process
You can use the WebLogic Integration Administration Console to monitor your processes.
- Invoke the Administration Console in one of the following ways:
http://localhost:7001/wliconsole
The default username is weblogic and the password for the sample integration server is also weblogic.
- The WebLogic Integration Administration Console opens on the Process Instance Details page.
- Click Process Instance Monitoring to open a page that allows you to:
- View process instance statistics, including the number of instances in each state (running, suspended, aborted, and completed).
- View the summary or detailed status for selected instances.
- Suspend, resume, or terminate, selected instances.
If you invoked the Process Instance Monitoring page after running the RequestQuote business process, as described in this step, three business processes are listed in the Process Instance Statistics page: RequestQuote, TaxCalcProcess, and Validate Order.
- Click the name of any business process in the Display Name column to go to a page that displays more information about that process. For example, to learn more about the instance of the ValidateOrder business process that ran in your test:
- Click ValidateOrder in the Display Name column on the Process Instance Statistics page displayed in the preceding figure.
- A Process Instance Summary page is displayed. This page lists all the instances of the ValidateOrder business process that ran or are running.
- To display a page which contains more details about any instance, click the Instance ID in the ID column on the Process Instance Summary page.
- On the Process Instance Details page, click Graphical View to display a graphical representation of this instance of the ValidateOrder business process.
- To display information about the nodes, click each node of the ValidateOrder business process. Note that if you started your RequestQuote business process in the WebLogic Workshop Test Browser with the QuoteRequest_a.xml test data, the ValidateOrder process determines that the order is not valid. In that case, the No path on the Valid Order? Decision node is executed and highlighted in the Process Graph; the Yes path is gray, indicating that this path was not executed for this instance.
To learn more about Process Instance Monitoring in the WebLogic Integration Administration Console, see the Process Instance Monitoring topic in the Administration Console online help.
To Monitor the Message Broker Channels
You can use the WebLogic Integration Administration Console to monitor the Message Broker channels in your system, specifically the name, status, and the number of subscribers for each channel.
Open the Channel Summary List page in one of the following ways:
- From the Administration Console's Home page, click Message Broker:
- In the left pane of any Process Instance Monitoring page, click Message Broker:
The Channel Summary List page is displayed. The list displays all the channels in your system (in the samples integration domain in this case). Note that the TutorialPrefix/Tutorial/StopQuote and TutorialPrefix/Tutorial/ValidateOrder channels used by your business process in Part IV of the tutorial are displayed:
Note the following information about the Message Broker channels:
- The Message Type for each channel is displayed: String for the StopQuote channel and XML for the ValidateOrder channel.
- The Message Count records the number of messages routed through the channels. These numbers reflect the number of times you ran the business process from the Test Browser.
- The Subscriber Count displays the number of subscribers to a particular channel that are deployed on your system. If you have one tutorial application deployed on your system, you should see a Subscriber Count of 1 for each of the StopQuote and ValidateOrder Message Broker channels.
- The Dead Letter Count reflects the number of messages sent to the dead letter queue since the count was last reset. When the Message Broker is unable to determine the URI to send a message to (that is, no subscribers are found), the message is sent to the dead letter channel that corresponds to the channel type. To learn about the deadletter channels in your WebLogic Integration applications, see Dead Letter Channels in How Do I: Create Message Broker Channels?
To learn more about the Message Broker module in the WebLogic Integration Administration Console, see the Message Broker topic in the Administration Console online help.
Related Topics
Managing WebLogic Integration Solutions at http://edocs.bea.com/wli/docs81/manage/index.html
Running and Testing Your Business Process