Support: Online Documentation: Common Tasks

Configuration Options

The component exposes five properties that can be configured either via the BizTalk Admin Console or in Visual Studio, these include:

Add New Item to BizTalk Project

1. Archive Directory

The directory in which the archive message is to be saved. This property can include macro's, allowing the component to build the archive directory at run-time based on data extracted from the message context properties.

2. Archive Filename

The filename of the archive message. This property can also include macro's, allowing the component to build the archive filename at run-time based on data extracted from the message context properties.

3. Archiving Enabled

Enables and disables the component at run-time. If this property is set to True, messages will be archived; if set to False, the component will immediately pass the message to the next stage in the pipeline without performing any processing. This property is set to True (archiving enabled) by default. For more information, see Enabling and Disabling the Component at Runtime.

4. Ensure Archive Integrity

Controls how the archive file is written to the file-system. When set to True, the component will ensure that a full and complete archive of the message is created, even if an error is raised by a downstream pipeline component. When set to False, the component will archive the message in the most efficient manner; if an error is raised by a downstream pipeline component, the message may not be completely archived. By default, this property is set to True. Only set this to False if speed is more important than the integrity of the archived file. For more information, see Configuring the Component to Ensure the Integrity of Archived Messages.

5. Overwrite Existing File

Controls the behaviour of the component if it encounters another archived message with the same directory/filename after macro replacement. If this property is set to True, the existing file will be overwritten; if set to False, the existing message will not be overwritten and the current message will be archived with a GUID appended to the filename. This property is set to False (do not overwrite existing files) by default. For more information, see Configuring the Component to Overwrite an Existing File.


Enabling and Disabling the Component at Runtime

By default, the component is deployed in an enabled state - when a message passes through the component, it will be archived to the location specified in the Archive Directory and Archive Filename properties after macro replacement. The component can however be instructed not to archive messages by toggling the Archiving Enabled property to False.

This re-configuration can be completed at run-time through the BizTalk Administration Console, without the need to remove the component from its custom pipeline, rebuild and re-deploy the BizTalk project.

When the Archiving Enabled property is set to False, the component will not perform any work on a message; instead it is handed straight to the next component in the pipeline.

Disabling the Archiving Component at runtime in the BizTalk Administration Console

To reconfigure the Message Archiving Component at runtime in the BizTalk Administration Console to disable the component, follow these steps:

1. Open the BizTalk Administration Console and navigate to the receive location or send port where the Message Archiving Component is being used. Click the elipsis button to load the configuration for the specific pipeline containing the Message Archiving Component.

2. Toggle the Archiving Enabled property from True to False to disable the component. Click Ok to save the changes.

3. The component is now disabled. Any new messages passing through this pipeline will not be archived.

Enabling the Archiving Component at runtime in the BizTalk Administration Console

To reconfigure the Message Archiving Component at runtime in the BizTalk Administration Console to enable the component, repeat steps 1 to 3 above, changing the Archiving Enabled property from False to True


Configuring the Component to Ensure the Integrity of Archived Messages

When the component is used in either the Decode stage (Receive Pipeline) or Pre-Assembly stage (Send Pipeline) and a downstream component fails to process a message - e.g. the Xml for flat-file disassembler may fail to find a corresponding schema for a message, or the Xml validator may fail to validate a message - the Archiving Component may fail to archive the entire message. This is due to the way pipelines are implemented in BizTalk.

To resolve this issue, the component include the Ensure Archive Integrity property, which changes the way in which the message is archived depending on its setting. When the property is set to True, the component will ensure that the message is successfully archived before passing it to the next stage in the pipeline; any failures in downstream components will not cause the archive to fail. When the property is set to False, the component archives messages in the most efficient way possible; however, if an error is raised by a downstream pipeline component, the message may not be completely archived.

Important: Only set this to False if speed is more important than the integrity of the archived file, or you can guarantee that the message will not throw an exception during pipeline processing.
Important: When set to False, the Archiving Component will not report errors if it partially archives a message. This is due to the way pipelines are implemented in BizTalk. Ensure that you have adequate monitoring tools to be alerted to failures in Receive or Send Pipelines that contain the archiving component; where errors are encountered, check that the entire message is being archived and consider setting this property back to True.

Re-configuration of this property can be completed at run-time through the BizTalk Administration Console, without the need to remove the component from its custom pipeline, rebuild and re-deploy the BizTalk project.

Instructing the Archiving Component to forgo archive integrity for speed

1. Open the BizTalk Administration Console and navigate to the receive location or send port where the Message Archiving Component is being used. Click the elipsis button to load the configuration for the specific pipeline containing the Message Archiving Component.

2. Toggle the Enforce Archiving Integrity property from True to False. Click Ok to save the changes:

3. The component may not archive the entire message if a downstream component throws an error.

Instructing the Archiving Component to enfore archiving integrity

To reconfigure the Message Archiving Component at runtime in the BizTalk Administration Console to enforce archiving integrity, repeat steps 1 to 3 above, changing the Enforce Archiving Integrity property from False to True


Configuring the Component to Overwrite an Existing File

When using macros, it is possible that the archive filename created at runtime may be the same as an existing file. By default, the BizTalk Message Archiving Pipeline Component is configured not to overwite existing files, however this functionality can be over-ridden through the Overwrite Existing Files property.

If this property is set to True, the existing file will be overwritten; if set to False, the existing message will not be overwritten and the current message will be archived with a GUID appended to the filename. This property is set to False (do not overwrite existing files) by default.

Instructing the Archiving Component to overwrite existing files

1. Open the BizTalk Administration Console and navigate to the receive location or send port where the Message Archiving Component is being used. Click the elipsis button to load the configuration for the specific pipeline containing the Message Archiving Component.

2. Toggle the Overwrite Existing File property from True to False. Click Ok to save the changes:

3. The component will now overwrite existing files.

Important: When the Overwrite Existing File property is set to True, existing files will be overwritten without prompting.

Preventing the Archiving Component from overwriting existing files

To reconfigure the Message Archiving Component at runtime in the BizTalk Administration Console to disable overwiting of existing files, repeat steps 1 to 3 above, changing the Overwrite Existing File property from False to True


Encrypting Archived Messages

The BizTalk Message Archiving Component does not provide the facility to encypt messages as they are archived. In order to encrypt archived messages, it is suggested that a third-party tool is used. The recommended approach is to use the Windows filesystem archiving capabilities.

Encrypting an Archived Message using Windows Filesystem Encryption

To use Windows Filesystem Encryption technology, follow the instructions on the Microsoft Technet page Encrypting File System in Windows XP and Windows Server 2003.