I created android chatbot using IBM watson, while chatting with watson at some point I will stop the conversation and call my webservice to get the conversation result from my database. I want to call my on premise webservice to get the results from my database in my android app. For this I created a Nodejs application in bluemix cloud where I am calling my webservice. How can I connect my cloud dialog node to call Nodejs application so that nodejs will return the webservice response to dialog and dialog will send it to android app.
Asked
Active
Viewed 217 times
0
-
Could you be more specific about the architecture and requirements? What have you already tested? Here is a tutorial about calling into a database from Conversation https://console.bluemix.net/docs/tutorials/slack-chatbot-database-watson.html It uses the server-side calls. It seems you are looking for client action or something else. – data_henrik Feb 21 '18 at 09:21
-
After the conversation between android app and watson is over I get all the context variables from the conversation service. I will send these context variables to my webservice to get the results from my database and display in the android app. Now do I need to call the webservice from my android app or watson will make the call to my webservice. Can I achieve this flow :- Android app <----> watson <--->web server – Manish Pathak Feb 21 '18 at 09:50
1 Answers
0
Taking a look at the overall architecture diagram, you will notice that Watson Conversation is a service that can be used to complement an application. It is not an app server in itself.
For what you want to do, there are a couple of options:
- Use the dialog actions in Conversation to make that web server call. For a server action, that call would need to be wrapped into a Cloud Function action (some restrictions apply, see docs). For a client action, you would need an app server (client) to handle that action. This brings us to the next option.
- Have an app server that is between your Android app and the Conversation service. It detects if a client action was raised. It can also handle other ways of reaching out for external services. See the replaced markers example in this Github repo.
- some variations of the above
Having the separate app server is the best option as it provides flexibility. Server actions with IBM Cloud Functions should work, too, but Conversation expects certain reponse times. Not sure you get them when calling out to on-prem.

data_henrik
- 16,724
- 2
- 28
- 49
-
Yes exactly, I got you. My concern is do I need to make a service call to my webserver from conversation dialog or from my android application. whether this scenario :- Android <----> watson <---> my webserver or this scenario :- Android <----> watson , (Get data from watson and hit the webservice from android) Android <----> webserver – Manish Pathak Feb 21 '18 at 10:58
-
The call to your webserver, if it is part of the dialog processing / chat, should be done from the app server or from that server action. Assuming that the retrieved data is needed to make up (parts of) an answer. – data_henrik Feb 21 '18 at 11:10