hao to call nanoflow or microflow in javaScript Action code or java Action code ?

0
hao to call nanoflow or microflow in javaScript Action code  or java Action code ?
asked
5 answers
1

Hi Qin,

How to call a nanoflow in a JavaScript actions with the Nanoflow parameter (not sure what version it was introduced)

https://docs.mendix.com/refguide/javascript-actions#2-2-2-type

Before it was a bit harder, to get the nanoflow exported, it required a helper widget

https://appstore.home.mendix.com/link/app/111132/

Alternatively, you could also return the date from the the JS action and call a sub nanoflow (now supported) with the data of your custom action.

Cheers, Andries

 

answered
2

The microflow name is not just “ACT_CheckLogin” but it includes the module name e.g. “MyModule.ACT_CheckLogin”

The context parameter you can leave out and the origin should be something like “this.mxform”

Also, make sure to call resolve and reject in the callback and error respectively.

answered
1

Hi,

You can pass a Nanoflow as a parameter as shown below. And also refer the details in this link.

https://docs.mendix.com/refguide/javascript-actions

 

answered
1

Although the question was primarily about JavaScript and others have answered that, it was also asked how to call microflows from Java Actions. 

I wrote an article on this a while back as this changed in Mendix 8.7. 

https://medium.com/mendix/the-new-way-to-call-mendix-microflows-from-java-actions-46152923dbbc

Hope this also helps.

answered
0

I was finally helped by Andries’ answer here – just return the nanoflow({})

return nanoFlowToFireOnClick({});

answered