While creating a pluggable widget, I encountered that you cannot have a property type ‘microflow‘ or ‘nanoflow’ I only want a property of type microflow or nanoflow, but I need to select te type ‘action'. With this type of property, you can choose several actions. I want to restrict the choice to microflow or nanoflow, just as the ‘old’ custom widgets or like the ‘attribute' type.
Could you implement this?
@Marco I’m trying to accomplish the same thing where I want to execute a microflow on enter. The use case is fairly simple, you limit the potential for errors and remove the need for validating if you are calling a microflow or opening a page, etc.
Since the type=”microflow” is no longer valid, I now need to create some sort of hack to get what I need.
<property key="mfToExecute" type="microflow" required="true" defaultValue="">
<description>The microflow to execute upon hitting the enter key</description>
<returnType type="Boolean" />
@Marco The use case is https://appstore.home.mendix.com/link/app/108838/Simplylogic/Dynamic-Classes which she is turning into a pluggable widget. But also where the action is used as a datasource. Personally I think it would be great if you can add which actions are allowed and if nothing is specified all actions are allowed even future unknown ones.
Of course this could be handled in other ways but I think this should be available from the widget configuration to guide users of the widgets instead of hacks to get to the same result.
We made that decision on purpose, for the widget developer it shouldn't matter what action the widget is triggering, as this is for the modeler to decide. As an example, if you are building a custom fancy button, as widget developer you only care about triggering the action and not about what the action actually is. This gives the full control to the one who is configuring the pluggable widget. Another advantage is when a new action is introduced all pluggable widgets can immediately use it, without changing the pluggable widget source code.
That said, what is your use case where limiting the set of available actions would be helpful?