locked
Biztalk - .NET application - Is there a startup method? RRS feed

  • Question

  • Hi.

    I have a BizTalk application and a .NET application which has methods which are called from the map and orchestration which does some data mapping.

    Is it possible to have a method in the .NET application which is called at startup? I want to load the mapping data at startup rather than wait until the first method is called.

    Thanks

    Trefor

    Friday, May 27, 2016 4:45 PM

Answers

  • No.

    The typical pattern for this is to load and cache any lookup data on first execution.  This is not uncommon but there is no way to pre-cache.

    • Proposed as answer by Angie Xu Monday, June 6, 2016 8:51 AM
    • Marked as answer by Angie Xu Monday, June 6, 2016 9:01 AM
    Friday, May 27, 2016 5:01 PM
    Moderator

All replies

  • No.

    The typical pattern for this is to load and cache any lookup data on first execution.  This is not uncommon but there is no way to pre-cache.

    • Proposed as answer by Angie Xu Monday, June 6, 2016 8:51 AM
    • Marked as answer by Angie Xu Monday, June 6, 2016 9:01 AM
    Friday, May 27, 2016 5:01 PM
    Moderator
  • You can create a global variable on your maps and assign content to it. That will run before anything else in the map. That content is then reachable from other functoids in the same map. Here is how:

    • Have a script functoid on your map that has no input parameters.
    • Make sure the method it runs returns void().  

    yourType cachedContentVariable;
    
    void LoadCache()
    {
        cachedContentVariable = yourClass.YourContentFetcher();
    }

    • Connect that functoid to the root folder of the target schema, just so it executes.  

     That content can now be accessed from other functoids in the map, thus the data is cached.



    My Technet Articles

    If you like this or another reply, vote it up!
    If you think this or another reply answers the original question, mark it or propose it as an answer.


    Mauricio Feijo
    www.mauriciofeijo.com



    Friday, May 27, 2016 8:08 PM
  • Hi,

    If it is extremely necessary to have your .NET application method use for data mapping the you can Implement/Utilize Enterprise library Caching Block for your .NET application.

    If your requirement is data mapping out of box BizTalk supports Cross referencing data having lots of options available. I would suggest to use Get Application Value and Get Common Value functoids in map which have their own caching mechanism.

    I would suggest to gone through this article (Mapping Reference Data) and decide the available options for Referencing the Data considering your need in project.

    Hope this Helps!!!

    Please mark this as Answered if you satisfy with reply.

    • Proposed as answer by vikas.a.mehta Monday, May 30, 2016 7:25 AM
    Monday, May 30, 2016 7:25 AM
  • It's bad form to propose you own posts as answers.  Please let the group or OP do that.

    Monday, May 30, 2016 3:37 PM
    Moderator