Subscription Start (Synchronous)

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


A synchronous static subscription to a Message Broker channel is defined on the Synchronous Subscription node. Your business process is started as the result of receiving a synchronous 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 summarizes the message flow at run time for the scenario in which you design a Synchronous Subscription node at the start of your business process:

  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 Synchronous Subscription node.

About Choosing Synchronous or Asynchronous Subscription Start Nodes

In general, an asynchronous subscription start pattern is recommended because it causes the subscribed business process to run in a different transaction from the publisher's transaction. In contrast, a synchronous subscription start causes the subscribed business process to run in the same transaction as the publisher. This type of subscription decreases loose coupling and can associate the results of a transaction rollback of one subscriber with an otherwise independent subscriber. However, there are two scenarios in which the synchronous subscription start pattern is recommended:

To Complete the Design of Your Synchronous 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. Note: You can configure only the node that represents the message received by the business process. That is, you can only invoke a node builder for the first of the icons in the pair that represents the Synchronous Subscription Start node.

    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. Select a channel name from the drop-down list of Message Broker channels associated with the Channel Name field.
    2. 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?

    3. In the Method Name field, enter a name for the subscription request method.
    4. 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.

  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 data type 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 will have to enter the XQuery statement in the Filter field or edit your source code directly.

    4. In the Filter Value field, create 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, click Select Variable and select it from the drop-down menu. The variable you select is added to the node builder pane.
    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, close the node builder by clicking X in the top right-hand corner.
  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 pane is displayed; the data types expected by your method are displayed in the Client Sends pane.

    3. In Step 1 on the Transformation option pane, 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 Mapping 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. To close the node builder, click 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.

In the Design View, the check box icon image indicates that you completed the configuration and design of this node.

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

Related Topics

Subscription Start (Asynchronous)

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