How to call a nanoflow in JavaScript action?

0
Hi Everyone, I have to call a nanoflow in JavaScript action. But I’m a facing challenge. I’ve to pass the parameter (object from JS to nanoflow) also. In setting, I’ve added a parameter of nanoflow type with the same name of Nanoflow. Code Used:  mx.data.callNanoflow({ nanoflow: this.aCT_OpenAlternatePlanCard, origin: this.mxform, context: { "parameterName": towScheduler }, callback: function(result) { alert("Nanoflow completed with result " + result); }, error: function(error) { alert(error.message); } });   Error message: Cannot read properties of undefined (reading 'aCT_OpenAlternatePlanCard') TypeError: Cannot read properties of undefined (reading 'aCT_OpenAlternatePlanCard')     at http://localhost:8080/jsactions.js?638319292074163738:144:22     at Object.dispatch (https://www.amcharts.com/lib/4/core.js:1:902172)     at https://www.amcharts.com/lib/4/core.js:1:901422     at e.each (https://www.amcharts.com/lib/4/core.js:1:848211)     at t._eachListener (https://www.amcharts.com/lib/4/core.js:1:901104)     at t.dispatchImmediately (https://www.amcharts.com/lib/4/core.js:1:901357)     at e._dispatchSpritePointEvent (https://www.amcharts.com/lib/4/core.js:1:874568)     at Object.dispatch (https://www.amcharts.com/lib/4/core.js:1:902172)     at https://www.amcharts.com/lib/4/core.js:1:901422     at e.each (https://www.amcharts.com/lib/4/core.js:1:848211)   Can anyone has idea about how to call nanoflow in JS action? 
asked
2 answers
0

Hi Sumesh,

 

hava a look at this question

answered
0

The error mentions that it cannot find your nanoflow aCT… and the reason probably is that you changed the context. Change it to

context: this.mxcontext,

and it will probably search in the correct context and find your nanoflow.

answered