Biztalk File Adapter Macros

0 comments

Biztalk File Adapter Macros Free

I’ve seen this issue showing a couple of times on the BizTalk Newsgroups so I thought it’s worth posting about this on my blog. The user expectation, which is probably correct from usability point of view, is that the %Filename% macro is replaced with the name of the original file no matter if that file was received from the disk through FILE adapter or from a document library through SharePoint adapter. This doesn’t happen like that since the WSS adapter send ports will resolve the %Filename% macro to empty string if the message was originally received from any other adapter than WSS adapter. This is by design.


  • Nov 25, 2010  You can use several different macros in one file name. You can use the file name macros while configuring the File send handler in BizTalk Explorer, or by using the BizTalk Explorer object model. The File send handler does not replace the macros with a value if any of the following are true: The corresponding system property is not set.
  • You can use several different macros in one file name. You can use the file name macros while configuring the File send handler in BizTalk Explorer, or by using the BizTalk Explorer object model. The File send handler does not replace the macros with a value if any of the following are true: The corresponding system property is not set.
  • Folder is a simple but helpful macro as a common requirement is to put a message in a specific folder depending on a date. Let’s say a file was created 2017-01-15. Then the requirement would be that the file should be saved in a structure like bellow.

BT File name macros:%MessageID% Unique identifier of the message in BizTalk Server (GUID). The value is taken directly from message context property BTS.MessageID%datetimebts2000% UTC date time in format YYYYMMDDhhmmsss, where sss means seconds and milliseconds (e.g. 35234 means 1997/07/12, 10:35:23 and 400 milliseconds)%datetime%.

The %Filename% macro is replaced with the name of the SharePoint file (and not with the name of a file on disk). If the message was received through FILE adapter (or any other adapter than WSS) then the %Filename% macro is probably replaced with empty string. Macros (like %Filename%) and context properties (like WSS.Filename) are implemented by each adapter separately, they are specific to each adapter, and there is no ‘framework’ that would provide a unified set of macros/context properties accross all adapters. This makes sense since ‘%Filename%’ might not make sense for a POP3 adapter or it could have a slightly different behavior for 3rd party adapters. Coincidently, some adapters have used the same macro name (I would guess %Filename% is a common one) and ocasionally the same context property. However, the %Filename% macro in a WSS adapter send port is totally different from a %Filename% macro in an FTP adapter send port, for instance.

Biztalk file adapter macros free

To workaround this you can use an orchestration or a custom pipeline. All you need to do is get the disk file name from FILE.ReceivedFileName property and save it in the WSS.Filename property like below. Make sure that the Filename field in the send port UI dialog box is left empty so that the value supplied through the context property WSS.Filename is used to set the filename.
sharepointOutgoingMsg(WSS.Filename) = diskIncomingMsg(FILE.ReceivedFileName);


http://msdn.microsoft.com/library/en-us/BTS06Operations/html/1ff50fb8-7ba0-47b8-9476-d57413989346.asp?frame=true
http://msdn.microsoft.com/library/en-us/BTS06Operations/html/c5ae5339-67bf-4fde-a721-5b1aa3b9caca.asp?frame=true


You don’t have to use dynamic send ports for the workaround above. In the case of WSS adapter, you can define the send port configuration through the WSS.Config*, WSS.Filename context properties of the outgoing message and then configure the WSS send port equivalent properties so that they are either empty (text boxes) or have a value of Orchestration (drop-down boxes) in order to not overwrite the configuration information specified through the context properties.

General

1. Explain the Architecture of BizTalk Server.
2. What is a Messaging Agent ?
3. BizTalk Server is Very Costly. Why do you go for it.
4. Advantages of using BizTalk Server.
5. Why BRE ? What are the Advantages over Other Tools as it is very costly for Clients?
6. What is a Host?
7. What is a Host Instance ?
8. How do you run a Host Instance in a different Server ?
9. Difference between Inprocess and Isolated Host ? Why is Isolated Host required ?
10. How do you set the Host as Send/Receive Handlers ?

Schemas & Maps

1. What are the different Types of Schemas ?
2. What is an Envelope Schema ?
3. What is a property schema ?
4. How property Schema differs from Others ?
5. How do you validate the incoming message against a particular Schemas ?
6. What are the ways to reuse Schemas ?
7. What is the difference between Importing and Including a Schema ?
8. What is a Canonical Schema ?
9. What is a Context Property ?
10. Are all Context Properties promoted ?
11. What happens if promoted property is not filled ? Will an exception be thrown.
12. What is the difference between Message Context Property Base and Message Data Property Base in Property Schema ?
13. How can you deploy 2 schemas side by side ?
14. Difference between Value Mapping and Value Mapping Flattening Functiods.
15. What is Auto Mapping Feature ?
16. Database Functoids.
17. Table Looping Functoids.
18. Cross Reference Functoids.
19. Difference between Value and ID Cross Reference Functoids ?
20. What is Part Context Property Base ?
21. Are Message Context Property Base Elements Promoted ? (No)
22. Can we have multiple versions of Schema within a pipeline ?
23. Difference between Index and Iteration Functoid ?
24. How do you call an external assembly from Map ?

Orchestrations

Biztalk File Adapter Macros To Excel

1. What is an Orchestration ?
2. Read about each and every shape used in Orchestration. Specifically – Parallel, Listen, Compensate
3. Transactions in Orchestration.
4. Difference between Atomic and Long Running Transactions.
5. How to handle Delivery Failures ?
6. How do you ensure FIFO ?
7. Different Orchestration Patterns.
8. What is an Orchestration Instance.
9. How can you build a Singleton Pattern in Orchestration.
10. Convoys.
11. Race Condition and Zombie /Orphaned messages.
12. How can you deploy 2 Orchestration side by side ?
13. How do you update a deployed Orchestration with 0 or Less downtime.
14. How do you debug an Orchestration ?
15. How do you trace the messages processed by an Orchestration ?
16. Difference between call and start Orchestrations
17. Direct Binding ?
18. What are dynamic ports. How will you dynamically set the port.
19. Can we have dynamic send and receive ports ?
20. How do you consume a web/wcf service in an Orchestration ?
21. What are Persistence points ?
22. How do you count the Number of Persistence Points ?
23. What is Correlation ?
24. What are subscriptions ?
25. Which shapes will yield persistence points ?
26. How do you enable FIFO ?
27. What is a Multipart Message ? How do you use that ?
28. What is the use of Compensate shape ?
29. Assume you are using Transactions in your Orchestration. How do you set Timeout incase if you dont receive a response from an external system ?
30. What is XPath ? How can you use that ?
31. Difference between using XPath and using Distinguished fields.
32. Can you control the number of instances created for an Orchestration ?
33. How do you execute a Pipeline from an Orchestration ?
34. What happens when to try to use the Promoted Propery whose value (missing element/node) is not present in the message ? (Missing Property Exception)
35. How do you test the existence of a Promoted Property before using it ?
36. How do you ensure that a message is delivered to the destination ?
37. How do you call a non-serialazable class from an Orchestration ?
38. Advantage of having an Atomic scope.

Pipelines

1. Different Stages in Receive and Send Pipelines.
2. How to develop a Custom Pipeline Component ?
3. What are the various interfaces implemented for General, Disassemble/Assemble components ?
4. How do you promote a property in pipelines ?
5. How do you debug a Pipeline ?
6. How do you validate an XML in a pipeline ?

Adapters

1. Difference between File and FTP Adapters.
2. Difference between SQL Receive and Send Adapters.
3. What is an updategram ? What is a Before and After Block in Updategram ?
4. How do you consume a WCF Service ?
5. How do you expose your artifacts as a service ?
6. What is the difference between exposing an Orchestration and Schema as a Service ?
7. Consider the Scenario – Everyday, you receive Updates for your BizTalk Hosted Application. You need 30min to perform the Updates. How do you handle this without having any downtime ?
8. What are the different modes of copying in Send File Adapter ?
9. What are the two methods in which File Adapter runs ?
10. What is the Advantage of Using Temporary Location for File Adapters ?
11. What are the various macros available for a File Adapter ?
12. How do you rename the Output File of a File Adapter ?

Deployment

1. How do you deploy your application to Test Server ?
2. How do you deploy your application to Production Server ?
3. What are deployment scripts ?
4. What is a Binding File ?

BAM

1. What are activities ?
2. What are Views ?
3. How to capture data for your activities ?
4. What is TPE ?
5. What are the different types of event streams ?
6. What do you enable continuation ?
7. How do you ensure Transactional Integrity with Event Streams ?
8. Difference between Message and Orchestration Event Streams ?
9. What are the different sources of Data (event sources) inside TPE ?
10. How do you set permissions to a view ?

Keep checking this link for more updates regularly. Post a comment if you need help for any Question.

Biztalk Sql Adapter Example

Shiv