Ability to comment out sections of microflows - Mendix Forum

Ability to comment out sections of microflows

8

When building microflows I often find myself wanting to test parts of the microflow but keep other parts aside. The only way I’ve found to do this for now is to delete the parts I’m not testing at the moment as keeping them on the page means I can’t compile due to the errors. It would be cool if you could drag blocks you aren’t using into an annotation box so you don’t have to redo all the settings if you want to put them back in again.

asked
3 answers

Unfortunately using a simple IF Split is not always suitable. For example when trying a different approach in your Flow that leads to errors in the “commented” section. Mendix still checks this part for errors and forces you to delete or to exclude this part from the project. IMO that’s pretty unintuitive, especially considering that this is the most basic feature in other programming languages.

I hope Mendix adds this feature soon!

Created

In addition to Jord, I often use the split with a 1=0 condition combined with a merge to temporarily disable a piece of code.

Or, if the logic is that important to document e.g. when redesigning, I prefer a copy of the flow, extend it with _fixnumber and exclude.

Keeping a lot of info and old logic can hinder the analysis and maintenance of code is my experience.

Created

I usually simply create an IF split with false. That way you can test and play around but not loose your old flow

Created