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
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 ordsEndpointUrls
object, generic mode:
Sample"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>" }
ordsEndpointUrls
object, confidential mode:
Sample"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" }
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
- 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 that you want to update. Click Servers.
- Click the Edit icon next to the default server.
- 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
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 (
- 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
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 all backends.
Backend Configuration for Rich History Database Interactions
Each organization has a dedicated backend that manages access to the rich history database.
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.
- 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 appropriate backend. Click Servers.
- Click the Edit icon next to the default server.
- 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:
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 are listed.
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, 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.
- 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 checkboxes 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