Register today for Oracle CloudWorld. October 17th - 20th, Las Vegas

Register now

Hillel Cooperman, Senior VP of User Experience Design, has a message for you on Oracle CloudWorld

Watch now
How to set a flow variable from a custom component — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How to set a flow variable from a custom component

Received Response
20
Views
2
Comments
edited Aug 2, 2018 2:33PM in Digital Assistant and Mobile 2 comments

Summary

Trying to set the value of a variable from a custom component and use this value later in the bot flow

Content

Hi,

I would like a custom component to populate a flow variable but can't succeed .

The custom component is properly called and the flow works fine, but the variable is not populated , what in my usage of conversation.variable() is wrong as i thought it would populate the variable responseVar1 properly ?

NB : I am an Oracle Employee Running IBCS on a VM

 

 

Code Snippet

///////////////////////////// Flow ////////////////////////

context:
  variables:
....
    responseVar1 : "string" 
states:

....

  getData:
    component: "DataRetrieval"
    properties:
      responseVar: "${responseVar1}" 

  printData:
    component: "System.Output"
    properties:
      text: "${responseVar1}"
    transitions:
      return: "printData"  



////////////// Custom Component ////////////////

...
module.exports = {
...
    metadata: () => ({
        "name": "DataRetrieval",
        "properties": {
        "responseVar":

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!