Form Close - Action not working

I've added a Microflow to a widget's action. In the microflow I execute the "Close form" Action but it doesn't work. So firstly I suspected that its my widget. Its not the only widget unable to execute that action in the microflow. When I add a Dynamic Workflow Trigger widget, the same thing happens, the form does not close. All other actions inside the microflow gets executed, its just the close form that fails. If you add a normal microflow trigger however widget however, it works. Same microflow, different results. Could something in Mendix' implementation of Dojo framework have changed or is there something I can code inside the widget to make it happen?
1 answers

A close form instruction is a so-called component call, which is executed on the caller of the microflow (your widget). The easiest way to handle close form instructions in your widget is:

Mixing in mxui.mixin._Scriptable

Define 'mxui.mixin._Scriptable' as a mixin for the widget. This mixin adds some methods to the widget, which are used by the client to invoke instructions from the server.

mxui.widget.declare("your.custom.widget", {
    mixins : [ mxui.mixin._Scriptable ],
    startup : function() {
        // ...

Handle close form instructions

While constructing the widget, show that the widget can handle close form instructions:


Implement the close method

Create a method to be called when a close form instruction is returned. If the current form should be closed, this method would look like:

close : function() {

Let your widget be the caller

Pass a reference to the widget when executing the microflow so that component calls are executed on the widget:

mx.ui.action("your.microflow", {
    caller : this,
    callback : function() {
        // ...