I am working with preparing a solution for one of my uscases. My solution is something that might look like this in abstract.
My question here is, when the two main flows are calling the same sub-flow cuncurrently, it is going to work without any issues ?
Also do I need to write the code as thread safe for all the classes that are being used as custom components/trnasformers in the sub-flow ?
My abstract configuration looks as given below.
<flow name="mainflow_1" >
<inbound-endpoint/>
<transformer ....>
<component ....>
<flow-ref name="subflow_1"></flow-ref>
<transformer ....>
<component ...>
<outbound-endpoint ....>
</flow>
<flow name="mainflow_2" >
<inbound-endpoint type="request-response" />
<transformer ....>
<component ....>
<flow-ref name="subflow_1"></flow-ref>
<transformer ....>
<component ...>
</flow>
<sub-flow name="subflow_1" >
<transformer ....>
<component ....>
<outbound-endpoint call to some service >
<transformer ....>
<component ...>
</sub-flow>
Please guide me.