Working with Preference File (JSON format) for migration

When you want to migrate a ActiveMatrix BusinessWorks 6.x adapter project to a ActiveMatrix BusinessWorks 6.x plug-in project and if they want to use the feature of preferences then a adapter2plugin.json file would need to be created in the root folder of ActiveMatrix BusinessWorks 6.x adapter project.

A template of the preference file would be installed in the tools folder of the plug-in in the following location:

$TIBCO_HOME/bw/palettes/files/version/tools/adapter2plugin.json_template

A Preference file (JSON format) can be used in the following manner:
  • To override configuration defined in the ActiveMatrix BusinessWorks 6.x adapter project and the adapter services carried over to the plug-in.
  • To provide the configuration available in the plug-in but not available in ActiveMatrix BusinessWorks 6.x adapter project.

Note:
  • You should not copy and use the JSON preference file as it is, as this file is only provided for reference. If you want to use this file, then you need to similarly create a JSON file and mention the properties which are needed in the file.
  • The file created under the root folder of the ActiveMatrix BusinessWorks 6.x adapter projects will not just contain Files but also other plug-ins that supports adapter migration.

In terms of values, the values could either be literal's or references to module properties which would pertain to module properties from ActiveMatrix BusinessWorks 6.x adapter project.

To configure as a Literal Value:

To set the working directory of File Parser activity to D:\\work using JSON file, set the value as

"workingDirectory" : "D:\\work"

To configure as a Module Property:

To use a module property in JSON file, you need to have the same module property declared with a value in the corresponding ActiveMatrix BusinessWorks 6.x adapter project. Then you can add the module property in the JSON file. To set a working directory of File Parser activity to D:\\work using JSON file as a module property, add a module property in ActiveMatrix BusinessWorks 6.x adapter project as work_dir and set the value as D:\\work. Now in JSON file, set the value as

"workingDirectory": "%%work_dir%%"

Note:
  • The location and filename of the preference file is not configurable.
  • The usage of the preference file does not support the creation of module properties in migrated projects.
  • The usage of preference file is applicable to all adapter configurations in the ActiveMatrix BusinessWorks 6.x adapter project during migration.
  • Since the module properties in ActiveMatrix BusinessWorks 6.x plug-in project is case sensitive, the module properties in the preference file should have the same case as the ActiveMatrix BusinessWorks 6.x adapter project.
  • When any value is applied from the preference file , the RefactoringReport.log contains logs with key and value in uppercase.
  • All directory paths mentioned in the preference file should be defined using escape characters if value follows convention C:\temp. Value in preference file would be C:\\temp.