Configure Visual Builder for the Wholesale CBDC Sample Application

After you've configured all the other products associated with Oracle Blockchain Platform, you can configure Oracle Visual Builder to connect to them.

Overview

The following details must be updated in the Oracle Visual Builder configuration. You get these details when you configure Oracle Blockchain Platform as described in Configure Oracle Blockchain Platform for the Wholesale CBDC Sample Application.

Update Global Variables

  1. On the Visual Builder Visual Applications home page, click Web Applications in the Navigator to open the Web Apps pane.
  2. Click the cbdcapp application. The app editor opens.
  3. Select Variables.
  4. In the Global Variables section, locate the configuration variable object and update the following parameters in the object:
    Parameter Name Description Default Value
    chaincodeName The chaincodeName used in the Oracle Blockchain Platform network. WholesaleCBDC
    ordsUrl The ORDS endpoint URL, which is displayed in the output of the database view creation script. https://g53630e55ee33f4-test.xyz.abc.oraclecloudapps.com/ords/obp/cbdc/accountTrxDetails

Configure Visual Builder Backends

A backend service connection in Visual Builder is a way to establish communication between your visual application and external systems by providing essential details such as connection information, properties, and REST API endpoints needed to access those systems. You need to update the backends with Oracle Blockchain Platform and rich history database details.

For more information, refer to What Are Backends?.

The following backends need to be updated:
  • REST proxy calls
  • Enrollments
  • Rich history database configuration database

REST proxy calls

There is one backend and six service connections related to the REST proxy. These components are used to make REST proxy calls to the Oracle Blockchain Platform instance.

Backend
CentralBank
Service connections
participantBank_FI1
participantBank_FI2
participantBank_FI3
participantBank_FI4
participantBank_FI5
participantBank_FI6
To update the backend server details:
  1. On the Visual Builder Visual Applications home page, click Services in the Navigator to open the Services pane. Click Backends to see a list of backends.
  2. Select the backend you want to update. Click Servers.
  3. Click the Edit icon next to the default server.
  4. Update the following in the Server Details:
    • Instance URL: Replace the default URL with the Oracle Blockchain Platform instance URL by modifying the base URL portion of the default URL (test-xyz-abc.blockchain.ocp.oraclecloud.com). For example:
      https://centralbank-oabcs1-hyd.blockchain.ocp.oraclecloud.com:7443/restproxy/api/v2/channels/{channelName}
    • Server variables: Change channelName to reflect the name of the channel where the chaincode is deployed.
    • Authentication for logged-in users: OAuth 2.0 User Assertion is used for authentication. Modify the URL to match the Oracle Blockchain Platform REST proxy URL. For example:
      https://centralbank-oabcs1-hyd.blockchain.ocp.oraclecloud.com:7443/restproxy
    • Client ID and client secret: Click the Edit icon next to ClientID. Update the Client ID and Client Secret fields to match your Oracle Blockchain Platform ID and secret.
  5. Repeat these steps to update the service connections of each of the six participants by selecting them in the Service Connections View in the Services pane.

Enrollments

There are seven backends related to Oracle Blockchain Platform enrollments. These backends are used to create the enrollments to the Oracle Blockchain Platform instance.

Backends
CustomEnrollementCB
CustomEnrollementFI1
CustomEnrollementFI2
CustomEnrollementFI3
CustomEnrollementFI4
CustomEnrollementFI5
CustomEnrollementFI6
To update the backend server details:
  1. On the Visual Builder Visual Applications home page, click Services in the Navigator to open the Services pane. Click Backends to see a list of backends.
  2. Select the backend you want to update. Click Servers.
  3. Click the Edit icon next to the default server.
  4. Update the following in the Server Details:
    • Instance URL: Replace the default URL with the Oracle Blockchain Platform instance URL by modifying the base URL portion of the default URL (test-xyz-abc.blockchain.ocp.oraclecloud.com). For example:
      https://centralbank-oabcs1-hyd.blockchain.ocp.oraclecloud.com:7443/console/admin/api/v2/nodes/restproxies/{restProxyId}/enrollments
    • Server variables: Change restProxyId to reflect the actual REST proxy ID for your Oracle Blockchain Platform instance.
    • Authentication for logged-in users: OAuth 2.0 User Assertion is used for authentication. Modify the URL to match the Oracle Blockchain Platform REST proxy URL. For example:
      https://centralbank-oabcs1-hyd.blockchain.ocp.oraclecloud.com:7443/restproxy
    • Client ID and client secret: Click the Edit icon next to ClientID. Update the Client ID and Client Secret fields to match your Oracle Blockchain Platform ID and secret.
  5. Repeat these steps to update the backends of each of the six participants by selecting them in the Backends View in the Services pane.

Rich history database configuration database

There is one backend related to the rich history database. This backend is used to fetch the data from the rich history database.

Backend
RichHistoryDBConfiguration DB
To update the backend server details:
  1. On the Visual Builder Visual Applications home page, click Services in the Navigator to open the Services pane. Click Backends to see a list of backends.
  2. Select the RichHistoryDBConfiguration DB backend. Click Servers.
  3. Click the Edit icon next to the default server.
  4. Update the following in the Server Details:
    • Instance URL: Replace the default URL with OAuth Base URL(ORDS_REST_BASE_URL/ords/<userName|aliasName>). For example the default URL:
      https://g53630e55ee33f4-abc.def.gh-xyz-1.oraclecloudapps.com/ords/aliasName
      would be replaced by:
      https://g53630e55ee33f4-rhjkdb.adb.ap-sydney-1.oraclecloudapps.com/ords/vbcstest
    • Authentication for logged-in users: Basic is used for authentication.
    • Client ID and client secret: Click the Edit icon next to Username. Update the user name with the Client ID and the password with the Client Secret to match your ORDS endpoint ID and secret.

Configure Visual Builder Business Objects

A business object is a resource, such as an invoice or purchase order, similar to a database table; it has fields that hold the data for your application. Like a database table, a business object provides the structure for data. Business objects are stored in a database. The apps in your visual application and other clients access the business objects via their REST endpoints.

On the Visual Builder Visual Applications home page, click Business Objects in the Navigator to open the Business Objects pane. The wholesale CBDC objects should be listed.
Screen capture showing the complete list of business objects belonging to the wholesale CBDC sample application in the Business Objects view of Visual Builder.

You can select any business object and go to its Data tab to update or modify its data.

Organization Names

This business objects has four fields in the Data tab and helps connect the Oracle Blockchain Platform instances with the right backend for each bank. For example, if a user enters Bank1 details in the FI1 system, the application needs to link FI1 with Bank1. That way, whenever a user associated with Bank1 logs in, the system knows to pull data from the FI1 backend.

In this business object, you need to update the BankName and mspId columns for the respective orgNames. The updates should correspond to the number of participants (FIs) in the network. For example, if there are 2 FIs (FI1, FI2) in the network, you must update the BankName and mspId columns for these two FIs. For the remaining FIs (FI3, FI4, FI5, FI6), the BankName and mspId columns should be left empty.

Field Name Description Default Values Update Needed (Yes/No) Update Requirement
BankName This is the mapping used between Oracle Blockchain Platform instance names and BankNames used in the CBDC Application.

For example, if you created the Oracle Blockchain Platform instance with the name CentralBank but you want BankName to be BSP in the application , this mapping creates the mapping between the Oracle Blockchain Platform instance and BankName.

CentralBank, Bank1, Bank2, Bank3, Bank4, Bank5 and Bank6 Yes Required for active FIs; leave empty for unused FIs.
mspId This column represents the actual Oracle Blockchain Platform instance MSP ID. You must update these values if Oracle Blockchain Platform instances are created with names other than default values mentioned below. CentralBank, Bank1, Bank2, Bank3, Bank4, Bank5 and Bank6 Yes Required for active FIs; leave empty for unused FIs.
OrgName This column represents orgNames that map with the backend. CB represents the founder and FI# represents the participants. CB, FI1, FI2, FI3, FI4, FI5 and FI6 No ---

Peers

This business object is designed to store information about the peers in all Oracle Blockchain Platform instances within the network. To input the peer URL details into the business object, you should enter the corresponding peer URL values in the peerURL column along with their respective Oracle Blockchain Platform Membership Service Provider IDs (mspId).

For example, if there is one Central Bank (CB) and two Financial Institutions (FI#), each with two peers, you must enter a total of six peer URLs along with their associated mspId.

Field Name Description
orgName Oracle Blockchain Platform instance mspId.
peerURL The peerURL value of Oracle Blockchain Platform instances.

Note:

The peers included in this Business Interface should be added to the common channel that has been created.

Configure Oracle Analytics Cloud for Oracle Visual Builder

The Oracle Analytics Cloud instance and the Oracle Visual Builder instance must reside in the same OCI tenancy.

The Oracle Analytics Cloud instance and the Oracle Visual Builder instance must also use the same Oracle Identity Cloud Service for identity management. Users who access the Oracle Visual Builder application must have the necessary privileges for both Oracle Analytics Cloud and Oracle Visual Builder.

Before you complete the following steps, configure the wholesale CBDC analytics package. For more information, see Wholesale CBDC Sample Analytics Package.

  1. Get the Oracle Visual Builder domain URL.
    1. On the OCI console, click Developer Services > Visual Builder.
    2. Select your Visual Builder instance, and then click Service Homepage. The Visual Applications interface page opens. Copy the domain name from your browser's address bar.

      Example domain name: Example: https://wcbdc-vb-oabcs1.builder.ap-hyderabad-1.ocp.example.com

  2. Add the domain as a safe domain in Oracle Analytics Cloud.
    1. Log in to your Oracle Analytics Cloud instance, open the Oracle Analytics Cloud console, and then click Navigator Menu.
    2. Under Configuration and Settings, click Console > Safe Domains.
    3. Click Add Domain, and then paste the Visual Builder domain URL that you copied previously. The domain is added automatically when you click anywhere else on the display.
    4. Select the Allow Frames and Embedding check boxes associated with the domain that you just added.
  3. Get the Oracle Analytics Cloud host URL.
    1. Log in to your Oracle Analytics Cloud instance.
    2. Copy the Oracle Analytics Cloud host URL from your browser's address bar. Copy the fully-qualified domain name up to .com, including https://.

      Example host URL: https://<your-oac-instance>.analytics.ocp.example.com

  4. Add the Oracle Analytics Cloud host URL as an allowed origin in Oracle Visual Builder.
    1. Log in to your Oracle Visual Builder instance, and then click Service Homepage.
    2. Click Navigation Menu, then click Settings. The Tenant Settings page is displayed.
    3. In the Allowed Origins section, click + New Origin, and then paste the Analytics Cloud domain URL that you copied previously into the Origin Address field.
  5. Update the configuration variables in the Visual Builder application.
    1. Open the cbdcapp application in the app editor, and then select Variables.
    2. In the Global Variables section, update the following parameters in the configuration variable object.
      OACHost
      The Oracle Analytics Cloud instance URL, which you copied previously.
      OACCBDCProjectPath
      The project path for the central bank workbook in Analytics Cloud.
      OACFIProjectPath
      The project path for the financial institution workbook in Analytics Cloud.
    3. To get the project path of a workbook, click Navigator > Catalog on the Analytics Cloud home page.
    4. Click the Actions menu for the workbook, and then select Inspect. The Inspect window is displayed.
    5. Click the General tab, and then click Copy that is associated with the Object ID.
  6. Edit the HTML in Visual Builder.
    1. Open the cbdcapp application in the app editor, and then navigate to the HTML section.
    2. Update the Analytics Cloud host URL on lines 30 and 31 to match your Analytics Cloud instance, as shown in the following code snippet. Do not change the subdirectory structure of the URL, only the domain portion up to .com.
      <script src="https://abc-xyz-ia.analytics.ocp.example.com/public/dv/v1/embedding/jet/embedding.js" type="application/javascript"></script>