Shared subflow context

I think I was not clear at first.

  • I don't ask for a flow and a subflow to share the flow context.
  • I don't ask for a subflow to share his flow context with other subflows.

It would be a new context called... static_subflow.

It's like static variables of a class X. If you instaciate multiple time the class X, they will all have their own private properties, but they also share static variables. I'd like to see to same for subflows.

All instances of a subflow would have their own flow context, not shared. But they would have a static_subflow context that would be shared for all intances of the same subflow.

I'd like my subflow to stores configs that are requested from the db. Now I have to store these configs into global or to repeat the same request in each subflows. It's not optimal. With a static_subflow context, I'd do a request to the database once, eg: pulling configs, then I would pass them to any instance of the subflow into msg.config. Then the sublfow detect it and store it into static_sublow. Each instances of the same subflow now have access to the same config. No need to repeat SQL request, no need to pass the same msg.config each time. No need to store anything into global. Cleaner, faster and less confusing !

Thanks

Sorry for my english