Feed Icon  

Contact

  • Bryant Likes
  • Send mail to the author(s) E-mail
  • twitter
  • View Bryant Likes's profile on LinkedIn
  • del.icio.us
Get Microsoft Silverlight
by clicking "Install Microsoft Silverlight" you accept the
Silverlight license agreement

Hosting By

Hot Topics

Tags

Open Source Projects

Archives

Ads

BizTalk Expression Quiz

Posted in BizTalk at Sunday, May 15, 2005 4:07 PM Pacific Daylight Time

One of the things I've been working on with BizTalk is trying to understand the best way to accomplish things like logging. In my journey to understand this I came accross something that I think is rather interesting.

What is the difference in the number of lines of code executed between the following two expression shapes?

Shape1:

 Variable_1 = 1;

Shape2:

 Variable_1 = 1;
 Variable_1 = 2;

Any ideas? I can tell you that the answer is not one. Based on my spelunking the answer is somewhere closer to 20. I think it is hard to qualify a "line of code" and it is hard to measure external calls, but in my research I was at well over 20 lines of code. Basically BizTalk saves its state and updates its status for each line of code in an expression shape. This makes for a case to use some custom code that BizTalk calls since the overhead per line of code is pretty high.

Monday, May 16, 2005 1:25:00 AM (Pacific Daylight Time, UTC-07:00)
Wow, thats quite a big amount of overhead.
<br>
<br>I'm suprised, and yes, a good reason to have a std C# class along side your project to handle expressions too complex
BA
Friday, September 25, 2009 11:30:10 PM (Pacific Daylight Time, UTC-07:00)
Bryant,

According to your explaination the lines of code executed between the two lines is 20 and the reason which you gave is the saving of states. BizTalk Orchestration has persistent points which are used to save the state of an orchestration to the SQL Server database and it can rehydrate (get active) and start running from its last persisted state.

However the lines of codes you have mentioned is not true for the expression shapes. You cannot tell the exact amount of code or process that executed between the shapes. If you compile your orchestration you can get the C# version of the orchestration and you can see the code generated from the orchestration.

Regarding the persistent points there are some shapes at which persistent points are created like Send/Receive and atomic scopes. Not on every expression shapes are persistent points created.

The solution which you gave explains that if you use an external C# assembly and call it in the expression shape you can save the 20 lines of codes which is not true. BizTalk will still create persistent points and usually there is an extra overhead in calling the external procedures from assembly as the assembly is loaded cached and executed.
Monday, September 28, 2009 8:46:28 AM (Pacific Daylight Time, UTC-07:00)
Thanks for the comment Abdul, however, I disagree. I think you missed the point I was trying to make. The point is if you put those two lines into a single method of an external assembly, then you will save the 20 lines.
Bryant Likes
Comments are closed.