When you drag a flow/subflow rectangle from the MuleSoft palette, you must make three decisions.
Is this a flow or a subflow? A flow can have exception strategies and is the default rectangle with a source and process. The subflow is just a synchronous sub-routine that makes the original flow more readable, like functions do in Java. You could technically insert all of a subflow’s contents into the flow reference where the subflow is called. Subflows don’t have error handling or anything. They are just a way to make flows shorter by outsourcing the extra stuff, almost like Java methods.
- Only if it is a flow, is your flow public (clients can access it through a source) or private (no source exists so clients cannot call the flow)?
- Only if it is a flow, is your flow synchronous or asynchronous?
So, for every “rectangle” you create, you have to decide whether it is public/private, synchronous/asynchronous, and a flow/subflow.