A subflow template is a type of subflow that has predetermined inputs, outputs, and maybe env variables too, defined as JSON Schemas, but has no implementation. The implementation is done by the developer who is going to use that subflow
Use case:
I have a flow that the main flow must follow this pattern
Node A -> Subflow B(1) -> Subflow B(2) ->... Subflow B(3) -> Node C
Subflows B are templates that I created and I need developers to implement them. The outputs and inputs of these subflows can't be changed by the developer. The developer must ensure the inputs and outputs conform to the described template pattern. At runtime Subflow Templates will throw exception if the input or output data doesn't comply with its specs.
Another use case is that it would be possible to create examples with subflow templates, and share those with my library of nodes.
When clicking on the deploy buttonn, a verification will run to validate if there are subflows templates with missing implementations.
Possible feature for the future:
When/if node-red is rewritten in typescript, we could define subflow templates outputs and inputs with interfaces and types, and validate them at compile time. With ts the subflow template wrapper/node would accept generics for inputs and outputs. In the UI/Editor there would exist 2 new configs in the form where the author of the subflow can specify the Interface/Type for inputs and outputs.