Jump to content
We have recently updated our Privacy Statement, available here ×
  • BW6.X - BWCE - How to use JMS Application Properties in BusinessWorks 6.X and BusinessWorks Container Edition


    It is possible to access JMS application properties in BusinessWorks while sending or receiving JMS messages.

    This article explains how to define a set of JMS application properties and how to use it in common JMS activities.

    In fact there are two approaches to do this, one is to use Dynamic Properties and the other is to use a JMS application properties schema.

    The first approach, use of Dynamic Properties is to be preferred while it is more simple to use. This approach was not available in early releases of BusinessWorks.

    # USING DYNAMIC PROPERTIES

    # Use of Dynamic properties in JMS Send Message activity

    . In the Input tab and in the ‘DynamicProperties’ structure map the properties as needed

     1jXF8W-Tn3IdTbDu8QyMuIw.webp.5b4eee73da039f0ad1f5f9278f5f8348.webp


    For reference elements about Dynamic Properties you can refer to the BusinessWorks documentation (check the ‘Input’ section):
    https://docs.tibco.com/pub/activematrix_businessworks/6.10.0/doc/html/Default.htm

    # Use of Dynamic properties in JMS Receive Message activity

    The properties are available in the output of the activity.

    1*PMsrWttEsw5DsxNTh9dntQ.png

    Dynamic Properties in the output of the JMS Receive activity

    To read values of Dynamic properties you have use xpath code like this:

    $JMSReceiveMessage/DynamicProperties/ns:property[ns:name=”MyProp1"]/ns:value

    1*UqCy5ImQE7_oxw2W5g7Hcw.png

    Using a Dynamic Property in a mapping

    # USING A JMS APPLICATION PROPERTIES SCHEMA

    # Definition of a set of JMS application properties

    . Right click on the Schema folder of the application and select ‘JMS Application Properties’

    1*PT29r1izXCyeLhUEK3_uAA.png

    Create a schema to manage the application properties

    . Enter the name of the schema and the name of the Root Type and click Finish

    1*mceGc4XNdGai55Av9R6w6g.png

    Enter the name of the schema and the root type name

    . Edit the XML schema according to your needs

    1*58kE3xQez1PWuCgD8406gA.png

    Edit the XML Schema

    Note that as per the JMS specification, JMS application properties must be any of the following Java types: boolean, byte, short, char, long, int, float, double, string, or byte[].

    Once the JMS application properties schema has been defined you can use it in the JMS palette activities.

    # Use of JMS application properties in JMS Send Message activity

    . In the Advanced tab select the JMS Application properties schema to be used:

    1*UhnsPtlHfd-A-KuPas56hw.png

    Select the JMS Application Properties schema to use

    . Then in the Input tab in the ‘OtherProperties’ structure map the properties as needed

    1*eKsWMxbplzWWEWx42SX_gA.png

    Map the JMS application properties as needed

    # Use of JMS application properties in JMS Receive Message activity

    . In the Advanced tab select the JMS Application properties schema to be used :

    1*DFKaNxIIz13k9hfv6V0TpQ.png

    Select the JMS Application Properties schema to use

    . The JMS Application Properties are now available in the output of the activity

    1*A7hB0bZIRhyi43k38zYxVg.png

    JMS application properties are available in the output of the activity

    Useful elements

    Example of an XML schema defining JMS application properties :

    <?xml version="1.0" encoding="UTF-8"?>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" 
    targetNamespace="http://com.tibco.bw.plugin.jms.properties.MyJMSApplicationProperties" xmlns:tns="http://com.tibco.bw.plugin.jms.properties.MyJMSApplicationProperties" elementFormDefault="qualified">
    <complexType name="jmsAppPropType">
    <sequence>
             <element name="name" type="string"/>
             <element name="gender" type="string"/>
             <element name="age" type="int"/>
    </sequence>
    </complexType>
    </schema>
    
    Additional elements
    

    You can refer to the attached sample project.

     

     

    JMSApplicationPropertiesSample.zip


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...