BizTalk Developer Interview Questions and Answers - Helper Class

Introduction

This article intends to cover the answers to the developer related questions on Helper classes with BizTalk, which a BizTalk developer can face during an interview.

Questions and Answers

  1. What is a helper class?
    A .net helper class with the context of BizTalk is a class (library) that can support an orchestration with extra functionality. It can enhance an orchestration in tracing, error handling, caching, and serialization/deserialization. See TechNet Wiki article BizTalk Server 2010: .NET Helper Classes.

  2. Where can the helper class be used?
    .NET (helper) classes can be used inside an orchestration. See TechNet Wiki article BizTalk Server 2010: .NET Helper Classes.

  3. A helper class which is not marked serializable , can it be used in Orchestration?
    Yes, it can used in orchestration but in an atomic scope only.

  4. Why is it required that helper class/.net assembly to be marked serializable?
    When creating an assembly that will be used by BizTalk, it is appropriate to mark all classes as serializable. Since BizTalk is stateless and makes use of persistence points, which details are stored in BizTalk SQL Server databases by serializing all the data. Therefore non-serializable Classes or Types cannot be used directly in Orchestrations.

  5. What does property "copy local" indicates?
    "Copy Local" property indicates whether the assembly referenced should be copied into the local bin directory when a project is built.

  6. Is it possible to create a .Net class variable in BizTalk if property "Use default constructor" is set to false?
    Yes it is possible, in this case the variable will need to be instantiated in an Expression shape through the new keyword.

  7. What is Gacutil.exe?
    The Global Assembly Cache tool allows you to view and manipulate the contents of the global assembly cache and download cache. See MSDN GacUtil.exe.

  8. Is there a way to automate the process of adding assembly in GAC?
    Yes. Right click the project, go to properties and select Build Events
    And add following in the Post-Build event command line:

    "C:\Program files\Microsoft Visual Studio 8\SDK\v2.0\Bin\GacUtil.exe"   -u $(TargetName)
    

  9. Is helper class deployed like BizTalk application?
    No, it is added to GAC on the machine where it is used.

  10. Why helper class/.Net assembly doesn't list in the Resources of Application, in spite of having reference to it and used in the application?
    Because resources are meant to hold only BizTalk resources.

  11. How helper class or .net assembly  is added to GAC?
    With the use of gacutil.exe and following command:

    gacutil /i assemblypath
    
  12. There is a .net helper class which suits to a requirement (in Orchestration) of an application but it is  Non-Serializable, how can it be used?
    Below are the steps :

    1. Add Reference
    2. Make Orchestration as Long running
    3. Add Atomic Scope
    4. Add Expression shape
    5. Orchestration variable of class inside scope 
    6. Instance of object inside the scope
    7. Call method

Author

Maheshkumar S Tiwari
http://tech-findings.blogspot.com/

Contributors

See Also

Read suggested related topic:

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.

Another important place to find a huge amount of TechNet Wiki related articles is Wiki: List of Articles for TechNet Wiki