Yossi Dahan [BizTalk]


Thursday, August 02, 2007

Recursive orchestrations?

I never imagined I'd find a case for this, but I did today - I could use a recursive orchestration.

I have a simple orchestration that takes a request message and calls a web service with parameters our of that reuqets (after doing some work on them and making a couple of checks).

In certain situations the orchestration needs to call the web service more than once - so I figured - theoretically, instaed of reaeating the web service call in the orchestration or trying to get it in a loop, I could simply create my own request message with the new parameters and call myself. classic recursion.

Only that BizTalk does not let you do this, and I suspect this is just a UI limitation - it is as simple as the fact that when you open the call orchestration dialog you see all the orchestrations in the assembly but "yourself".

If I had some time I would try editing the ODX file directly to get this to work just to prove whether this is just a UI limitation or not, but I can't afford taking the time now and anyway it would not be helpful as editing the ODX files is ALWAYS a bad idea!


(I've added a follow up on this here)

Labels: ,


  • I faced the same problem of not being able to call an orchestration recursively. So I thought that, even though it's dirty, I could use a dummy orchestration with just another Call Orchestration shape. That resulted in a compile time error "direct or indirect recursive calls are disallowed".

    Conclusion: recursive calls are disallowed by design

    By Anonymous Anonymous, at 09/09/2007, 15:07  

  • Thanks for the comment - very useful to know!

    must be a good reason then...:-)

    By Blogger Yossi Dahan, at 10/09/2007, 08:28  

  • I faced a similar situation in that data I was receiving may be zipped, which may contain additional zip files...

    To solve it, I put a listen shape at the beginning of my orchestration. One branch held my receive shape for the initial receive to start the orchestration. The other received a message from a port that had a direct bound partner in the same orchestration. The partner port was used at the point in my orchestration where I wanted the orchestration to "call itself."

    By Blogger Adam, at 19/09/2007, 23:28  

  • Fantasatic Adam - tried this today and worked like a charm - loved it!

    By Blogger Yossi Dahan, at 20/09/2007, 09:46  

Post a Comment

<< Home