Using Default JMS Message Header Information in a Business Process

To use JMS message header information, you need to create a project that uses a JMS Message Header schema (jmsHeader.xsd) and then define business process variables to receive and hold the JMS message header data.

Use the following example business process to guide you through the process.

Example business process: Messages from an inbound JMS transport are received and used by an Assign activity.

To use JMS message header information in a business process:

  1. Create a New Project from Template using the WorkSpace Project with Schemas template.

  2. Create a business process service.

  3. Define a Reply To Address Business Process variable to capture the JMS inbound message data:

    1. Expand the Business Process Variables section.

    2. Select operation1Request in the business process canvas.

    3. Right-click Local Variables and select New variable from the context menu.

    4. Name the variable. Select newVariable# from the Local Variables list, expand the Properties panel, and enter a variable name in the Name field, such as JMSHdrCtxt .

    5. Define the Datatype. Select Reply-To Address.

    6. Select operation1Request in the business process canvas again.

    7. In the Properties panel, select JMSHdrCtxt variable from the Reply-To-Address Variable drop-down menu.

    8. Save the service. Select File|Save from the main menu bar.

  4. Define a Complex Business Process variable to access the JMSHeader schema:

    1. Expand the Business Process Variables section.

    2. Select operation1Request in the business process canvas.

    3. Right-click Local Variables and select New variable from the context menu.

    4. Name the variable. Select newVariable# from the Local Variables list, expand the Properties panel, and enter a variable name in the Name field, such as InboundJMSHeader.

    5. Define the Datatype as a Complex Type:

      1. Select Complex Type in the Properties panel and browse for the schema file contained in the WorkSpace project.

      2. In the left pane of the Schema Browser, select jmsHeader.xsd.

      3. In the right pane, select the JMSMessageContext {http://schemas.sybase.com/services/transport/jms/V1.0/} node and click OK.

    6. Save the service. Select File|Save from the main menu bar.

  5. Transfer the data from the JMSHdrCtxt to the InboundJMSHeader business variable, using an Assign activity:

    1. Click inside the Business Process canvas.

    2. Select Assign from the Activities palette and drag it on to the Business Process canvas.

    3. Define the source and target variables for the Assign:

      1. Specify the Reply-To Address variable as the Source for the assign. Drag the JMSHdrCtxt variable from the Business Process Variables section onto the Source column in the Properties panel.

      2. Specify the Complex type variable as the Target for the assign. Drag the InboundJMSHeader variable from the Business Process Variables section onto the Target column in the Properties panel.

    4. Save the service. Select File|Save from the main menu bar.

    The values of the default JMS Header fields are now accessible for use in Assign activities a single-rule expression from the InboundJMSHeader variable in the Business Process Variables section.

Using User-Defined JMS Header Information in a Business Processs

Using JMS Message Headers in Outbound Messages

Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com