BizTalk Server 2010: .NET Helper Classes

BizTalk Server 2010: .NET Helper Classes


Introduction

.NET classes can be used inside an orchestration. They can be divided into two distinct categories according to Optimizing Orchestration Performance recommendations:

  • Helpers and services - These classes provide common services to orchestrations such as tracing, error handling, caching, and serialization/deserialization. Most of these classes can be implemented as static classes with no internal state and multiple public static methods. This approach avoids creating multiple objects of the same class in different orchestrations running at the same time, which helps to reduce the working space of host processes and save memory. A class that is stateless helps to reduce the overall size of the internal state that must be serialized and persisted to the BizTalk MessageBox when an orchestration is dehydrated.
  • Entities and Business Objects - You can use these classes to manage entities, such as orders, order items, and customers. A single orchestration can internally create and manage multiple instances of the same type. These classes are typically stateful, and expose public fields and/or properties along with methods to modify the internal state of the object. Instances of these classes can be dynamically created by deserializing an XLANGMessage part into a .NET object by using the XmlSerializer or the DataContractSerializer classes or by using the XLANGPart.RetrieveAs method. You should structure an orchestration using non-transactional scopes in such a way that instances of stateful classes are created as late as possible and released as soon as they are no longer needed. This approach reduces the working space of host processes and minimizes the overall size of the internal state that is serialized and persisted to the MessageBox database when an orchestration is dehydrated.
This article will focus on the first category .NET Helper classes.

Helper Class .NET

A class can be created inside Visual Studio using the class library template. You open Visual Studio and create a new class library project. This project can contain one or more classes. Each class will have be marked as Serializable, see sample code below:

[Serializable]
public static class YourClass
{
     public static type myMethod(type myparameter, ....)
     {
           ...your code
     }
  
     ... if necessary you can implement more static methods!
}

.NET Classes can be useful to create an instance of message, look up reference or other data, perform queries in the message, and obtain custom configuration settings.

Samples

See Also

Read suggested related topics:

Another important place to find a huge amount of BizTalk related articles is the TechNet Wiki itself. The best entry point is BizTalk Server Resources on the TechNet Wiki.
Leave a Comment
  • Please add 8 and 6 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Sort by: Published Date | Most Recent | Most Useful
Comments
  • Steef-Jan Wiggers edited Revision 19. Comment: Added resource link, minor edits

  • Steef-Jan Wiggers edited Revision 18. Comment: Removed note remark

  • Steef-Jan Wiggers edited Revision 12. Comment: Minor edit

  • Steef-Jan Wiggers edited Revision 10. Comment: Added text

  • Steef-Jan Wiggers edited Revision 9. Comment: Added text

  • Steef-Jan Wiggers edited Revision 8. Comment: Added text

  • Steef-Jan Wiggers edited Revision 7. Comment: Added resource link

  • Steef-Jan Wiggers edited Revision 6. Comment: Added text

  • Steef-Jan Wiggers edited Revision 5. Comment: Added resource link

  • Steef-Jan Wiggers edited Revision 4. Comment: Added resource link

Page 1 of 2 (14 items) 12
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Comments
  • Steef-Jan Wiggers edited Original. Comment: Added text

  • Steef-Jan Wiggers edited Revision 1. Comment: Added text

  • Steef-Jan Wiggers edited Revision 2. Comment: Added resource link

  • Steef-Jan Wiggers edited Revision 3. Comment: Formatting

  • Steef-Jan Wiggers edited Revision 4. Comment: Added resource link

  • Steef-Jan Wiggers edited Revision 5. Comment: Added resource link

  • Steef-Jan Wiggers edited Revision 6. Comment: Added text

  • Steef-Jan Wiggers edited Revision 7. Comment: Added resource link

  • Steef-Jan Wiggers edited Revision 8. Comment: Added text

  • Steef-Jan Wiggers edited Revision 9. Comment: Added text

  • Steef-Jan Wiggers edited Revision 10. Comment: Added text

  • Steef-Jan Wiggers edited Revision 12. Comment: Minor edit

  • Steef-Jan Wiggers edited Revision 18. Comment: Removed note remark

  • Steef-Jan Wiggers edited Revision 19. Comment: Added resource link, minor edits

Page 1 of 1 (14 items)