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.
- REST proxy ID, instance URL and MSP IDs of the Oracle Blockchain
Platform instance.
See: Fetch RestproxyId
- Client ID and client secret of the Oracle Blockchain Platform instance.
- Oracle REST Data Services (ORDS) endpoint, client ID, client secret, and OAuth base URL.
- Channel name and chaincode name.
See: Deploy the Chaincode for the Wholesale CBDC Sample Application.
Update Global Variables
- On the Visual Builder Visual Applications home page, click Web Applications in the Navigator to open the Web Apps pane.
- Click the
cbdcapp
application. The app editor opens. - Select Variables.
- 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?.
- 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.
- 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.
- Select the backend you want to update. Click Servers.
- Click the Edit icon next to the default server.
- 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
andClient Secret
fields to match your Oracle Blockchain Platform ID and secret.
- Instance URL: Replace the default URL with the Oracle Blockchain Platform instance URL by modifying the base URL portion of the default URL (
- 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.
- 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.
- Select the backend you want to update. Click Servers.
- Click the Edit icon next to the default server.
- 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
andClient Secret
fields to match your Oracle Blockchain Platform ID and secret.
- Instance URL: Replace the default URL with the Oracle Blockchain Platform instance URL by modifying the base URL portion of the default URL (
- 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.
- 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.
- Select the
RichHistoryDBConfiguration DB
backend. Click Servers. - Click the Edit icon next to the default server.
- 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:
would be replaced by:https://g53630e55ee33f4-abc.def.gh-xyz-1.oraclecloudapps.com/ords/aliasName
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 theClient Secret
to match your ORDS endpoint ID and secret.
- Instance URL: Replace the default URL with
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.
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, 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.
- Get the Oracle Visual Builder domain URL.
- On the OCI console, click Developer Services > Visual Builder.
- 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
- Add the domain as a safe domain in Oracle Analytics Cloud.
- Log in to your Oracle Analytics Cloud instance, open the Oracle Analytics Cloud console, and then click Navigator Menu.
- Under Configuration and Settings, click Console > Safe Domains.
- 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.
- Select the Allow Frames and Embedding check boxes associated with the domain that you just added.
- Get the Oracle Analytics Cloud host URL.
- Log in to your Oracle Analytics Cloud instance.
- Copy the Oracle Analytics Cloud host URL from your browser's address bar. Copy the fully-qualified domain name up to
.com
, includinghttps://
.Example host URL:
https://<your-oac-instance>.analytics.ocp.example.com
- Add the Oracle Analytics Cloud host URL as an allowed origin in Oracle Visual Builder.
- Log in to your Oracle Visual Builder instance, and then click Service Homepage.
- Click Navigation Menu, then click Settings. The Tenant Settings page is displayed.
- 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.
- Update the configuration variables in the Visual Builder application.
- Open the
cbdcapp
application in the app editor, and then select Variables. - In the Global Variables section, update the following parameters in the configuration variable object.
- To get the project path of a workbook, click Navigator > Catalog on the Analytics Cloud home page.
- Click the Actions menu for the workbook, and then select Inspect. The Inspect window is displayed.
- Click the General tab, and then click Copy that is associated with the Object ID.
- Open the
- Edit the HTML in Visual Builder.
- Open the
cbdcapp
application in the app editor, and then navigate to the HTML section. - 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>
- Open the