February 3, 2021

Integrating Oracle Digital Assistant with Oracle Analytics Cloud via SOAP webservice

In this post, you will see the integration between ODA (Oracle Digital Assistant) and OAC(Oracle Analytics Cloud) dashboard.

Creating OAC dashboard:

  • For the integration, we created a sample OAC dashboard as shown in the below screenshot
  • Soap services are exposed for the dashboard
Changes required to the ODA custom component:
  • Add the "soap" module to the ODA custom code node project
  • In the component javascript file, uses the below program code.  Where,  
    • createClient() is the method to create a connection to the soap WSDL which expects WSDL URL
    • Once the client is created, then you can use the methods in the Webservice
    • For example, logon() is a method that takes the user credentials as input arguments and returns a unique session  d which can be used in the further requests
    • Also in the below example, another method executeXMLQuery() is used which also part of the WSDL which expects an XML as input.
var soap = require('soap');
    var url = 'https://XXXX-XXXXXXXX-ld.analytics.ocp.oraclecloud.com/analytics-ws/saw.dll/wsdl/v12';
    var args = { name: 'username@oracle.com', password: "password" };  

    soap.createClient(url, function (err, client) {
      client.logon(args, function (err, result) {
        var sid = result.sessionID.$value;
        console.log(sid);
          rPath = "/shared/COVID19NL/Covid19NL";
 var xmlQueryArgs = {
          report: { reportPath: rPath },
          outputFormat: "",
          executionOptions: { async: '', maxRowsPerPage: '', refresh: '', presentationInfo: '', type: '' },
          sessionID: sid, 
reportParams:{variables:[{"name":"varCity","value":"Amsterdam"},  {"name":"varMonth","value":"Apr"}]}         
        };
 
        var xmlResult = "";
        var transition = "success";
        var filteredRows = [];
 client.executeXMLQuery(xmlQueryArgs, function (err, result) {
          if (err) {
            transition = "fail";            
            console.log(err.body);
            conversation.reply(err).transition(transition);
            done();
            return;
          }
          
          xmlResult = result.return.rowset.$value;
          var convert = require('xml-js');
          var options = { compact: true, ignoreComment: true, spaces: 4 };
          var resp = convert.xml2json(xmlResult, options);
          var rows = JSON.parse(resp).rowset.Row;

          if (rows && rows.length > 0) {
            filteredRows = rows;
            transition = "success";
            console.log(filteredRows);
          }
          else {
            transition = "none";
          }

          conversation.transition(transition);
          conversation.variable('resultRows', filteredRows);
          done();
        });
});
});

June 2, 2020

Oracle Blockchain Quick Start Guide - Global available links

This book "Oracle Blockchain Quick Start Guide" systematically takes you through distributed ledger technology, blockchain, and Hyperledger Fabric while also helping you understand the significance of Blockchain-as-a-Service (BaaS).

This book is available globally now in multiple channels. Below are a few of them.

September 17, 2019

Oracle Blockchain Quick Start Guide

Want to start learning Blockchain and be comfortable in building an enterprise blockchain solution using the Oracle Blockchain Platform? Hope this book "Oracle Blockchain Quick Start Guide - A practical approach to implementing blockchain in your enterprise" (Authored by Vivek Acharya, Nimesh Prakash, and Me, published by Packt) would help you.

This book is intended to become a quick reference to learn Blockchain, Hyperledger Fabric, Design strategies, and build chaincode on the Oracle Blockchain Platform.

This book covers,
  • Exploring Blockchain and Blockchain-as-a-service (BaaS)
  • Construing Distributed Ledger Tech and Blockchain
  • Delving into Hyperledger Fabric
  • Engage in Business Case on Blockchain platform
  • Manage Solutions on Oracle Blockchain Platform
  • Developing Solutions on Oracle Blockchain Platform
For the convenience of beginners and developers, this book also provides all the code samples to download and execute.

The book is Globally available on Packt, Amazon, Google, and Kobo.

Oracle Blockchain Quick Start Guide