How can I call microflow or nanoflow with parameters from a React Widget

How can I call microflow or nanoflow with parameters from a React Widget? I can retrieve data from Mendix to React Widget. But How can I send data from React Widget to Mendix?   Regards, Armando
3 answers

To call a microflow or nanoflow from a widget use the client API:

Here is an example that passes an object to the microflow:{
    params: {
        applyto: "selection",
        actionname: "MyFirstModule.GetFavoriteFood",
        guids: [ "281530811285515" ]
    origin: this.mxform,
    callback: function() {
    error: function(error) {

Note that it is currently not possible to send more than one parameter (unless it is a list of the same entity) or to send primitives such as string, boolean. As a workaround set a string attribute on an object and use that instead of a primitive string variable.

Hope this helps!

PS: Sorry for the bad formatting, the code widget wont accept any new lines


Declare a property of type “action” in your .xml

<property key="<key>" type="action" required="true">

Use this in your component like this:

if (this.props.<key>) {

If the configured action has a parameter the widget will derive this from the entity context you placed the widget inside of.



Take a look at this manual n how to call a nanoflow from a javascript. You can pass the nanoflow as a parameter. See section 2.2.2

For calling a microflow: you can call a microflow from a nanoflow. So it takes two steps, but then you are there.