Working with the Preference File (JSON) for Migration
When you want to migrate a project created in ActiveMatrix BusinessWorks 5.x to a ActiveMatrix BusinessWorks 6.x or TIBCO BusinessWorks Container Edition and use the feature of preferences then you must create a adapter2plugin.json file in the root folder of ActiveMatrix BusinessWorks 5.x project.
All the property values that you provide in the TRA file for a ActiveMatrix BusinessWorks 5.x project, are not migrated with the project. You must therefore provide all these property values in a preference file. This preference file is in JSON format. A template of the preference file is installed in the tools folder of the plug-in at the following location:
TIBCO_HOME/bw/palettes/adb/version/tools/adapter2plugin.json_template
- You must use the JSON preference file template provided in the
tools folder for reference only. Copy the template file from the
tools folder and paste in the root directory of the project as
adapter2plugin.json. Then edit the preference file and provide the necessary properties and their corresponding values.
The values can be literals or references to module properties that pertain to global variables in the ActiveMatrix BusinessWorks 5.x project.
- The file created under the root folder of the ActiveMatrix BusinessWorks 5.x projects does not contain only the Database plug-in but also other plug-ins that support adapter migration.
- TIBCO recommends not to change the table names of any of the publishing, mutex, exception, or opaque exception tables in the JSON file. However, if it is required, perform the following steps before migration:
- The location and filename of the adapter2plugin.json preference file is not configurable.
- The usage of the preference file does not support the creation of new module properties in migrated projects. For example, you must not specify a module property %%test%% in the preferences if it does not exist as a global variable in the ActiveMatrix BusinessWorks 5.x project.
- Properties provided in the preference file take priority. Therefore, if you have provided the value of a field and also provided a value for the same field in the preference file, the value in the preference file is given priority.
- The following table names are declared in the preference file and also as global variables. These are not migrated as module properties in the plug-in:
- The usage of preference file is applicable to all adapter configurations in the ActiveMatrix BusinessWorks 5.x project during migration.
- Since the module properties in ActiveMatrix BusinessWorks 6.x project are case sensitive, the module properties in the preference file must have the same case as the ActiveMatrix BusinessWorks 5.x project.
- When any value is applied from the preference file, the MigrationReport.log contains logs with key and value in uppercase.
- You must obfuscate the password used in the JSON file. Use the bwobfuscator utility in the <TIBCO_HOME>/bw/version/bin folder to obfuscate the password. Any other password obfuscators do not work. For more information about how to use the bwobfuscator, see the TIBCO ActiveMatrix™ BusinessWorks Application Development guide.
To configure as a literal value:
To set the value of Default Schema on the Connection tab of ADB Configuration as xyz in the JSON file, set the value as
"defaultSchema" : "xyz"
To configure as a module property:
To use a module property in the JSON file, you must first declare a global variable with the same name and a value in the ActiveMatrix BusinessWorks 5.x project and then add the module property to the JSON file.
To set the value of Default Schema on the Connection tab of ADB Configuration as a global variable, add the global variable in the ActiveMatrix BusinessWorks 5.x project as defaultSchemaGV and set its value as xyz. Now, in the JSON file, set the value as
"defaultSchema" : "%%defaultSchemaGV%%"