Search code examples
biztalkbiztalk-2013

Asynchronous processing of parallel shapes in BizTalk orchestration


Is there any way by which I can make the various parallel shapes in BizTalk orchestration to get processed in asynchronous way? More specifically, if any one of the parallel shape fails while getting executed, it should not affect the other parallel shapes execution.


Solution

  • As you found out the parallel shapes in a BizTalk Orchestration aren't truly independent to each other. It will try and execute the steps in the first parallel action and only start on one of the other parallel actions when it is waiting on a response on the current parallel action. Any failures or termination can lead to unexpected results as per.

    How to Configure the Parallel Actions Shape

    Caution If you place a Terminate shape inside a Parallel Actions shape, and the branch with the Terminate on it is run, the instance completes immediately, regardless of whether other branches have finished running. Depending on your design, results might be unpredictable in this case.

    Your options are

    1. Have a scope inside each branch of the parallel shape, so if there is a failure it is caught but doesn't stop the execution of the other branches. Note: If the execution of the steps inside the parallel shapes are of short duration it probably would pay just to remove the parallel shape altogether and just have some scopes following each other.

    2. Have Start Orchestration shapes that call an other Orchestrations that do the processing. A failure in the Orchestration you started won't stop the execution in the Orchestration you started it from.