Skip navigation.

Tutorial: Building a Worklist Application

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents View as PDF   Get Adobe Reader

Step 2. Create Your Application

In this step, you create a WebLogic Workshop application. This application holds the files you create as you work through this tutorial. Specifically, you create the starting application and add the XML Schema files that you need to build the bug tracking application. In subsequent steps, you build the business process that orchestrates the resolution of a bug in the SoftCo bug tracking system. The tasks in this step include:

 


Start WebLogic Workshop

Complete the following steps to start WebLogic Workshop and select the integration server:

  1. Start WebLogic Workshop, as described in How Do I: Start WebLogic Workshop? in the WebLogic Workshop Help.
  2. If a server error dialog box appears, click Fix; otherwise, go to Create a WebLogic Workshop Application.

  3.  
  4. After the Application Properties screen appears, click Browse beneath the Server Home Directory list box.
  5. In the Look In drop-list navigate to the following directory:
  6. BEA_HOME\userprojects\domains\worktutorial
  7. Select config.xml, then click Open. The Application Properties screen shows the following:

  8.  
  9. Click OK.

 


Create a WebLogic Workshop Application

Complete the following steps to create a WebLogic Workshop application in which to build the Bug Resolution business process:

  1. Close any open applications. From the WebLogic Workshop menu, click File—>Close Application.
  2. From the WebLogic Workshop menu, click File—>New—>Application. The New Application dialog box is displayed.

  3.  
  4. In the New Application dialog box, select Process in the left pane, and select Process Application in the right pane.
  5. In the Directory field, select the directory in which you want to create your application. The paths used in the remainder of this tutorial assume that the application is created in BEA_HOME\user_projects\applications\. If you create the directory in a different location or use another name, adjust the instructions accordingly.
  6. In the previous paragraph, BEA_HOME is the directory in which you installed WebLogic Platform.

  7. In the Name field, enter Worklist_Tutorial.
  8. Ensure that the server for the worklist domain you created is selected. If not, click the arrow in the Server field to display a drop-down list of servers, then choose the worklist integration domain. For example, if you created a new integration domain in the default location, the path to the integration server is as follows:
  9. BEA_HOME\user_projects\domains\worktutorial
  10. Click Create.
  11. Your Worklist Tutorial Application is created and displayed in the Application panel.

    Note: If the Application panel is not visible in WebLogic Workshop, choose View—>Application from the menu bar.


     

    The Application panel displays a hierarchical representation of the files and resources available in your application. The components in this tutorial include the following:

    Worklist_Tutorial—The application folder.

    Schemas—A Schemas project that contains the system XML Schemas used in the application.

    Worklist_TutorialWeb—A Web application project folder. Every application contains one or more projects. Projects represent WebLogic Server Web applications. In other words, when you create a project, you are creating a Web application. (The name of your project is included in the URL your clients use to access your application.)

    Web Applications are J2EE deployment units that define a collection of Web resources such as business processes, Web services, JSPs, servlets, HTML pages, and can define references to external resources such as EJBs.

    Note: The Web application project folder is named by appending Web to the name you gave your application.

    processes—Located in the Worklist_TutorialWeb folder. This is the default folder created when you create a new application—your project files are located in this folder. By default, one file is created in a new Process application: process.jpd.

  12. Rename the processes folder and the process.jpd file.
    1. In the Application tab, click the + beside the Worklist_TutorialWeb folder to view the processes folder.
    2. Right-click the processes folder and select Rename from the drop-down menu.
    3. Enter bugtracking as the new folder name, and press Enter on your keyboard.
    4. Open the bugtracking folder, then right-click process.jpd and select Rename from the drop-down menu.
    5. Enter ResolutionApproval.jpd as the new name, and press Enter on your keyboard.
    6. Double-click the ResolutionApproval.jpd.
    7. The Application tab and the Design View now resemble the following figure:


       

 


Create the Tutorial Schemas

In this tutorial, XML schemas are used to validate the XML data that is exchanged between the Worklist and the Bug Resolution business process. This section describes how to create the schemas in the Schemas project in your Worklist Tutorial application.

To Create the Tutorial Schemas

  1. In the Application tab, right-click the Schemas folder.
  2. From the drop-down menu, select New—>XML Schema. The New File dialog box is displayed.
  3. Enter BugResolution.xsd as the name of your schema file, and click Create. The BugResolution.xsd file is created and displayed in the Application panel.
  4. When you create an XSD, a build of the Schemas project folder is triggered. The build verifies that the schema file is well formed. It also verifies that the element and attribute names in the XML Schema do not conflict with the XSD files that are in the Schemas project. For more information about what gets generated when you import schemas, see Importing Schemas in the Guide to Data Transformation in the WebLogic Workshop Help.

  5. Copy the contents of Listing 3-1 and replace the default schema file in the Source View.

Listing 3-1 BugResolution.xsd

<?xml version="1.0"?>
<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:tns="http://www.bea.com/WLIWorklistTutorial/BugResolution.xsd"
    targetNamespace="http://www.bea.com/WLIWorklistTutorial/BugResolution.xsd">
    <xs:element name="bug-resolution" type="tns:bug-resolution-type"/>
        <xs:complexType name="bug-resolution-type">
      <xs:sequence>
        <xs:element name="description" type="xs:string"/>
        <xs:element name="resolution-code" type="xs:string"/>
        <xs:element name="resolution-text" type="xs:string"/>
        <xs:element name="bug-creator" type="xs:integer"/>
      </xs:sequence>
        </xs:complexType>
</xs:schema>
  1. Repeat steps 1 through 4, but this time create an XML schema file named ResolutionAppeal.xsd. Copy the contents of Listing 3-2 and paste it into the Source View to create a the ResolutionAppeal.xsd schema file in your Schemas folder.

Listing 3-2 ResolutionAppeal.xsd

<?xml version="1.0"?>
<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:tns="http://www.bea.com/WLIWorklistTutorial/ResolutionAppeal.xsd"
    targetNamespace="http://www.bea.com/WLIWorklistTutorial/ResolutionAppeal.xsd">
        <xs:element name="resolution-appeal" type="tns:resolution-appeal-type"/>
                <xs:complexType name="resolution-appeal-type">
            <xs:sequence>
                <xs:element name="appeal-text" type="xs:string"/>
                <xs:element name="resolution-code" type="xs:string"/>
                <xs:element name="resolution-text" type="xs:string"/>
            </xs:sequence>
                </xs:complexType>
</xs:schema>
  1. Select File—>Save All to save your work.
  2. This completes the set up of your new application. To begin the work of adding the business logic to the Resolution Approval business process (ResolutionApproval.jpd), proceed to Step 3. Design How to Start the Business Process.

Note: Recall from Step 3 that when you create an XSD, a build of the Schemas project folder is triggered.

 

Skip navigation bar  Back to Top Previous Next