Guide to Building Business Processes

     Previous  Next    Open TOC in new window  Open Index in new window  View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Interacting With Clients

Clients invoke business processes to perform one or more operations. Business Processes expose their functionality through methods.

Client Request nodes represent the points in a business process at which a client invokes a method on the business process and possibly sends input to the business process. The names you assign to methods on Client Request nodes correspond to the names of the methods that are exposed via the Web Services Description Language (WSDL) when you make your business process available as a Web service.

Note: The nodes in a business process are always communicating asynchronously with clients, except for when you invoke a Start node of a business process by using the Client Request with Return option or configure the starting event on a Message path to wait for a Client Request with Return. To learn more about using the Client Request with Return node, see Client Request with Return Start (Synchronous).

Client Response nodes represent the points in a business process at which business processes send messages to clients.

This section describes how to add nodes to your business process and design the interactions of business processes with clients. It includes the following topics:

 


Receiving Messages From Clients

Client Request nodes provide a way for a client to make a request to a business process.

The tasks you must complete to design a Client Request node include:

Create a Client Request Node in Your Business Process

  1. On the Package Explorer pane, double-click the business process (Process.java file) you want to design.Your business process is displayed in the Design view.
  2. If the Node Palette is not visible in Oracle Workshop for WebLogic, choose Window > Show View > Node Palette from the Oracle Workshop for WebLogic menu.
  3. Drag and drop Client Request from the Node Palette onto the business process in the Design view, placing it on the business process at the point at which you want to design the client interaction.
  4. Note: As you drag your selection onto the Design view, targets appear on your business process. Each target represents a location in the flow where you can place the node. As you drag the node near a location, the target is activated and the cursor changes to an arrow . When this happens, you can release the mouse button and the node snaps to the business process at the location indicated by the active target. If the location you chose is not a valid one, an will appear next to your node. If you place your cursor over this icon, Oracle Workshop for WebLogic will display a message about the violation.

    The Client Request node is displayed in your business process in the Design view.

Note the following properties for the Client Request node:

Design Your Client Request Node

After you add any node to your business process, you can design its properties and behavior by invoking the node builder and completing the tasks appropriate for that node. The following sections describe how to complete the design of interactions with clients in your Client Request nodes:

To Specify General Settings
  1. Double-click the Client Request node in your business process.
  2. The node builder is displayed. It contains two tabs: General Settings and Receive Data.

  3. In the General Settings tab, enter a name in the Method Name field to specify the name of the method on this Client Receive node.
  4. The name you assign to the method is the name of the method that is exposed via the Web Services Description Language (WSDL) when you make your business process available as a Web service. To learn more about how the methods in your project are exposed to clients, see Components of Your Application.

  5. In the General Settings tab, click Add to select the type and format of the data your Client Request node expects to receive from clients (that is, the data type for the method parameter). The node builder displays the following types of data:
    • Simple Types
    • Lists Java primitive and classes data types.

    • XML Types
    • Lists the XML Schemas that are available in your business process project and the untyped XMLObject and XMLObjectList data types. To learn how to import a Schema into your project, see Creating and Importing Schema Files.

    • Non-XML Types
    • Lists the Message Format Language (MFL) files available in your business process project and the untyped RawData data type. Oracle WebLogic Integration uses a metadata language called Message Format Language (MFL), based on XML, to describe the structure of non-XML data. Every MFL file available in your project is listed in Non-XML Types. Note that an XML Schema representation of each MFL file is built by Oracle Workshop for WebLogic and is also available in the XML Types listing.

      For more detailed descriptions of the data types, see Working with Data Types .

  6. Click OK.
  7. The parameter specifications you made is displayed in General Setting tab in the node builder.

    Note: If you selected a typed XML or typed non-XML data type in the previous steps, you can select the Validate box to have the incoming message validated against your specified schema before the message is received by the node. For more information about schemas, see Validating Schemas and Creating and Importing Schema Files.
To Specify Receive Data
  1. Click the Receive Data tab.
  2. This tab allows you to define one or more variables to hold the data your business process receives from clients.

  3. If the data types of your method parameters and the data type of the variables you are going to use match, you can map your variables to the corresponding methods directly.
    1. If not already selected, select the Variable Assignment option. By default, the Receive Data tab opens on the Variable Assignment panel.
    2. The Client Sends field is populated with the parameter(s) you specified on the General Settings tab.

    3. If you want to assign a variable that you already created in your project to the method parameters, select it from the drop-down menu.
    4. If you want to create a new variable and assign it to the method parameter, then under Select variable to assign, click the arrow and select Create new variable..., then follow the instructions in To Create a New Variable in the Node Builder.
    5. If the data types of your method parameters and your variables match, click Ok. Your new variable is created and displayed in the Receive Data tab.
  4. If the data types of your method parameters and your variables are different, you can use the Transformation tool included in Oracle Workshop for WebLogic to map between heterogeneous data types. The data transformations you create using the tool are stored in data transformation files. When data transformation files containing your data transformations are built, they are built as controls. The controls expose transformation methods, which business processes invoke to map disparate data types.
    1. To create a transformation map, select the Transformation option.
    2. The node builder transformation screen is displayed with the data types expected by your method displayed in the Client Sends pane.

    3. In Step 1 of the Transformation option window, click Select Variable to select one or more variables to be used.
    4. Note: To remove a variable from the node builder pane, select the variable in the list and then click Remove. This action removes the variable from the node builder, not from your business process. The variable is still included in your business process; it is visible in the Variables pane in the Data Palette.

      When designing a business process, you use a Transformation to create maps between disparate data types. Your project must contain an instance of a Transformation control for you to create the map.

    5. If an appropriate instance of a Transformation control is not available in your project, you can create a new one by clicking Create Transformation to invoke the Transformation XQuery Mapper tool window. This automatically applies changes to the builder and opens a transformation editor in a new window.
    6. The mapping tool displays a representation of the source schema and target schema in Source and Target panes. You can create a map between the data type of the method parameter and the data type of the variable, or variables, to which you assign the data. To learn how to create and test a map using the mapping tool, see Guide to Data Transformation.

      Note: To return to node builder, in the Package Explorer pane, double-click the Process.java file.
    7. If the appropriate instance of a Transformation control is available in your project, click Advanced.... The Advanced Option window opens. In this window, select the Control and Method. If the method arguments and return type matches those as selected in the Transformation pane, click OK.
    8. Close the Transformation tool by clicking Ok.
  5. To close the node builder, click Close.
  6. In the Design view, the icon indicates that you completed the configuration and design of this node.

Note: To learn about changing the configuration you design in the Transformation pane of a node builder, see About Editing Node Configurations.
  1. To save your work, select File > Save.

Naming the Methods on Client Request Nodes

The names that you assign to methods on your Client Request nodes correspond to the names of the methods that are exposed via the Web Services Description Language (WSDL) when you make your business process available as a Web service. The name must be a valid Java class name.

Related Topics

XQuery Statements

Handling Exceptions

Client Operations and Control Communication Methods

Adding Message Paths

Adding Timeout Paths

 


Sending Messages to Clients

Client Response nodes provide a way for a business process to send messages to clients. The tasks you must complete to design a Client Response node include:

Create a Client Response Node in Your Business Process

  1. On the Package Explore pane, click the Process.java file you want to design.Your business process is displayed in the Design view.
  2. If the Node Palette is not visible in Oracle Workshop for WebLogic, choose Window > Show View > Node Palette from the Oracle Workshop for WebLogic menu.
  3. Click Client Response in the Node Palette.
  4. Drag and drop the Client Response node onto the business process in the Design view, placing it on the business process at the point in your business process at which you want to send a message to a client.
  5. Note: As you drag your selection onto the Design view, targets appear on your business process. Each target represents a location in the flow where you can place the node. As you drag the node near a location, the target is activated and the cursor changes to an arrow . When this happens, you can release the mouse button and the node snaps to the business process at the location indicated by the active target. If the location you chose is not a valid one, an will appear next to your node. If you place your cursor over this icon, Oracle Workshop for WebLogic will display a message about the violation.

    The Client Response node is displayed in your business process in the Design view.

Note the following properties for the Client Response node:

Design Your Client Response Node

The following sections describe how to complete the design of interactions with clients in your Client Response nodes:

To Specify General Settings
  1. Double-click the Client Response node in your business process.
  2. The node builder is displayed. It contains two tabs: General Settings and Send Data.

  3. In the General Settings tab, enter a name in the Method Name field to specify the name of the method on this Client Response node.
  4. In the General Settings tab, click Add to specify the type and format of the data your business process sends to clients via the Client Response node (that is, the data type for the method parameter). The node builder displays the following types of data:
    • Simple Types
    • Lists Java primitive and classes data types.

    • XML Types
    • Lists the XML Schemas that are available in your business process project. To learn how to import a Schema into your project.

    • Non-XML Types
    • Lists the Message Format Language (MFL) files available in your business process project. Oracle WebLogic Integration uses a metadata language called Message Format Language (MFL), based on XML, to describe the structure of non-XML data. Every MFL file available in your project is listed in Non-XML Types. Note that an XML Schema representation of each MFL file is built by Oracle Workshop for WebLogic and is also available in the XML Types listing.

  5. Click OK.
  6. After you select a data type from the list of supported types, the field is populated.

To Specify Send Data
  1. Click the Send Data tab.
  2. This tab allows you to define one or more variables to hold the data your business process sends to clients.

  3. If the data types of your method parameters and the data type of the variables you are going to use match, you can map your variables to the corresponding methods directly.
    1. If not already selected, select the Variable Assignment option. By default, the Send Data tab opens on the Variable Assignment panel.
    2. The Client Expects field is populated with the parameter(s) you specified on the General Settings tab.

    3. If you want to assign a variable that you already created in your project to the method parameters, select it from the drop-down menu.
    4. If you want to create a new variable and assign it to the method parameter, then under Select variable to assign, click the arrow and select Create new variable...To Create a New Variable in the Node Builder.
    5. If the data types of your method parameters and your variables match, click Ok. Your new variable is created and displayed in the Send Data tab.
  4. If the data types of your method parameters and your variables are different, you can use the XQuery Mapper tool included in Oracle Workshop for WebLogic to map between heterogeneous data types.The data transformations you create using the tool are stored in data transformation files. When data transformation files containing your data transformations are built, they are built as controls. The controls expose transformation methods, which business processes invoke to map disparate data types.
    1. To create a transformation map, select the Transformation option.
    2. The node builder transformation screen is displayed with the data types expected by your method displayed in the Client Expects pane.

    3. In Step 1 in the Transformation tab, click Select Variable to select one or more variables to be used.
    4. Note: To remove a variable from the node builder pane, select the variable in the list and then click Remove. This action removes the variable from the node builder, not from your business process. The variable is still included in your business process; it is visible in the Variables pane in the Data Palette.

      When designing a business process, you use a Transformation to create maps between disparate data types. Your project must contain an instance of a Transformation control for you to create the map.

    5. If an appropriate instance of a Transformation control is not available in your project, you can create a new one by clicking Create Transformation to invoke the Transformation Mapping tool window.
    6. The mapping tool displays a representation of the source schema and target schema in Source and Target panes. You can create a map between the data type of the method parameter and the data type of the variable, or variables, to which you assign the data.

      Note: To return to node builder, in the Package Explorer pane, double-click the Process.java file.
    7. If the appropriate instance of a Transformation control is available in your project, click Advanced Option. The Advanced Option window opens. In this window select the Control and Method. If the method arguments and return type matches those as selected in the Transformation pane, click OK.
    8. To close the node builder, click the Close.
    9. In the Design view, the icon indicates that you completed the configuration and design of this node.

Note: To learn about changing the configuration you design in the Transformation pane of a node builder, see About Editing Node Configurations.
  1. To save your work, select File > Save.

Adding Dynamic Callback Properties

You can set dynamic callback properties for your Client Response node by using the XQuery Dynamic Selector. The Dynamic Selector allows you to configure a lookup property based on a LookupControl or TPM function. You can then configure your business process in the Oracle WebLogic Integration Administration Console such that, at run time, the security of the callback to the client is handled differently, based on the value of the lookup property that you specified in the Dynamic Selector.

To Set the Dynamic Callback Property
  1. Select the Client Response node for which you want to set a Dynamic Callback property.
  2. In the Properties pane, in the xquery field under the ReturnXml section, enter the Dynamic Selector XQuery data.
  3. For information about how to configure the security information associated with your dynamic callback property, see Adding or Changing Dynamic Client Callback Selectors in Using The Oracle WebLogic Integration Administration Console.

  4. To save your work, select File > Save.

 


Buffering Client Messages

To ensure the scalability of your business process applications, incoming messages from clients are buffered by default on the queue for the Web application.

Outgoing messages to clients are not buffered by default, but they can be configured to be buffered on the same Web application queue.

To Buffer an Outgoing Client Message
  1. Select the Client Response node that is configured with the callback method you want to buffer.
  2. In the Properties pane, in the message buffer section do the following:
    1. From the enable attribute drop-down menu, select true.
    2. Select the retry-count attribute, then enter a value for the callback method. This specifies how many times the process engine should try to send your message to the queue.
    • Select the retry-delay attribute, then enter a value for the callback method. This specifies the amount of time (in seconds) you want to pass before a retry is attempted.

This completes the configuration of the callback method on the Client Response node; the callback message is configured to be buffered.

Note: The business process considers a buffered operation completed when the message is successfully enqueued, not when the message is delivered to the client.
  1. To save your work, select File > Save.

  Back to Top       Previous  Next