Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Sharing object from assembly between Orchestration and map › Re: Sharing object from assembly between Orchestration and map
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