All of a sudden, a need arises that orchA needs call orchB 5 times within a loop. For this type of scenario, if we use the direct bound port of orchB, there are total 5 * 2 = 10 trips to message box in a request response scenario. This in turn becomes highly expensive calls. The number of persistence points becomes very high because of the presence of send - receive shapes within the loop as per the figure given below.
These expensive calls may be avoided by providing another entry point to the internal orchestration by my moving the entire logic in orchB to an internal callable orchestration.
This is in turn is being called from the previous existing orchestrations for serving the purpose of message box driven direct binding and can be internally called by the local orchestrations directly without using direct binding. This also leads to no deviation from the current design and architecture. The above implementation can be changed as the figure given below.
The orchB needs to be changed from FigA to FigB.