When I try to use node actions within subflows, I get the
Warning: node actions disabled within subflow error.
Our project is modularized into subflows to make things more readable and maintainable. I was also hoping that this would allow us to use the node-red-contrib-flow-asserter module to create "unit tests" for each subflow that we can run while developing within the subflows. However, this module requires being able to take actions within the subflow in order to run the tests. I could theoretically create a separate flow page that tests subflows by doing basic blackbox input to output testing of the subflows, but I would like to be more granular than that. There is some logic that happens in the subflows that would not be able to be tested that way.
Other issues this creates:
- Cannot use inject nodes in subflows to test them out or run them independently of whole flow
- Cannot turn on and off debug nodes - have to add and delete them instead
The subflow functionality seems really powerful, but it feels like the inability to take actions from within subflows really holds it back.
What is the reason behind this decision?
Is this something that can be added to the future roadmap?
Current workarounds that I can think of:
- Create separate flows and use http in/out messages between the flows to try and create an architecture that is kind of like implementing subflows
- Try out the node-red-node-test-helper testing route, and manage all tests outside of node-red editor
- Pull everything out of the subflows and put them into groups on one really big flow page