JSON Tool Utility

Use JSON Tool Utility to generate JSON files that are required to create data sources and Client Item trees.

Before you begin

The JSON Tool Utility consist of the following files:
  • ACMfgCommandLineJsonTool.jar
  • mapping.json
  • ReadMe.txt
    Note: Make sure that you go through the instructions in the ReadMe.txt file.
Attention:
  1. Refer to the mapping.json, the sample file provided as reference for creating the data sources and Client Items for each of the data source. Multiple Client Items can be added to one data source.
  2. Every Client Item in the mapping.json file comes with source_item_addr attribute that denotes the nodeId along with its mapping path from the Toolkit.
  3. You need to update the mapping.json file based on your Client Items and OPC server data configuration. The structure of the mapping file must remain unchanged.
  4. Do not change the values of the attributes message_security_mode (None) and security_policy ( http://opcfoundation.org/UA/SecurityPolicy#None) in the mapping.json file.
  5. The Utility always creates a new node for the mapping_path that is provided in the mapping.json file.

    Ensure that you provide a new complete mapping path for both the data source and Client Item before running the Utility.

  6. The discovery_endpoint property is used for adding the discovery URL.

About this task

Use the JSON Tool Utility to generate JSON files, which are required to create data sources and Client Item trees in the App Connect for Manufacturing, regardless of the App Connect Enterprise Toolkit connection to the OPC server.

These JSON files can be used to run on a machine that doesn't have OPC server access. You can now add Client Items to the message flow even if the OPC server is not connected.

Procedure

  1. Navigate to the ACMfgCommandLineJsonTool contents directory.

    For example,

    UnixLinux opt/IBM/ACMfg-3.0.1.n/runtime/amd64_linux_2\setup\ACMfgCommandLineJsonTool

    WindowsC:\Program Files\IBM\ACMfg\ 3.0.1.n \runtime\amd64_nt_4\setup\ACMfgCommandLineJsonTool

    The JSON Tool Utility consist of the following files:
    • ACMfgCommandLineJsonTool.jar
    • mapping.json
      • Sample file that has a list of input data sources and Client Items. This file is used as the input for the JSON Tool Utility.
      • You need to update this file based on your OPC server data configuration before you use the JSON Tool Utility.
    • ReadMe.txt

      Make sure you go through the instructions in the ReadMe.txt file.

  2. Update the mapping.json based on your OPC server data configuration and save the file to a location of your choice.
  3. Open a command prompt window and run the following command:
    java -jar ACMfgCommandLineJsonTool.jar <mapping.json_file_folder_path> 
    <folder_path_where_json_files_will_be_created>
    Note:
    • You can place the mapping.json file in any directory.

      In this example, the updated mapping.json file is saved at D:\backup\test.

    • The destination folder where the JSON files will be created must be empty before running the utility.

      In this example, the destination folder is set to D:\backup\JSON.

    For example,
    java -jar ACMfgCommandLineJsonTool.jar D:\backup\test D:\backup\JSON

Results

The JSON files that are required for creating data sources and Client Item trees are generated in the D:\backup\JSON folder.
Note:
  • Make sure the environment variable for ACMFG_MAPPING_FILES_DIR is set to the folder containing only the newly generated JSON files.
  • The variable Use_DATABASE must be set to false because JSON files are used to store the application data.

What to do next

Restart the Toolkit and navigate to Manufacturing Perspective. You can view the data sources and Client Item tree.