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
    channel The name of the channel where the chaincode is deployed. test
    confidentialApplication A Boolean variable set to true for confidential mode, false for generic mode. false
    ordsEndpointUrls An object that contains the ORDS endpoint URLs for the system owner and participant organizations, which are displayed in the output of the database view creation script. In generic mode, you update only the system owner endpoint, and you must leave all participant organizations at the default values. In confidential mode, you update all endpoints. See the following information for more details
    restproxyId An object that contains the REST proxy IDs for the system owner and participant organizations. All IDs must be specified, regardless of application mode. See the following information for more details
    Sample ordsEndpointUrls object, generic mode:
    "ordsEndpointUrls": {
        "SystemOwner": "https://<base_URL>/ords/obp/cbdc/accountTrxDetails",
        "ParticipantOrg1": "<default_value>",
        "ParticipantOrg2": "<default_value>",
        "ParticipantOrg3": "<default_value>",
        "ParticipantOrg4": "<default_value>",
        "ParticipantOrg5": "<default_value>",
        "ParticipantOrg6": "<default_value>"
    }
    Sample ordsEndpointUrls object, confidential mode:
    "ordsEndpointUrls": {
        "SystemOwner": "https://cb-centralbank.example.com/ords/obp/cbdc/accountTrxDetails",
        "ParticipantOrg1": "https://bank1.example.com/ords/obp/cbdc/accountTrxDetails",
        "ParticipantOrg2": "https://bank2.example.com/ords/obp/cbdc/accountTrxDetails",
        "ParticipantOrg3": "https://bank3.example.com/ords/obp/cbdc/accountTrxDetails",
        "ParticipantOrg4": "https://bank4.example.com/ords/obp/cbdc/accountTrxDetails",
        "ParticipantOrg5": "https://bank5.example.com/ords/obp/cbdc/accountTrxDetails",
        "ParticipantOrg6": "https://bank6.example.com/ords/obp/cbdc/accountTrxDetails"
    }
    Sample restproxyId object, both modes:
    "restproxyId": {
        "systemOwner": "restProxy_CentralBank",
        "participantOrg1": "restProxy_Bank1",
        "participantOrg2": "restProxy_Bank2",
        "participantOrg3": "restProxy_Bank3",
        "participantOrg4": "restProxy_Bank4",
        "participantOrg5": "restProxy_Bank5",
        "participantOrg6": "restProxy_Bank6"
    }

Configure Visual Builder Backends

A back-end 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.

For more information, see What Are Backends?.

Complete the following steps to configure Visual Builder backends for both Oracle Blockchain Platform interactions and rich history database interactions.

Backend Configuration for Oracle Blockchain Platform Interactions

The wholesale CBDC application uses Visual Builder backends to manage interactions with Oracle Blockchain Platform.
System owner
SystemOwnerMgmt: handles Oracle Blockchain Platform interactions and enrollment creation for the system owner.
SystemOwnerRestproxyConfiguration: a dedicated backend that handles REST proxy calls for the system owner.
Participant organizations
ParticipantOrg1Mgmt: handles Oracle Blockchain Platform interactions, enrollment creation, and REST proxy calls for the participant organization 1.
ParticipantOrg2Mgmt: handles Oracle Blockchain Platform interactions, enrollment creation, and REST proxy calls for the participant organization 2.
ParticipantOrg3Mgmt: handles Oracle Blockchain Platform interactions, enrollment creation, and REST proxy calls for the participant organization 3.
ParticipantOrg4Mgmt: handles Oracle Blockchain Platform interactions, enrollment creation, and REST proxy calls for the participant organization 4.
ParticipantOrg5Mgmt: handles Oracle Blockchain Platform interactions, enrollment creation, and REST proxy calls for the participant organization 5.
ParticipantOrg6Mgmt: handles Oracle Blockchain Platform interactions, enrollment creation, and REST proxy calls for the participant organization 6.
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 that you want to update. Click Servers.
  3. Click the Edit icon next to the default server.
  4. For the SystemOwnerRestproxyConfiguration backend only, update the following in the Server Details window:
    • 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. For all other backends, update the following in the Server Details window:
    • 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
    • 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.
  6. Repeat these steps to update all backends.

Backend Configuration for Rich History Database Interactions

Each organization has a dedicated backend that manages access to the rich history database.

Backends
SystemOwnerRichHistoryDBConfiguration
ParticipantOrg1RichHistoryDBConfiguration
ParticipantOrg2RichHistoryDBConfiguration
ParticipantOrg3RichHistoryDBConfiguration
ParticipantOrg4RichHistoryDBConfiguration
ParticipantOrg5RichHistoryDBConfiguration
ParticipantOrg6RichHistoryDBConfiguration

In generic mode, you update only the SystemOwnerRichHistoryDBConfiguration backend. In confidential mode, you must update the system owner backend and the backends for all participant organizations that are in use in your deployment.

To update the back-end 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 appropriate backend. Click Servers.
  3. Click the Edit icon next to the default server.
  4. Update the following in the Server Details section:
    • 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 are 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 object has four fields on the Data page, and is used to connect the Oracle Blockchain Platform instances with the correct backend for each bank. For example, if a user enters Bank1 details in the ParticipantOrg1 system, the application must link ParticipantOrg1 with Bank1. This way, whenever a user associated with Bank1 logs in, the system knows to pull data from the ParticipantOrg1 back end.

In this business object, update the BankName and mspId columns for the respective orgName values. The updates must correspond to the number of participant organizations in the network. For example, if there are two participant organizations in the network, you must update the BankName and mspId columns for these two organizations. For the remaining participant organizations (ParticipantOrg3, ParticipantOrg4, ParticipantOrg5, ParticipantOrg6), leave the BankName and mspId columns set to the empty value.

Field Name Description Default Values Update Required (Yes/No) Update Requirement
BankName The mapping used between Oracle Blockchain Platform instance names and the bank names used in the CBDC Application.

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

CentralBank, Bank1, Bank2, Bank3, Bank4, Bank5, Bank6 Yes Required for active participant organizations; leave empty for unused participant organizations.
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. CentralBank, Bank1, Bank2, Bank3, Bank4, Bank5, Bank6 Yes Required for active participant organizations; leave empty for unused participant organizations.
OrgName This column represents orgName values that map with the backend. SystemOwner represents the founder and ParticipantOrg# represents the participants. SystemOwner,ParticipantOrg1,ParticipantOrg2, ParticipantOrg3, ParticipantOrg4, ParticipantOrg5, ParticipantOrg6 No N/A

Peers

This business object is designed to store information about the peers in all Oracle Blockchain Platform instances in the network. To enter the peer URL details into the business object, 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 and two financial institutions, each with two peers, you must enter a total of six peer URLs along with their associated mspId values.

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 must be added to the common channel that was 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 checkboxes 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.
      OACSystemOwnerProjectPath
      The project path for the system owner workbook in Analytics Cloud.
      OACParticipantOrgProjectPath
      The project path for the participant organization 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>