I have noticed that many visitors of this blog have been searching for “multiple receive shapes” or something comparable. Therefore, some of the basics explained below. See also another post here:
- For each orchestration you design, you will have to make clear how a new instance of the orchestration can be started. This can be done because it is called by another orchestration instance. The most common way of starting a new orchestration instance is by means of an activating receive shape.
- Simple orchestrations usually have a receive shape at the start, followed by some operations, and are concluded with a send shape. Remember that you always have to specify that the only receive shape in the orchestration will be the activating receive shape? (I usually don't, until I get the error message from the build process.) When marking the receive shape as “activating“, you tell BizTalk that it should create a new instance of the orchestration (runtime) when a message is delivered to this shape.
- It becomes a little more complex when you need to use more receive shapes in the orchestration. Simply adding them is not sufficient. Marking all receive shapes as “activating“ is no possibility. It could take quite some attempts before you realize that you need to specify the behavior of the orchestration towards messages coming in on each of the receive shapes. This is called correlation. An orchestration using multiple receive shapes (and therefore, one or more correlations) implements (one or more) convoys.
- Basically, for an orchestration with multiple receive ports, you have to specify which receive shape(s) will fire up a new orchestration when a new message is delivered to it. For messages that will not lead to a new orchestration instance (meaning that they will be delivered to an already existing instance), how they relate to the instantiated orchestrations.