How to set global variables as properties that will be reflected during run time.

How to set global variables as properties that will be reflected during run time.

book

Article ID: KB0088155

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks Plug-in for Files for Unix and Windows -
Not Applicable -

Description

Description:
When setting the File Adapter property as a global variable in Designer with the service level checked and deploying the EAR, the created GV is not written in the deployed tra file. After changing the default value (in Admin GUI) and redeploying again, we can see the GV is written in the deployed tra file.

Issue/Introduction

How to set global variables as properties that will be reflected during run time.

Resolution

If we set FA property as a global variable in Designer with service level checked, and deploy the EAR, then created GV is not written in the deployed tra file. After changing default value in the Admin GUI, and redeploying again, we can see the GV is written in the deployed tra file. This is because Service level variables are only included in the service archive if the service uses them. When the application and service level variables have the same name and value, the service will use the application level variable (EAR). Only when the service level variable is different does the service instance use it. This is the reason why the variable appears in the tra file after the value has been overridden and redeployed.

For including the created GV in the deployed tra file, follow these steps.

1). Set the FA property to some dummy value such as "XYZ" when creating the GV in Designer. You also need to check the Service checkbox in the global variable dialog.

2). Make sure you check the Include all service level global variable checkbox, then create the EAR file.

3). Deploy the EAR in Admin.

4). Change the default value of the created GV present under the Runtime variables in Administrator, to 'ON'.

5). Redeploy application in Admin. The created GV will be added in the deployed .tra file.

Additional Information

For more details, refer to the File Adapter documentation, Chapter 5, Advanced Topics -> 'Dynamically Changing Output File Names at Runtime'and Designer User's guide -> Working with Global Variables.