Integrating Integrators – BizTalk, Windows Azure, Windows Workflow, and Beyond

Re: Sharing object from assembly between Orchestration and map

BizTalk 2010

This group is for all content related to BizTalk Server 2010. This includes a forum and samples.

Sharing object from assembly between Orchestration and map

Not Answered This question is not answered



i'm wondering if it's possible to share a instance of an object (from external assembly in the form of a variable) from orchestration and re use it in the mapper with the script functoid (external assembly)?

what i want to achieve is to prefetch data in the orchestration then in the mapper i want to access parts of that data with a method through the same object, by the looks of it the script functoid creates a new instance of the object where as i want to use the object already in use in the orchestration. Any ideas?



All Replies
  • Why would you want to do that, unless you are doing something to that data in the orchestration, before trying to access it in the map? If you are just fetching that data in the map, you don't need to instantiate the object in the orchestration.

    "Google skills are more important than your coding skills."

    • Top 10 Contributor
  • Hi

    Well i know it's a bit unconventional :). The data that i'm fetching can only be done with this assembly and while mapping the incoming to the outgoing message i realized that it would be convenient to call a method in that assembly to get the specific value i needed in the mapping (to complement the outgoing message with that data). This can be done with only one script functoid and a few other functoids.

    The alternative is to do the traditional way e.g assign the data from assembly to a mesage, ad the schema to the map and it becomes a multimap and then do the mapping. I find using multimapps to be cumbersome to work with when you need to do changes to a schema or replace it and the mapping itself would become more complicated. The data in the assembly is stored in a XDocument (x number of records) and i query that document for the value i need (given certain parameters), achieving this in the map is what makes it "complicated".

    i could change the assembly to only give one record as a result of a query to the data source but the query takes time(and i would need to do it many times in the map) and that is why i need to pre fetch it in the orchestration and store the records in a variable in the assembly to later fetch with a method that querys the XDocumet and returns the value i need.

    i have come up with a middle solution but not as simple as what i was trying to achieve nor "complicated" as the traditional way. But if you have any idea on how to achieve this please share :)  (i suppose one could use some reflection code to find the instantiated object but feels like a bit forceful ).

    Regards Robert

    • Top 150 Contributor
  • Hi Robert,

      You could consider using caching technique in your BizTalk solution, here's an article explaining that topic:

       Good luck.

    "Google skills are more important than your coding skills."

    • Top 10 Contributor
  • Hi

    Thanks for the link , this will come in handy :)

    • Top 150 Contributor
Page 1 of 1 (5 items)