Setting Dynamic Properties

You can change the MQSeries control properties dynamically at runtime. The MQSeries control properties that you can modify are specified in the MQDynamicProperties document. This document conforms to the MQDynamicProperties schema, which is available in the MQSchemas.jar file.

To change properties dynamically, perform the following tasks

  1. Open the Client Request node. In the General Settings tab, add a variable of type MQDynamicProperties document.
  2. In the Receive Data tab, create a new variable for the parameter that you created in the General Settings tab of the Client Request node. You need only to provide a variable name for the variable. The variable type is pre-defined, based on the parameter to which you are assigning the variable.
  3. Drag and drop the setDynamicProperties function from the Controls tab of the Data Palette, into your business process.
  4. Open the Send Data tab of the setDynamicProperties function node. From the Select variables to assign drop-down list, assign the variable that you created in the Receive Data tab of the Client Request node, to the corresponding parameter of the setDynamicProperties function listed in the Control Expects column. All MQSeries Get and Put operations following the setDynamicProperties function in the business process will use the properties that you specify in the MQDynamicProperties document.
  5. While executing your business process at runtime, provide the MQDynamicProperties document as input.

Caution: When you use the Explicit Transaction mode, the setDynamicProperties function should always be called before the Begin function or after Commit or Rollback functions. If this sequence is not followed, the business process will throw an exception during runtime.

Schema of MQDynamicProperties

<?xml version="1.0"?> 
<xs:schema xmlns="http://www.bea.com/wli/control/MQDynamicProperties" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.bea.com/wli/control/MQDynamicProperties" elementFormDefault="qualified" attributeFormDefault="unqualified">	<xs:element name="MQDynamicProperties">
<xs:complexType>
<xs:sequence>
<xs:element name="connectionType" type="connType" minOccurs="0" maxOccurs="1"/>
<xs:element name="queueManager" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="requireAuthorization" type="authType" minOccurs="0" maxOccurs="1"/>
<xs:element name="host" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="port" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="channel" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="ccsid" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="user" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="password" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="sendExit" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="receiveExit" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="securityExit" type="xs:string" minOccurs="0"
maxOccurs="1"/>
<xs:element name="defaultQueueName" type="xs:string" minOccurs="0"
maxOccurs="1"/>
<xs:element name="implicitTransactionRequired" type="transType"
minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="connType">
<xs:restriction base="xs:string">
<xs:enumeration value="Bindings"></xs:enumeration>
<xs:enumeration value="TCP"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="authType">
<xs:restriction base="xs:string">
<xs:enumeration value="Yes"></xs:enumeration>
<xs:enumeration value="No"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="transType">
<xs:restriction base="xs:string">
<xs:enumeration value="true"></xs:enumeration>
<xs:enumeration value="false"></xs:enumeration>
</xs:restriction>
</xs:simpleType>	
</xs:schema> 

Sample MQDynamicProperties Document

The following is a sample MQDynamicProperties document. You need to provide this document at runtime, when you execute your business process:

<?xml version="1.0"?>
<even:MQDynamicProperties
xmlns:even="http://www.bea.com/wli/control/MQDynamicProperties">
<even:connectionType>TCP</even:connectionType>
<even:queueManager>newqm</even:queueManager>
<even:requireAuthorization>Yes</even:requireAuthorization>
<even:host>localhost</even:host>
<even:port>1869</even:port>
<even:channel>chn</even:channel>
<even:ccsid>437</even:ccsid>
<even:user>WebLogic</even:user>
<even:password>WebLogic</even:password>
<even:defaultQueueName>errqueue</even:defaultQueueName>
</even:MQDynamicProperties> 
Previous Document Next Document