Running and Testing Your Business Process
WebLogic Workshop provides a browser-based interface with which you can test the functionality of your business process. Using this Test View interface, you play the role of the client, invoking the business process's methods and viewing the responses.
This step describes how to test a business process you have created in WebLogic Workshop using the Test Browser tool. It includes the following topics:
Using the Test Browser
To Launch the Test Browser
- On the Application tab, click the business process (JPD file) you want to test.
- If it not already selected, select the Design View tab.
The business process you selected in the Application is displayed in the Design View.
- If 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:
- After the Server is running, from the WebLogic Workshop menu, click Build —> Build Application. WebLogic Workshop builds your project.
- If necessary, correct any errors in the project.
- Click
on the WebLogic Workshop menu bar.
A Web browser is launched to display the Workshop Test Browser, through which you can test your business process using sample input values.
The Workshop Test Browser contains the following tabs:
- Overview—This tab displays public information about your business process. Code in this area is generated automatically and 2-way editing is fully supported in the Process Language. Changes you make here will appear in the Design View.
- Console—This tab displays private information about your business process, such as how services are implemented on the back end, and with what version of WebLogic Workshop it was created. It also displays information about log settings, such as how many log messages to keep and the number of characters after which log entries are truncated.
- Test Form—This tab provides a simple test environment for the public methods of your business process. You can provide parameters for a method and examine its return value. You can also track and test the different parts of a conversation.
- Test SOAP—This tab shows the XML data that is being sent to your business process when you test its XML methods. You can use this page to examine and modify the XML data that is passed to a method of your business process.
- Message Broker—This tab provide a space for you to publish messages to channels available in channel files in your application. It allows you to test your process interactions with asynchronous events and simulate Timer, Email, File, JMS, and other event generators.
- Process Graph—This tab allows you to view an interactive or printable graph of the deployed process type. The graphical view represents your business process and its interactions with clients and resources, such as databases, JMS queues, file systems. It shows the path taken thus far by the business process and provides additional information about the state of each node in the process. If your browser is not already configured with the SVG plug-in when you click this tab, WebLogic Workshop will offer to download and install it for you.
For more information about the different tabs in the Workshop Test Browser, see Workshop Test Browser. For specific information about how to use the Test Form, Message Broker, and Process Graph tabs, see To Test the Public Methods of Your Business Process, To Test a Message Broker Channel, and To View a Process Graph.
To stop the Test Browser, return to WebLogic Workshop and click
on the tool bar.
Warning: As you use the Test Browser, take care to not run very large or data intensive business processes. Doing so may cause the Test Browser to fail.
Testing the Public Methods of Your Business Process
To Test the Public Methods of Your Business Process
- Launch the Workshop Test Browser. (To learn more, see To Launch the Test Browser.)
- If necessary, click Test Form.
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.
- If your client operation accepts input, enter the required information in to the field or fields.
Note: To upload a file to test data, click Browse beside the xml myfile: (file value) field to open the file browser, then select the file that contains the test data you want to use.You can also enter the test data by entering (copy/paste) the content of a file into the field.
- Click the button labeled with your business process's method name to invoke the method with the values you entered. The Test Form page refreshes to display a summary of your request parameters and your business process's response:
- Under Service Request, a summary of the data that was sent by the client (you) when the method was called, including the values of method parameters, is displayed.
- For business processes that involve multiple communications with clients, or communications with resources such as other Web services, the Message Log on the left side of the Test Form page displays an entry for each call to a method or callback so that you can view the data for each. Click any log entry to see the details of that interaction.
- Business Processes participate in conversations with clients. The Test Browser displays the instance ID in the Message Log. Select the instance ID or
to access continue and finish methods in that conversation.
- When the business process finishes, a message similar to the following is displayed in the Message Log:
Instance instanceID is Completed.
In the preceding line, instanceID represents the ID generated when the first method in your business process was called.
- Click the Test SOAP tab.
The Test SOAP tab displays the XML data that is being sent to your business process when you test its methods in the soap body field. You can use this page to examine and modify the XML data that is passed to a method of your business process.
- Click the button with the name of your method to start a new conversation.The Test Form page refreshes to display a summary of your request parameters and your business process's response.
When the business process finishes, a message similar to the following is displayed in the Message Log:
Instance instanceID is Completed.
In the preceding line, instanceID represents the ID generated when the first method in your business process was called
To stop Test View, return to WebLogic Workshop and click
on the tool bar.
Testing a Message Broker Channel
To Test a Message Broker Channel
- Launch the Workshop Test Browser. (To learn more, see To Launch the Test Browser.)
- Click Test Form and enter test data that can be used for to test the public methods that are published on your channel. To learn more, see To Test the Public Methods of Your Business Process.
- Click the Message Broker tab.
The Message Broker test tab is displayed with details of the conversation routed through your channel. The conversation id is displayed in the message log. Click any of the methods displayed in your message log to view details on the right side of the window about the external services communications (callbacks and responses).
Viewing the Process Graph
The Process Graph tab of the Workshop Test Browser provides a SVG graph of your process as it is running. The graph represents your business process and its interactions with clients and resources, such as databases, JMS queues, and file systems.
The interactive instance graph is a fully expanded version of the view provided in the Design View. The interactive process graph requires Adobe SVG Viewer Version 3.0. The first time you open the Process Graph tab, you will be asked if you would like to download the Viewer from the Adobe Web site. You can also download the viewer directly from the Adobe Web site at the following URL:
http://www.adobe.com/svg/viewer/install/main.html
This viewer is not available for some configurations that the WebLogic Platform 8.1 supports. For details, please see "Browser Requirements for the Interactive Graph" in Process Monitoring in Managing WebLogic Integration Solutions at the following URL:
http://download.oracle.com/docs/cd/E13214_01/wli/docs81/manage/processmonitoring.html
For detailed information about the operating systems and browsers WebLogic Platform supports, see BEA WebLogic Platform Supported Configurations at the following URL:
http://download.oracle.com/docs/cd/E13196_01/platform/suppconfigs/index.html
To View a Process Graph
- Launch the Workshop Test Browser. (To learn more, see To Launch the Test Browser.)
- Click the Process Graph tab.
The Adobe SVG Viewer displays the interactive view. The Process Graph Visual cues are provided to indicate node status as described in the following table:
|
And the tracking level is . . . |
|
Has been visited |
Full or Node |
Normal |
Minimum |
Normal |
Is currently executing |
Full or Node |
Highlighted |
Minimum |
Highlighted |
Has not been visited |
Full or Node |
Dimmed |
Minimum |
Normal |
To learn about business process tracking levels, see "Viewing and Changing Process Details" in Process Configuration in Managing WebLogic Integration Solutions at the following URL:
http://download.oracle.com/docs/cd/E13214_01/wli/docs81/manage/processconfig.html
The top panel of the Process Graph tab displays selected process properties. To learn more about the properties displayed, see "Viewing Process Instance Details" in Process Instance Monitoring in Managing WebLogic Integration Solutions at the following URL:
http://download.oracle.com/docs/cd/E13214_01/wli/docs81/manage/processmonitoring.html
- Do any of the following:
- To display node status, click the node. The node name, type, and description are displayed in the Node Info panel. If the tracking level is set to Full, the start time, elapsed time, finish time, and completed visits are also displayed. If the tracking level is set to Node or Minimum, this additional information is not available.
- To scroll the view, press and hold down the Alt key. The cursor changes to a hand
tool. Click and drag to scroll the process graph vertically or horizontally.
- To zoom in, press and hold down the Ctrl key. The cursor changes to a zoom in
tool. Click to zoom in.
- To zoom out, press and hold down the Ctrl+Shift keys. The cursor changes to a zoom out
tool. Click to zoom out.
- To change to a printable view, click Print View. The process graph is displayed as a PDF.
To stop the Test Browser, return to WebLogic Workshop and click
on the tool bar.
Understanding the Service URL
In the Test browser, a URL is displayed in the upper-right corner of the Test Form tab. The URL you see when you launch Test View for your business process should be similar to the following URL:
http://localhost:7001/samples/myBusinessProcess.jpd
In the preceding line:
- http://locahost:7001/—Represents the machine name and its default listening port (7001). Specifically, this means that the request (the call to the business process) from your Test browser is intercepted by WebLogic Server on port number 7001 of your local machine.
- samplesWeb/— This refers to the Web application of which the service is a part. When you create a project in WebLogic Workshop, you are also creating a WebLogic Server Web application. The project name becomes part of the URL for all Web services in that project. Keep that in mind when naming new projects so that the resulting Web service URLs are meaningful and appropriate.
- myBusinessProcess.jpd—The filename of the business process JPD file. WebLogic Server is configured to recognize the JPD extension and respond appropriately by serving the request as a Web service—rather than, say, an HTML page or a JSP.
Related Topics
How Do I: Test A Web Service Using WebLogic Workshop's Test View?