Subscription Start (Asynchronous)

If you specified that your business process is started via the Subscribe to a Message Broker channel and start via an Event (Time, Email, File, Adapter, etc.) option (see To Define the Start Method for Your Business Process), your Start node is displayed as shown in the following figure:


A static subscription to a Message Broker channel is defined on the Subscription node. Your business process is started as the result of receiving a message from a Message Broker channel.

Note: In WebLogic Integration, subscriptions to Message Broker channels defined at a Start node are referred to as static subscriptions, and subscriptions defined using a Message Broker Subscription control are referred to as dynamic subscriptions. See "Note about Static and Dynamic Subscriptions" in @jpd:mb-static-subscription Annotation.

The following sequence concisely describes the message flow at run time:

  1. A service publishes a message to a Message Broker channel, using a MB (Message Broker) Publish control, a File event generator, Timer event generator, or a JMS event generator. To learn more about how events are published to Message Broker channels, see Message Broker Publish Control and Using Event Generators to Publish to Message Broker Channels.
  2. A business process instance subscribes to, and receives messages from the Message Broker channel via the Subscription node. To ensure scalability of your application, the inbound messages by default are buffered on the queue for the current business process. To learn about buffering, see Buffering Client Messages.

Note: An asynchronous subscription start causes the subscribed business process to run in a different transaction from the publisher's transaction. In general, this is the recommended design pattern to use when you want to design your business process to start when it receives a message from a Message Broker channel. To learn about the scenarios for which a synchronous subscription start is recommended, see About Choosing Synchronous or Asynchronous Subscription Start Nodes.

To Complete the Design of Your Subscription Start Node

  1. Double-click the Subscription node associated with the Start node in your business process to invoke the Subscription node builder.
  2. Tabs on the node builder include:

    The following steps describe the tasks available on these tabs.

  3. Complete the following tasks on the General Settings tab:
    1. In the Method Name field, enter a name for the subscription request method.
    2. The data type and format of the data your subscription request method (that is, the data type for the method parameter) is specified automatically, based on the configuration of your channel file.

    3. Select a channel name from the drop-down list of Message Broker channels associated with the Channel Name field.
    4. Note: If no appropriate channels are available for you to select, you must create a file that specifies the Message Broker channels for your application. To learn how to create this file, see How Do I Create Message Broker Channels?

  4. Click the Specify Filter tab.
  5. Specifying a filter is optional. Filters can be applied to the data type the business process receives from the channel, or when you have specified a qualified metadata type in your channel configuration.

    The field in the Specify Filter tab is populated with the data type for the subscription method parameter you specified on the preceding tab. If you specified your channel to be able to receive qualified metadata, the Qualified Metadata attribute is also listed and you can filter on that parameter instead.


    To specify a filter:

    1. Select the input type or schema element on which you want to filter.
    2. An XQuery expression is generated, and the Filter field is populated with the XQuery expression based on your selection in the preceding step.
    3. Note: If you want to filter on an XMLObject parameter, you have to enter the XQuery statement in the Filter field or edit your source code directly.

    4. In the Filter Value field, enter a value against which you want to match the filter.
  6. Click the Receive Data tab.
  7. This tab allows you to define one or more variables to hold the data that your business process receives from the channel.

  8. If the data types of your method parameters and the data type of the variables you are going to use are the same, you can map your variables to the corresponding methods directly.
    1. If it is not already selected, select the Variable Assignment option.
    2. The Client Sends field is populated with the parameter(s) you specified on the General Settings tab, in other words, the parameter type of the channel.

    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, select Create new variable..., then follow the instructions in the To Create a New Variable in the Node Builder section.
    5. If the data types of your method parameters and your variables match, click the X in the top right-hand corner to close the node builder.
  9. If the data types of your method parameters and your variables are different, you can use the data mapping tool included in WebLogic Integration to map between heterogeneous data types. The data transformations you create using the tool are stored in Data Transformation Format (DTF) files. When DTF 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; the data types expected by your method are displayed in the Client Sends pane.

    3. In Step 1 on 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 (defined by a DTF file) 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 tool. This automatically applies changes to the builder and opens the transformation tool in a new window.
    6. The transformation 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 want to 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 Application pane, double-click the JPD 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 the X in the top right-hand corner.
    9. Note: To learn about changing the configuration you design in the Transformation pane of a node builder, see About Editing Node Configurations.

  10. To close the node builder, click the X in the top right-hand corner.

In the Design View, the image icon indicates that you completed the configuration and design of this node. To learn about buffering on your subscription node, see Buffering Client Messages.

  1. To save your work, select File —> Save.

Related Topics

Subscription Start (Synchronous)

Sending Messages to Clients

Handling Exceptions

Client Operations and Control Communication Methods

How Do I Create Message Broker Channels?

How Do I: Call a Business Process?

Message Broker Publish Control

Using Event Generators to Publish to Message Broker Channels

Previous Document Next Document