BizTalk Developer Interview Questions and Answers - Map
- 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. See more here.
- Can we have a 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. The 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 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 the untyped message in the map?
- Is it possible to create a 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 a limit on a 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 a map with n incoming messages to n outgoing messages?
Yes, but you need to create these kind of maps inside Orchestrations only! 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. Once created you can use this map on ports as well.
- 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 a 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 a 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? [Controversial]
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.