Mapping in BizTalk 2010: My favorite new features (part 5) – Optimized display of links

7 May 2010

The text below is based on the beta release of BizTalk 2010. It might not (completely) apply to the RTM release.

This blog post is part of a series of blog posts about my favorite new features in the BizTalk 2010 mapping tool. You can find an overview here.

The mapper in BizTalk 2010 now has three different ways to display a link. The idea is that the readability of a map is enhanced by this feature, especially when we need to deal with big schemas with many links. Consider the following sample:

image

The links for which we can see both the source and destination element are displayed as normal lines (1). The links for which we only see one element (in this case the destination element) are dashed and grayed out (2). The links for which we cannot see both the source and destination element are displayed as thin grayed out lines (3).

Additionally the toolbar has a button that allows the developer to completely hide the links of type 3. This is the button:

image

If we press it, the links of type 3 are indeed hidden which further improves the readability:

image

The next post will be about ‘Highlighting selected objects’.


Mapping in BizTalk 2010: My favorite new features (part 6) – Highlighting selected objects

7 May 2010

The text below is based on the beta release of BizTalk 2010. It might not (completely) apply to the RTM release.

This blog post is part of a series of blog posts about my favorite new features in the BizTalk 2010 mapping tool. You can find an overview here.

Sometimes functoids and links are mixed up in the screen so that you cannot easily see to which elements they belong:

image

The highlighting selection feature will help you by emphasizing the select element, links and functoids. All the other links and functoids are grayed out. This is what happens when I select the ‘Lastname’ element in the source schema:

part6-fig2

As you can see the relevant links and functoids are emphasized while the non-relevant are made opaque. This new feature will improve productive as it allows you to quickly see what is relevant for the piece of the map you’re currently work on.

This is also true for functoids selection. If I select the concatenate functoid for example all relevant links and functoids of that are emphasized:

part6-fig3

If one the elements for your current selection is on another page in the map this is also shown. Let’s add another page to the map and also link the ‘Lastname’ field from there:

part6-fig4

When I switch back to page 2 and select the ‘Lastname’ node again the mapper shows me that the other page also has link(s) from the same element. The mapper does this by showing a little icon in on the page tab:

part6-fig5


Mapping in BizTalk 2010: My favorite new features (part 7) – Bringing selected objects in view

7 May 2010

The text below is based on the beta release of BizTalk 2010. It might not (completely) apply to the RTM release.

This blog post is part of a series of blog posts about my favorite new features in the BizTalk 2010 mapping tool. You can find an overview here.

As you might now the grid area of the BizTalk mapper is a lot bigger than the area shown on the screen. In some cases you might have functoids somewhere on the grid area but not visible on the screen:

part7-fig1

To get an idea of the complete link structure you had to manually scroll the grid up and down. In BizTalk 2010 this can be done automatically. This feature is called ‘auto scrolling’ and can be toggled using a button in the mapper ribbon:

part7-fig2

If we press the button and select the relevant node the functoid is connected to (in this case the ‘Gender’ node) the relevant functoids are automatically brought into view:

part7-fig3


Mapping in BizTalk 2010: My favorite new features (part 8) – Search support

7 May 2010

The text below is based on the beta release of BizTalk 2010. It might not (completely) apply to the RTM release.

This blog post is part of a series of blog posts about my favorite new features in the BizTalk 2010 mapping tool. You can find an overview here.

In previous versions of the mapper there was limited support for searching elements in the source or destination schema. The new mapper has extensive support for searching. Two great things of the new search are:

· Search happens instantly (while you type)

· You can define the scope of the search by setting search options. The search is not limited to elements in the schemas.

part8-fig1

Searching is done by typing in the mapper ribbon:

part8-fig2

You can even search within the content of functoids (when turned on). When I have two C# scripting functoids with the following code:

public string MyConcat(string param1, string param2)

{

return param1+param2;

}

public string MyConcat(string param3, string param4)

{

return param3+param4;

}

I can search for this code. When the mapper finds the searched string the functoids that contain the string are highlighted.

Searching for string ‘param’ highlights both the functoids:

part8-fig3

Searching for string ‘param3’ highlights only the second functoid:

part8-fig4


Orchestration variable retriever functoid (and why you should not use it)

5 April 2009

This week I spend some time on writing a functoid that retrieves the value of a variable in an orchestration. Lets take a look on the functoid’s usage first.

Usage

This is the declaration of a string variable ‘lastName’ in a very simple test orchestration:

image

This is the expression shape where the value of that variable is set to my last name:

image

This is the map that is executed using a transform shape right after the expression shape above. The map contains the variable retriever functoid. It has one parameter that takes the name of the variable to fetch.

Please pay special attention to the icon because that bloody thing took me 50% of the development time. The result shows why I try to stay away from UI development as much as possible. :-)

image

Finally this is the Xml message returned from the orchestration via the file adapter.

image

Disadvantages

At first I was a little excited that I got this working. I did some testing with different orchestrations and it seems to work OK. After a while (and thinking this over) my excitement was tempered because I think the functoid has three big disadvantages:

  1. Although questions related to this popup regularly in the BizTalk newsgroups I could not think of any real world examples. The sample above could also be implemented by using a message assignment shape after the map. In the message assignment shape the value of the variable can be assigned using xpath, properties or distinguished fields. The only way the functoid can be useful is when you need an orchestration variable value in a map to do some processing while the actual value is not mapped to the destination schema. But then again there are other ways to implement that. (Using a helper message and a multi message map). 
  2.  The functoid code contains a considerable amount of reflection code. I didn’t do any performance tests but it is obvious that reflection comes with a cost. So in terms of performance it will probably be much better  to use alternative methods.
  3.  This is probably not supported by MS. Mainly because it uses XLANG code which is normally hidden from the developers. 

These disadvantages make me conclude that this functoid is not very useful in real world scenarios. I really want to know what others think about this. So whether you agree or don’t agree please share your thoughts on this!

The other way around

Now that I figured out a way to access a variable it is a small step to take this a little further and build a functoid that WRITES the value of a variable in an orchestration. I didn’t implement such a functoid because of above mentioned points. I also think writing, as opposed to, reading is very tricky because you need to take things like serialization and locking into account.

If your still not convinced that you should not use this you can download the functoid “dll” from here.

Installation instructions:

  • copy the .dll to the ‘Mapper Extensions’ folder which resides in the BizTalk installation folder.
  • put the .dll in the gac.
  • Open a map in Visual Studio, click right in the toolbox area and choose the functoids tab.
  • Browse the the functoid dll in the ‘Mapper Extensions’ folder to add it to the toolbox.

The source is also available here. It is build using BizTalk 2006 R2.


Follow

Get every new post delivered to your Inbox.