Digital Assistant and Mobile

Get Involved. Join the Conversation.

Posts

  • Pallavi N
    Custom API - post Method275.0
    Topic posted March 8, 2017 by Pallavi NBlue Ribbon: 750+ Points 
    Title:
    Custom API - post Method
    Summary:
    Custom API - post Method
    Content:

    Hi,

    I created a custom API which has an endpoint with POST method to call a connector API ( connects to EBS R12). Here is the code I am using

    service.post('/mobile/custom/ExpenseHeaderDetCust/HeaderDet', function (req, res) {

      console.log('getting ready to call POST /mobile/custom/ExpenseHeaderDetCust/HeaderDet');

      var sdk = req.oracleMobile;

      var optionList = {

      //uri: '/mobile/connector/ExpenseHeaderDetails'

      };

      var jsnObj = {

      Body: {

      "ExpenseCount": {

      "@xmlns": "http://vis1225.dpebs-server.com:8000/webservices/rest/ExpenseCount/get_smart_exp_cnt_dtls_f",

      "RESTHeader": {

      "xmlns": "http://vis1225.dpebs-server.com:8000/webservices/rest/ExpenseCount/header",

      "Responsibility": "SYSTEM_ADMINISTRATOR",

      "RespApplication": "SYSADMIN",

      "SecurityGroup": "STANDARD",

      "NLSLanguage": "AMERICAN",

      "Org_Id": "204"

      },

      "InputParameters": {

      "P_REPORT_HEADER_ID": "37345"

      }

      }

      }

      };

      optionList.body = JSON.stringify(jsnObj);

      optionList.headers = {'Content-Type': 'application/json;charset=UTF-8'};

      optionList.headers = {'oracle-mobile-backend-id': 'd838ab82-9755-4f54-bca1-38270afac134'};

      optionList.headers = {'Authorization': 'SU5BTEdBUllUTVRSSUFMX0RFVkVMT1BNRU5UMV9NT0JJTEVfQU5PTllNT1VTX0FQUElEOkFyZzJlanZfc3oxcW1h'};

      sdk.connectors.post('ExpenseHeaderDetails',optionList, function (error, response, body) {

      if (error) {

      res.send(response, error.message);

      } else {

      res.setHeader({'Content-Type': 'application/json;charset=UTF-8'});

      res.send(200, body);

      }

      });

      });

    };

    And I get this error when I test the custom API with status code 500

    {

      "message": "Custom Code Problem in callback: [object Object]"

    }

    Can anyone help to figure out, what might be wrong?

  • Geetha Devi
    How to use Oracle Bot into google hangout? Anyone have any...Answered26
    Topic posted October 11, 2019 by Geetha DeviBlue Ribbon: 750+ Points, tagged Alexa, Analytics, Android, API, Bots, Conversational AI, Facebook, iOS, MAX, Messaging, Mobile, Notification, OMCE, Siri, Slack, Tip, Virtual Assistant, VPA, WeChat 
    Title:
    How to use Oracle Bot into google hangout? Anyone have any doc on this?
    Summary:
    how to integrate the OMH chatbot-UI as google hangouts.
    Content:

    I  would to login  the oracle mobile hub chats using the hangout credentials.

    Dailog Flow  channel as google hangout

  • Hanumanth Y
    Your Authentication type: basicAuth undefined,225.0
    Topic posted March 1, 2017 by Hanumanth YRed Ribbon: 250+ Points 
    Title:
    Your Authentication type: basicAuth undefined,
    Summary:
    Your Authentication type: basicAuth undefined,
    Content:

    var mcs_config = {

      "logLevel": mcs.LOG_LEVEL.INFO,

      "logHTTP": true,

      "mobileBackends": {

        "TEST": {

          "default": true,

          "baseUrl": "https://development1-inalgarytmtrial.mobileenv.us2.oraclecloud.com:443",

          "applicationKey": "YOUR_BACKEND_APPLICATION_KEY",

            "authorization": {

            "basicAuth": {

              "backendId": "d838ab82-9755-4f54-bca1-38270afac134",

              "anonymousToken": "SU5BTEdBUllUTVRSSUFMX0RFVkVMT1BNRU5UMV9NT0JJTEVfQU5PTllNT1VTX0FQUElEOkFyZzJlanZfc3oxcW1h"

            }

          }

        }

      },

    };

      // initialize MCS mobile backend

        mcs.MobileBackendManager.setConfig(mcs_config);

        var mbe = mcs.MobileBackendManager.getMobileBackend('TEST');

        mbe.setAuthenticationType("basicAuth");

    var invokeCustomAPI = function(uri,method,payload) {

      var deferred = $q.defer();

       mbe.CustomCode.invokeCustomCodeJSONRequest(uri , method , payload

       , function(statusCode,data) {deferred.resolve(data)}

       , function(statusCode,data) {deferred.reject(statusCode,data)});        

       return deferred.promise;

    };

    var getHttpHeaders = function() {

        return mbe.getHttpHeaders();

    }

    var getCustomApiUrl = function(customUri) {

      return mbe.getCustomCodeUrl(customUri);   

    }

    return {

       authenticate:authenticate,

       authenticateAnonymous:authenticateAnonymous,

       logout:logout,

       invokeCustomAPI:invokeCustomAPI,

         getHttpHeaders:getHttpHeaders,

       getCustomApiUrl:getCustomApiUrl

    }

    In my controller i used

    $http({method:'GET'

                        ,url:mcsService.getCustomApiUrl("Test/HelloWorldPeople")

                        ,headers:mcsService.getHttpHeaders()})

                    .then(function(response){

                        $scope.departments = response.data;

                        console.log( $scope.departments);

                     })

                    .catch(function(err) {

                        console.log('Error calling endpoint /departments: '+err);

                    });

    When I used this code for connecting with the MCS mobile backend  I am getting basicAuth undefined and also the below error

    Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8100' is therefore not allowed access. The response had HTTP status code 401.

    can any one please help me...

  • jigo jacob
    Oracle PAAS offering for end to end mobile development16
    Topic posted November 22, 2018 by jigo jacobGreen Ribbon: 100+ Points, tagged Android, iOS, Mobile, Tip 
    Title:
    Oracle PAAS offering for end to end mobile development
    Content:

     We are exploring Mobile development platform, does anybody know of any Oracle Cloud offering for the same.

     

    It's a bit confusing and I am new to Oracle PAAS offering. Did look up some videos about Oracle PAAS but not very clear.

     

    Just want some inputs with the Oracle Mobile Cloud Service (MCS), the development tool seems to be MAX, basically for business users. I am guessing the MAX tool generates an underlying MAF application.

     

    Question 1): Is there any provision in the Oracle MCS to develop the application using Oracle JDeveloper and MAF or does it just provision backend APIs

     

    Also, is the Oracle MCS one stop shop for all mobile development needs.  Or any other software needs to be installed in addition like SQLLite so forth.

     

    2) Can anyone suggest a end to end mobile development PAAS with a working example or video.

     

    Thanks

  • Anand Raj
    Regarding Release 17.2.1 (V4.0) — April 2017165.0
    Topic posted April 10, 2017 by Anand RajRed Ribbon: 250+ Points 
    Title:
    Regarding Release 17.2.1 (V4.0) — April 2017
    Summary:
    Regarding Release 17.2.1 (V4.0) — April 2017
    Content:

    Hi All ,

    I am facing an issue with Custom Api after the "Release 17.2.1 (V4.0) — April 2017"  .

    Issue Faced

    -----------------

    I am having a third party server , say http://<IP : port>/hrmsservices/<worklist/absenceCompetencyAction> . Created connector api using the IP address .  I am getting responses from the connector api . Then i created custom api . 

    When i added a number of endpoints in the same connector api and uploaded the zip file to MCS , I am getting success response from the custom api also for those endoints that i have added at the time of Custom API creation .

    Issue comes when i and another or a number of endpoints to the same custom API . The error that i am getting is

    {

           "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",

            "status": 404,

           "title": "API not found",

           "detail": "We cannot find the API *****/1.0 for the provided URL path /myprofile/employment. Verify your request parameters and try again.",

           "o:ecid": "005JCyrxvLGA9T3_Rll3id0004M900002n, 0:3",

           "o:errorCode": "MOBILE-57945",

           "o:errorPath": "/mobile/custom/*****/myprofile/employment"

    }

    ( I have added the endpoints  the custom api for the newly added APIs)

    I have noticed some new files in the " Javascripts scaffold " like " swagger.json , " , " toolsConfig.json " and " *****.raml ". 

    toolsConfig.json , swagger.json contains details about the endpoints that added for the first time during the api creation and the details of the endpoints that added later is not present .


    Could anyone please tell me how to solve this issue ? Is there any documents available for the changes after  the Release 17.2.1 (V4.0) — April 2017 .

    Thanks in Advance

  • Santosh K Jagtap
    OMCe instance provisioninf failed155.0
    Topic posted January 26, 2018 by Santosh K JagtapRed Ribbon: 250+ Points 
    Title:
    OMCe instance provisioninf failed
    Summary:
    OMCe instance provisioninf failed
    Content:

    Hi, While provisioning a OMCe instance using chatbot only standard template the provisioning gets failed because of following issue.Request your help if you faced the same:

    Jan 26, 2018 6:09:33 AM UTC    Completed load balancer configuration update for service [OMCeChatbotstackBOTSCFG].

    Jan 26, 2018 6:19:30 AM UTC    Failed to deploy application(v1) for instance(1G) omcechatbotstackbotscfg-bofg-1... Application connection failure. Application logs 2018-01-26T06:19:21.531686+00:00 OMCeChatbotstackBOTSCFG-acc[omcechatbotstackbotscfg-bofg-1]: <== Start uploading /u01/app/bin/bofg_service-config.sh to https://chatbot.au.storage.oraclecloud.com/v1/Storage-chatbot/MyContainerdorchatbots/idcs-c48d8ce515ec4df5b4bce5d828b4ea76OMCeChatbotstack/18.1.1_1712040912/bofg_service-config.sh 2018-01-26T06:19:21.945849+00:00 OMCeChatbotstackBOTSCFG-acc[omcechatbotstackbotscfg-bofg-1]: uploaded -rwxr-xr-x 1 apaas apaas 1425 Jan 26 06:19 /u01/app/bin/bofg_service-config.sh 2018-01-26T06:19:21.946287+00:00 OMCeChatbotstackBOTSCFG-acc[omcechatbotstackbotscfg-bofg-1]: ==> Done uploading /u01/app/bin/bofg_service-config.sh to https://chatbot.au.storage.oraclecloud.com/v1/Storage-chatbot/MyContainerdorchatbots/idcs-c48d8ce515ec4df5b4bce5d828b4ea76OMCeChatbotstack/18.1.1_1712040912/bofg_service-config.sh 2018-01-26T06:19:21.946580+00:00 OMCeChatbotstackBOTSCFG-acc[omcechatbotstackbotscfg-bofg-1]: Recreating Bot runtime Schema 2018-01-26T06:19:25.159107+00:00 OMCeChatbotstackBOTSCFG-acc[omcechatbotstackbotscfg-bofg-1]: Jan 26, 2018 6:19:25 AM oracle.cloud.bots.db.ScriptProcessor executeScript 2018-01-26T06:19:25.159340+00:00 OMCeChatbotstackBOTSCFG-acc[omcechatbotstackbotscfg-bofg-1]: INFO: Executing SQL " DROP USER OMCEDEV_BOTS CASCADE" 2018-01-26T06:19:26.361197+00:00 OMCeChatbotstackBOTSCFG-acc[omcechatbotstackbotscfg-bofg-1]: Jan 26, 2018 6:19:26 AM oracle.cloud.bots.db.ScriptProcessor executeScript 2018-01-26T06:19:26.361553+00:00 OMCeChatbotstackBOTSCFG-acc[omcechatbotstackbotscfg-bofg-1]: INFO: Modified row count 0 2018-01-26T06:19:26.361831+00:00 OMCeChatbotstackBOTSCFG-acc[omcechatbotstackbotscfg-bofg-1]: Jan 26, 2018 6:19:26 AM oracle.cloud.bots.db.ScriptProcessor executeScript 2018-01-26T06:19:26.362137+00:00 OMCeChatbotstackBOTSCFG-acc[omcechatbotstackbotscfg-bofg-1]: INFO: Executing SQL " DROP TABLESPACE OMCEDEV_BOTS INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS"

    Regards

    Santosh

  • Janaki Narayanan
    How to create a Connector using REST URL having headers?145.0
    Topic posted March 7, 2017 by Janaki NarayananRed Ribbon: 250+ Points 
    Title:
    How to create a Connector using REST URL having headers?
    Summary:
    How to create a Connector using REST URL having headers?
    Content:

    RestConnector.png

    I have a REST URL(ISG) that has header parameters.How can I create a REST connector using that REST URL in oracle MCS.

    The REST URL is POST method and have 5 header parameters.

    please clarify me below

    1)where I have to attach the headers of rest URL (in rules or during testing endpoint)

    2)If in testing endpoint means I have to add headers in my custom api  using Node js?

    restconnector-Op.png

    Now,I have added headers in Rules,while Testing endpoint it says authentication error so I added headers there also. Now I get 415 error code.

  • Kmuralidharan1992
    Custom API creation error135.0
    Topic posted March 27, 2017 by Kmuralidharan1992 Bronze Medal: 1,250+ Points 
    Title:
    Custom API creation error
    Summary:
    Custom API creation error
    Content:

    I cant able to create new custom API and also i cant able to test already created custom API it shows following response. How to rectify it????

    Test Response Status: 404

    {

      "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",

      "status": 404,

      "title": "API is not bound to any implementation",

      "detail": "The API custom/M_Notifications(1.0) is not bound to any implementation. Check the value of a binding policy for this API (\"*.custom/M_Notifications(1.0).Routing_BindApiToImpl\").",

      "o:ecid": "005IvETm7hpA9T3_Rll3id0000xT0002NJ, 0:4:3:14",

      "o:errorCode": "MOBILE-57946",

      "o:errorPath": "/internal-tools/env/1.0/ui-tooling/endpoint/mobile/custom/M_Notifications/m_notifications"

    }

  • Geetha Devi
    how to print the values form custom component as a link in...12
    Topic posted October 18, 2019 by Geetha DeviBlue Ribbon: 750+ Points, tagged API, Bots, Conversational AI, Messaging, Mobile, OMCE, Slack, Virtual Assistant, VPA, WeChat 
    Title:
    how to print the values form custom component as a link in skill ODA?
    Summary:
    I would to print value coming from custom component as link
    Content:

    My requirement is to print the output from the custom component as a link.

    Below out I am getting from the custom API. I would like to show each line as a link.

    2019-10-21 to 2019-10-27 (29 hrs)

     2019-07-08 to 2019-07-14 (.5 hrs)

    2019-07-01 to 2019-07-07 (1.4 hrs)

    Below YAML to print  this output

      Print:
        component: "System.List"
        properties:
          options: "${Name}" #output from custom component.
          prompt: "Below are the details "
        transitions: 
          return: "done"

    Here in this attachment considering all output as a link. I would print each line as link

    Could anyone please help us?

     

    Image:
  • Dejan Dragicevic
    Flow goes into infinite loop12
    Topic posted November 19, 2018 by Dejan DragicevicGreen Ribbon: 100+ Points 
    Title:
    Flow goes into infinite loop
    Summary:
    I want the user to choose an option and if it is not correct option to choose again.
    Content:

    Hello,

    i am new to Digital Assitant and am currently trying to learn the OBotML language so I am building
    a simple test skill to test transitions. 

    My test case is this: I have one intent (Start - utterances:Hi,Hello, Hey), entities (Options - values: Option 1, Option 2, Option 3). I want the user to choose an option.
    I check if the option is the one that I want chosen. If not..the user needs to choose again. 
    If it is...continue. 

    Problem: The flow goes into a infinite loop. 

    The dialog flow is in the code snippet. 

    I also tried first resetting the value of the variable, but same problem:


    main: true
    name: "Test"
    context:
      variables:
        Options: "Options"
        iresult: "nlpresult"
    states:
      Intent:
        component: "System.Intent"
        properties:
          variable: "iresult"
        transitions:
          actions:
            Start: "start"
            Stop: "stop"
    ###############################################           
      start:
        component: "System.List"
        properties:
          options: "${Options.type.enumValues}"
          prompt: "Please choose an option?"
          variable: "Options"
        transitions: {}
      conditionEquals:
        component: "System.ConditionEquals"
        properties:
          source: "${Options.value}"
          value: "Option 2"
        transitions:
          actions:
            equal: "done"
            notequal: "reset"        
    ##############################################
      reset:
        component: "System.ResetVariables"
        properties:
          variableList: "${Options.value}"
        transitions: {}
      isreset:
        component: "System.Output"
        properties:
          text: "i reset ${Options.value}"
          keepTurn: true
        transitions:
          next: "start"
    ##############################################
      done:
        component: "System.Output"
        properties:
          text: "You have chosen ${Options.value}."
        transitions:
          return: "done"
    ##############################################  
      stop:
        component: "System.Output"
        properties:
          text: "You have stopped the dialog flow."
        transitions:
          return: "stop"

    Version:
    Version 18.4.3-1811081905
    Code Snippet: