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 3. Design How to Start the Business Process

In this step, you begin the design of the Resolution Approval business process. Specifically, you design how the business process is started at run time.

To start this step, you design the Start node in your business process to receive a Bug Resolution message from a client—the receipt of this message is the trigger that starts the business process.You then create a variable to hold the incoming message.

In Design View, interactions between a business process and a client application are represented by Client Request and Client Response nodes. In this tutorial, you add a Client Request node to your business process and subsequently create the code on this node to handle the receipt of a message from a client.

Complete the following tasks to design the Client Request node that starts your business process:

 


Create a Start Node in Your Business Process

In Step 2. Create Your Application, you created a business process in the Worklist Tutorial application. This step begins the design of that business process with the bug tracking business logic.

  1. With the Worklist_Tutorial open in WebLogic Workshop, double-click ResolutionApproval.jpd on the Application panel. The business process is displayed in the Design View.

  2.  
  3. Rename the business process to better represent its function:
    1. If the name (process) is not highlighted , click process to highlight it.
    2. Press F2 and enter ResolutionApproval as the name of the node, then press Enter on your keyboard.
    3. The business process in Design View is named ResolutionApproval to match the name you gave the JPD file in the Application tab.


       

 


Design the Communication Between a Client and the Business Process

In this step, you set up the communication between a client and the business process. To do so, complete the steps in the following sections:

To Design Your Client Request Node

Designing your Client Request node includes creating a method and parameters that your client uses to trigger the start of your business process, plus designing the logic for handling the receipt of a request from a client.

  1. In Design View, double-click the empty Starting Event target to display the Start node builder. The node builder shows the following:

  2.  

    Note: Node builders provide a task-driven user interface that helps you design your the communication between a business process and its clients and other resources.

  3. Select Invoked via a Client Request.
  4. To close the node builder, click X in the top right-hand corner. The empty node that was associated with the Start node is now populated with a Client Request node.
  5. Rename the Client Request node.
    1. Click Client Request, then press F2.
    2. Enter Receive Resolution to replace the name Client Request for the node.
    3. Press Enter on your keyboard. Your business process should now resemble the following figure:

    4.  
  6. Double-click the Receive Resolution node to invoke the node builder, as shown in the following figure:

  7.  

To Specify General Settings

The following steps describe how to specify the method exposed by your business process to clients—clients invoke this method to start and make requests on your business process.

  1. In the Method Name field on the General Settings tab, change the default method name from clientRequest to receiveResolution.
  2. Note: When you make your business process available as a service, the name you assign to a method on a Client Request node is the name of the method that is exposed via the Web Services Description Language (WSDL). In general, we recommend that you define a name that is representative of the service offered by your business process.

  3. Specify a data type for the parameter to your receiveResolution method:
    1. On the General Settings tab, click Add. A panel, which shows the data types you can use is displayed:

    2.  

      The Bug Resolution message from clients is an XML message. Therefore, we are concerned with XML Types at this node.

    3. If necessary, select XML. The panel is populated with a list of XML Schema files (Typed XML) and a list of Untyped XML objects available in your project.
    4. Note: Remember that you added the required XML Schemas as you built the Receive Resolution Business process in Create the Tutorial Schemas.

      In this step, you will use the BugResolution.xsd to specify the structure of documents that clients can send to start your business process.

    5. In the list of XML Types, click the + associated with BugResolution.xsd.
    6. A graphical representation of the XML Schema defined by BugResolution.xsd is displayed in the data types panel.

    7. Click the bug-resolution node. (It represents the parent element in your XML document.) The Type field is populated with the XML type: com.bea.wliWorklistTutorial.bugResolution.BugResolutionDocument.

    8.  
    9. In the Name field, replace the default parameter name (x0) with resolutionXML.
    10. Click OK. The parameter specifications you made is displayed in the General Settings tab in the node builder; the parameter type is BugResolutionDocument and the parameter name is resolutionXML.

    You have now specified the method exposed to clients by your business process. Messages from clients are expected to be typed XML. This means that the messages received from clients must contain XML that is valid against an XML Schema (in this case, BugResolution.xsd).

To Specify Receive Data

  1. Click the Receive Data tab. This tab allows you to specify a variable to which a Bug Resolution message received from a client is assigned at run time. By default, the Receive Data tab opens on the Variable Assignment panel.
  2. Receive Data tabs have two modes:

    In this tutorial, we use the Variable Assignment mode because we want to assign the XML message received from the client directly to a variable of the same data type. Specifically, you create a variable of typed XML (BugResolutionDocument) to which your business process assigns the incoming Bug Resolution from clients.

  3. Under Select variables to assign, click the arrow in the drop-down list and select Create new variable...

  4.  
  5. In the Create Variable dialog box, take the following steps:
    1. In the Variable Name field, enter resolutionXML.
    2. In the Select Variable Type field, make sure that the Variable type field shows the following:
    3. com.bea.wliWorklistTutorial.bugResolution.BugResolutionDocument

      If the Variable Type is not correct, in the list of XML Types, select bug-resolution element under BugResolution.xsd.

    4. Click OK. Your new variable is created and displayed in the Receive Data tab. Note that in the Data Palette, the resolutionXML variable is also listed as an XML variable.

    Both tabs in the node builder (General Settings and Receive Data) are marked complete .

  6. To close the Receive Resolution node builder, click the X in the top right-hand corner.
  7. This step completes the design of the Start node for your business process.

You have now completed the design of how the business process is started at run time. To begin integrating your business process with a user using a Worklist control, proceed to Step 4. Create Task and Assign to User.

 

Skip navigation bar  Back to Top Previous Next