Managing transaction-to-cache mappings in PowerServer

When the PowerServer project is built and deployed in the PowerBuilder IDE, the transaction-to-cache mappings configured in the PowerServer project painter > Database page will be deployed and stored in PowerServer. You can manually change these settings in PowerServer.

To manage the transaction-to-cache mappings in PowerServer:

  1. Go to the compiled Web APIs > AppConfig folder (or the solution > UserExtensions project > AppConfig folder), and open the Applications.json (or Applications.[DBConnectionProfile].json) file in a text editor.

    For each DB connection profile configured in the Database page, an Applications.[DBConnectionProfile].json file is created. The Applications.json file contains the configuration of the "Default" DB connection profile. If you have created another connection profile, the profile name is added in the middle of the file name. For example, Applications.Development.json file contains the configuration of the "Development" DB connection profile.

  2. In the Applications.json (or Applications.[DBConnectionProfile].json) file, locate the "Applications" block > [application name] > "CloudTransactions". This is where the transaction-to-cache mapping(s) is stored.

    As shown in the following example, in the "salesdemo_cloud" application, the "sqlca" transaction object is mapped to the "sales" database cache.

    You can modify the existing mapping, or create a new mapping by making a copy of the existing one.

      "Applications": {
        "salesdemo_cloud": {
          "CloudTransactions": {
            "sqlca": {
              "CacheName": "sales"
            }
          },
          ...

    Note: You can directly make changes to the compiled Web APIs; you can also make changes to the PowerServer C# solution and then compile the Web APIs again. If you make changes to the PowerServer C# solution, notice that the PowerServer C# solution will be updated every time when the PowerServer project is built and deployed in the PowerBuilder IDE (therefore changes will be lost). For more information, refer to What settings will be deployed to the solution.