|
Home > Archive > BizTalk Server General > March 2005 > invoking a map dynamically
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
invoking a map dynamically
|
|
| Sukesh Shetty 2005-01-06, 7:52 am |
| Hi,
In a orchestration I want to select a map for a message in runtime. Based on
a value in the incoming message I want to select the map to be used. Is this
possible, if yes how.
Thanks in advance,
Sukesh.
| |
| Danny Buysse 2005-01-06, 7:52 am |
| Have a look at Gilles' web log at
http://blogs.msdn.com/gzunino/archi.../21/232629.aspx
This will certainly help.
Danny Buysse.
MVP BizTalk Server
"Sukesh Shetty" wrote:
> Hi,
>
> In a orchestration I want to select a map for a message in runtime. Based on
> a value in the incoming message I want to select the map to be used. Is this
> possible, if yes how.
>
> Thanks in advance,
> Sukesh.
| |
| Stephen W. Thomas 2005-01-06, 5:53 pm |
| Hello.
You have a few options when dynamically mapping in the Orchestration. You
can get the full details in the help guide by searching under “Transform” or
“Assigning to Transforms Dynamically”. I posted the text below.
In short, the first method does not require a reference to the assembly that
contains the map. But, you have to use the full assembly name with version.
When using the second method, the maps must be in the same assembly as the
Orchestrations. I have not tried it with just a reference to the assemblies
with the maps though. That might work as well.
Let me know if you have any additional questions.
Stephen W. Thomas
http://www.geekswithblogs.net/sthomas
From Help Guide:
It is possible to dynamically assign different maps to your transform at run
time. To do this, you can put a Message Assignment shape in your
orchestration, and use BizTalk Expression Editor to enter an expression that
assigns the map you want.
The transform construct takes a fully-qualified map name or a System.Type
variable. You can use either to select different maps at run time.
Example
(Method 1)
//begin BizTalk Expression Editor
if (condition)
{
MapType = Type.GetType("NameSpace1.Map1, AssemblyName1,
Version=1.0.0.0,Culture=neutral, PublicKeyToken=111111111111");
}
else
{
MapType = Type.GetType("NameSpace2.Map2, AssemblyName2,
Version=1.0.0.0,Culture=neutral, PublicKeyToken=111111111111");
}
// use the map type in the transform
construct _responseMessage
{
transform (responseMessage.x1, _responseMessage.x2) =
MapType(requestMessage.s1, _requestMessage.s2);
}
(Method 2)
// or you can use the fully-qualified map name in the transform
construct _responseMessage
{
transform (_responseMessage.x1, _responseMessage.x2) =
NameSpace.MapName (requestMessage.s1, _requestMessage.s2);
}
"Sukesh Shetty" wrote:
> Hi,
>
> In a orchestration I want to select a map for a message in runtime. Based on
> a value in the incoming message I want to select the map to be used. Is this
> possible, if yes how.
>
> Thanks in advance,
> Sukesh.
| |
| Tan Nguyen 2005-03-03, 8:46 pm |
| Issue resolved.
Regards,
Tan Nguyen
Microsoft BizTalk Server
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| Thread-Topic: invoking a map dynamically
| thread-index: AcTz1ctchLVH7q91RAODWdjo2d6okQ==
| X-WBNR-Posting-Host: 203.197.24.195
| From: "=?Utf-8?B?U3VrZXNoIFNoZXR0eQ==?="
<SukeshShetty@discussions.microsoft.com>
| Subject: invoking a map dynamically
| Date: Thu, 6 Jan 2005 01:55:03 -0800
| Lines: 8
| Message-ID: <53339DA0-D35D-4B60-9431-83B4EA923DE8@microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.biztalk.general
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.biztalk.general:23268
| X-Tomcat-NG: microsoft.public.biztalk.general
|
| Hi,
|
| In a orchestration I want to select a map for a message in runtime. Based
on
| a value in the incoming message I want to select the map to be used. Is
this
| possible, if yes how.
|
| Thanks in advance,
| Sukesh.
|
|
|
|
|
|