Maps

What are maps?
Maps are graphical representations of XSLT (Extensible Stylesheet Language Transformation) documents that allow us to perform, in a simple and visual manner, transformations between XML messages. A map file basically is the XML file that defines the correspondence between the records and fields in one schema and the records and fields in another schema. You create a map when you want to transform or translate data that you receive or send from one schema to another.  
What is the default mapping for Auto Mapping?
The default mapping for Auto Mapping is mapping by structure. This can be changed to by node name in the map properties.
What does the Value Mapping Functoid do?
Returns the second parameter if the first parameter is true

Diff b/w Value Mapping Functoid and Value Mapping (Flattening) Functoid?
Difference between these two functoid is how they are mapped to destination.
  • If value of the incoming field cannot be mapped then Value Mapping Functoid will create an empty destination node ();
  • While Value Mapping Functoid (Flattening) will not created an empty node.
  • This default behavior of Value Mapping Functoid can be changed with the help of other functoid and scripting

What is the default mapping for Auto Mapping?
The default is by structure.  This can be change to by node name on the map properties. (This default in the auto map messes me up every time.)
Can we have map without any links on it?
Yes. But to do so custom XSLT is to be provided to the map.
How do we provide/include custom XSLT in the map?
Click on the map grid and in properties tab specify the location where custom XSLT is stored against the property "Custom XSLT path".
Is it possible to have a global variable in a map?
Yes. Choosing inline code allows us to declare global variables outside the method declaration. These are accessible throughout the map from within all inline code scripting functoids.
What are the places map can be used?
Receive Port, Orchestration, Send Port
Can we have map chaining on ports?
Not on the same port, only the first that matches the received message type will execute.  You can have a map execute on a Receive Port and then have another map execute on the Send Port (or have multiple maps in an Orchestration, or use the ESB Toolkit This link is external to TechNet Wiki. It will open in a new window. to achieve this.
What is limit of maps on ports?
There is no limit.
Is it possible to generate XSLT from the map?
Yes, right click the map and select Validate Map. The output window will include "The output XSLT is stored in the following file:" and the location of the XSLT file.
Is it possible to use untyped message in the map?
No 
Is it possible to create map for a schema with unknown structure?
Yes its possible. It can be done by including the <Any> element in the map. 
Where are transformations more flexible?
Transformations are more flexible and fast when they are executed from a send or receive port. We can replace map on the ports without any development effort. But if we replace map in orchestration we have to recompile and redeploy the orchestration assembly.
Is it possible to override the mapping of Mass copy?
It can be done on line by line basis. Example a field need to be passed a current date, then have the Date functoid placed a link to destination field this will override mass copy. 
Is there limit on number of pages on Map grid?
There is no limit, it depends on the requirement and complexity of the map.
Why should pages to be added to Map Grid  if all can be done on a single page?
Multiple pages enable you to organize your links so that any one page does not become too cluttered and confusing.It is also very helpful to label the pages and the links.
Is there a way to add custom logic required in a Map?
Yes it's possible and it can be done with the help of Scripting functoids or creating the custom functoids.
Can value from Orchestration variable be passed to the destination field in the Map?
Yes it can be done, by creating a new schema which will contain fields for capturing values from Orchestration variable and with the help of LoadXml  to load the values. This schema can be used along with an other source schema and mapping can be done. The variable also can be passed inside the Assign shop in an expression.
Is it possible to have map with n incoming messages to n outgoing messages? 
Yes, but only inside Orchestrations! This type of maps must be created using the Transform shape within an Orchestration. Orchestration Editor creates an envelope schema which includes all nested message schemas.
Is it possible to have map with n incoming messages to 1 outgoing messages?
Yes. And the only place that map can be created with multiple schemas is in a Transform shape within an Orchestration.
Is it possible to have map with 1 incoming message to n outgoing messages? 
Yes, but only inside Orchestrations! This type of maps must be created using the Transform shape within an Orchestration.
Can the graphic map representation and external XSLT be used in single map?
No. As everything which we see in Map grid (links, functoids) are overwritten when external XSLT is used.

Can we debug Map just like .Net code?
Yes. Right click the map to debug and select "Debug Map".
What is a .btm File?
.btm is a BizTalk Server map file.
What is the BizTalk Mapper Designer and where I can find it?
It is a tool that runs within the Microsoft Visual Studio .NET environment after you install BizTalk Server. We use the Mapper to create and edit maps.
What kind of transformation can we accomplish using maps?
Using maps he can accomplish Semantic Transformations. This type of transformation usually occurs only in BizTalk maps but also can be performed inside pipelines. Here the document maintains the same syntax that is represented (XML), but changes its semantics (data content). This type of transformation is typically one-way, since that's when we added and aggregate small parts of the information, that compose the document into another differently document, we may miss important details of its reconstruction. 
What are grid pages and how many can we have?
The mapper grid plays a critical role in the definition of maps, containing the links and functoids that control how data in a source instance message is transformed into an instance message that conforms to the destination schema. 
The grid view can have multiple layers, called grid pages, allowing you to organize complex maps into logical subdivisions of mappings. BizTalk 2010 no longer has the limitation of 20 grid pages that exist in the previous versions of the product. 
Is it possible to link the output of a functoid placed on the right side of the map grid with a functoid placed on the left  side of the map grid? 
No it is not possible as grid follows left to right precedence. An output link of the first functoid has to be placed into an input of the second functoid.
What is functoid?
The term functoids refers to predefined functions within the BizTalk Mapper tool set. Functoids support a number of useful translations and transformations.
We can consider functoids, as pre-defined functions that we can use to perform complex data manipulations and transformations. Typically on a map, the data is copied from source to destination by dragging links between elements of the two schemes. Functoids stays in the middle of these operations and apply an operation on the incoming data in order to transform them to the requirements of the destination. BizTalk Mapper Designer represents a functoid as a box in the middle of the link or links between the processing elements. As a point of interest, functoid is a term coined by Microsoft and is commonly described as “functions on steroids.”
What is required for a developer to create a custom functoid?
Basically you need to Create a new class library project using the .NET language of your choice and create a class derived from Microsoft. BizTalk. BaseFunctoids. However the easiest way is to use the BizTalk MapperExtensions Functoid Wizard. See more here This link is external to TechNet Wiki. It will open in a new window. .

Why would a developer create a custom functoid ?
Below scenarios can tempt developer to create custom functoid:
When there is no out of box functoids which can be used to complete the logic.
When the number of functoids used to implement the logic goes on increasing and becomes difficult to follow and manage.
What is the difference between Value Mapping and Value Mapping Flattening functoid?
Value Mapping: When both the source and the destination schemas define parallel repeating structures between which the relevant data is mapped.
Value Mapping (Flattening): When the source schema defines a repeating structure and the destination schema defines a flat structure, such that different instances of the repeating structure in the source schema are intended to be mapped into the unique elements in the flat structure in the destination schema.
How can you build an if-then-else construction with functoids?
To build if-then-else it will need any of the Logical functoid (depending upon the requirements, e.g., if value is to be matched then Equal Functoid) and a Value mapping functoid. The combination (Logical Functoid and Value Mapping Functoid) will repeat, firstly to implement IF condition and secondly to implement ELSE condition. 
Is it possible to reuse method of a Scripting Functoid in other Scripting Functoid?
Yes, it is possible. To do so the method at first place should be declared as public and then it can be called from other scripting functoid.
What is Microsoft.BizTalk.BaseFunctoids.dll?
This DLL implements all the base classes which are needed to create a functoid.
What are the ways to integrate custom functoid into solution?
Custom functiods can be integrated into a solution using two ways (in both BizTalk.BaseFunctoid is derived):
Directly by using inline code 
Indirectly by reference to a method in a class library deployed into the global assembly cache.
What can be done using Scripting Functoid?
Custom code or custom scripts can be added .
How many categories are functoids divided in Tool Box?
There are 9 categories available in Toolbox viz.,

  1.  Advanced
  2.  Conversion
  3.  Cumulative
  4.  Database
  5.  Date and Time
  6.  Logical
  7.  Mathematical
  8.  Scientific
  9.  String


Can we concatenate 200 input parameters using String Concatenate functoid?
No. As the minimum input parameter accepted is 1 and maximum is 100.
How can we get the count of the repeating node or repeating element?
Record Count Functoid can be used here, the input to this is the looping record/element.
Is it possible to know the index of the current record in looping structure?
Yes with the use of Iteration functoid. Iteration functoid gives  the index of the current record in a looping structure
What is XSLT?
XSLT or Extensible Stylesheet Language Transformations is a style sheet language for XML documents (stands for XSL Transformations), it defines the transformation rules of the messages.
Where does XSLT come into picture in BizTalk?
When a developer faces a complex mapping (problem) and to solve it requires a substantial amount of logic he/she can use custom XSLT. See TechNet Wiki article BizTalk Virtual Mapper VS Custom-XSLT. 
What is Muenchian method?
The Muenchian Method is an algorithm for grouping of data used in XSL Transformations that identifies keys in the results and then queries all nodes with that key. It can be applied with custom XSLT within a BizTalk Map. See MSDN Blog Muenchian Grouping and Sorting in BizTalk Maps.
Which version of XSLT is supported by the BizTalk mapper?
BizTalk Mapper supports XSLT 1.0. Using XSLT 2.0 in BizTalk Mapper is not supported (See MSDN Creating Maps Using BizTalk Mapper).
Can I use Custom XSLT inside a BizTalk mapper?
Yes, by making use of the scripting functoid.
Is it possible to exclude xml declaration <?xml...?> in the ouptut file?
Yes. To exclude xml declaration, the attribute "omit-xml-declaration" is to be set as "yes." 
Can the filter be applied to the output from the xml file?
Yes. It can be done by adding a criterion to the select attribute in the <xsl:for-each> element.Filter operators which can be used are:
=(equal)
!= (not equal)
&lt; less than
&gt; greater than
How to traverse through the repeating node the input file?
The XSL <xsl:for-each> element can be used to select every XML element of a specified node-set.
Is it possible to have custom functions?
Yes, it can be done in script blocks which can be done using <msxsl:script> element.
Is it possible to use method from a assembly available in GAC?
It can be done using <msxsl:assembly> element and it has to be child of <msxsl:script>element.

No comments:

Post a Comment