Call nanoflow activity in microflow - Mendix Forum

Call nanoflow activity in microflow

4

For reusability and proper security, I would like to trigger validation flows both client side as server side. Therefore I would like to call a nanoflow from a microflow to make this possible. In that way, I don't have to build the validation flow twice 😊

 

Background info:

Building validation flows in microflows will cause a server call when called from nanoflow (undesired for performance), but building them only in nanoflows will cause improper security (you can bypass if you'd like). So having the best of performance and security, I would like to have one definition of validation flows which I can trigger from both nanoflows and microflows. Of course: "Apply entity access" should be automatically turned on for these 'sub nanoflows'.

I think calling nanoflows from Microflows does make sense, as the only unsupported activity is the Javascript Action (must be skipped). Nanoflows are 'just' JSON-objects which can be evaluated server side as well.

Maybe the document type "rule" would be more appropriate for this, but at the moment the "Rule" activity is unspported in Nanoflows and the "Show validation feedback" activity is unsupported in Rules.

 

(P.S. I already had this idea years ago 😉)

asked
1 answers

I think rather than calling a nanoflow from a microflow, perhaps it would be possible for the client to recognize which flows only use actions that are supported in both microflows and nanoflows, and just mark those as a third type that can be called from either a microflow or a nanoflow and then executed on the server or in the client respectively, depending on whether you use a "call microflow" action or a "call nanoflow" action. 

Created