Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved


Chapter 2 Getting Started : Setting Service Instance Runtime Variables

Setting Service Instance Runtime Variables
You can set a service instance runtime variable by exporting an application’s deployment configuration file and adding a runtime variable to the NVPairs element section to the file as shown in this section. After adding the section, use AppManage to deploy the application.
Each service instance can use the same runtime variable and assign a different value to it. The instance runtime variable can be any runtime variable that was defined for the service at configuration time and set to be included when the Include all service level global variables option is selected when building the enterprise archive file
Variable values can be set at the application level, service level and service instance level. A variable value set at the service instance level overrides the same variable value set at the service level. Similarly, a variable value set at the service level overrides the same variable set at the application level.
You can use the -template and -max options to create an XML file that shows all the service instance runtime variables defined for your application. See , -max Option.
The following XML fragment shows the services section for a TIBCO BusinessWorks project that includes a sender process instance deployed on one machine and a receiver process instance deployed on two machines. The bold sections show that an instance runtime variable has been added to each process instance deployment in the NVPairs section, under each service instance binding section. This allows you to set values separately for each process instance deployment. The NVPairs name must be "INSTANCE_RUNTIME_VARIABLES".
 
<?xml version="1.0" encoding="UTF-8"?>
 
<application xmlns="http://www.tibco.com/xmlns/ApplicationManagement" name="RVCM_Project">
<description></description>
<contact></contact>
<NVPairs name="Global Variables">
<NameValuePair>
<name>DirLedger</name>
<value>.</value>
</NameValuePair>
.
.
.
        <NameValuePairInteger>
<name>RVCM/Worker_Tasks</name>
<value>0</value>
</NameValuePairInteger>
<NameValuePairInteger>
<name>RVCM/Scheduler_Weight</name>
<value>0</value>
</NameValuePairInteger>
<NameValuePairInteger>
<name>RVCM/Worker_Weight</name>
<value>0</value>
</NameValuePairInteger>
    </NVPairs>
.
.
.
    <services>
<bw name="RVCM-Sender.par">
<enabled>true</enabled>
<bindings>
<binding name="">
<machine>SENDER-MACHINE</machine>
.
.
.
<NVPairs name="INSTANCE_RUNTIME_VARIABLES">
<NameValuePairInteger>
<name>RVCM/Worker_Tasks</name>
<value>0</value>
</NameValuePairInteger>
<NameValuePairInteger>
<name>RVCM/Scheduler_Weight</name>
<value>0</value>
</NameValuePairInteger>
<NameValuePairInteger>
<name>RVCM/Worker_Weight</name>
<value>0</value>
</NameValuePairInteger>
</NVPairs>
</binding>
</bindings>
.
.
.
</bw>
<bw name="RVCMQ-Receiver.par">
<enabled>true</enabled>
<bindings>
<binding name="">
<machine>RECEIVER-MACHINE1</machine>
.
.
.
<NVPairs name="INSTANCE_RUNTIME_VARIABLES">
<NameValuePairInteger>
<name>RVCM/Worker_Tasks</name>
<value>0</value>
</NameValuePairInteger>
<NameValuePairInteger>
<name>RVCM/Scheduler_Weight</name>
<value>0</value>
</NameValuePairInteger>
<NameValuePairInteger>
<name>RVCM/Worker_Weight</name>
<value>0</value>
</NameValuePairInteger>
</NVPairs>
</binding>
<binding name="">
<machine>RECEIVER-MACHINE2</machine>
.
.
.
<NVPairs name="INSTANCE_RUNTIME_VARIABLES">
<NameValuePairInteger>
<name>RVCM/Worker_Tasks</name>
<value>0</value>
</NameValuePairInteger>
<NameValuePairInteger>
<name>RVCM/Scheduler_Weight</name>
<value>0</value>
</NameValuePairInteger>
<NameValuePairInteger>
<name>RVCM/Worker_Weight</name>
<value>0</value>
</NameValuePairInteger>
</NVPairs>
</binding>
</bindings>
.
.
.
</bw>
</services>
</application>

Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved