Parallel shapes in BizTalk Server

1.3k views Asked by At

I am using parallel shapes in the BizTalk orchestration. There are four parallel branches in the shape and in each branch I am using a scope shape (Transaction Type = None) with subsequent catch block and the execution logic is placed in the scope shape.

This parallel Shape is also contained in a scope (Transaction Type = None ) in the orchestration with corresponding catch block.

Now what is the supposed behaviour if the execution in one of the branch fails? As per me if execution of one branch fails, the execution of other branch should have been taken place.

But in my orchestration if one branch execution fails the other branch execution is not started even. It seems like that other branch starts executes after the previous branch code is executed successfully.

Please tell me what can be the possible source of this behaviour?

2

There are 2 answers

0
zurebe-pieter On

According to MSDN, the Parallel shape will have all its branches run independently See MSDN: http://msdn.microsoft.com/en-us/library/ee253584(v=bts.10).aspx

However, this is from a business process perspective, not from a technical one. If one of your branches fails, it is perfectly possible that other branches will not be executed. As far as I know, you don't have any control over the order of execution (not sure about that one though).

See this small blog post for more information: http://blogs.msdn.com/b/pkelcey/archive/2006/08/22/705171.aspx

An aggregator pattern might be a good idea here, depending on your specific situation. It would give you full control over the situation.

0
Bensonius On

Basically, if one of the branches fail, then all of the branches fail. The key point to remember is:

All branches come together at the end of the Parallel Actions shape, and processing does not continue until all have completed.

So, if one of then branches fails, then they will never converge. If an exception is thrown on one branch, the catch block will catch it and all the other branches will cease to process any incoming messages. It's my understanding that Parallel branches are mostly used in message correlation for situations where you need to wait for more than one message to arrive in order to be able to proceed. Order of branch execution is determined by order of the messages received that each branch is expecting.