Navigation

Search

Categories

 
 

On this page

the exists operator
BTSEasyReflector 1.1 release
MSBTS_*, new features in BizTalk Server 2006
Unsupported Microsoft.BizTalk.Deployment.dll
OutOfMemoryException when you use maps
Unsupported Microsoft.BizTalk.Databases.dll
have you problems when publish orchestrations as Web Services ?
Send e-mail with local files as attachments with BizTalk 2006

Archive

Blogroll

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

RSS 2.0 | Atom 1.0 | CDF

Send mail to the author(s) E-mail

Total Posts: 21
This Year: 0
This Month: 0
This Week: 0
Comments: 31

Sign In
Pick a theme:

 Thursday, March 16, 2006
Thursday, March 16, 2006 4:15:48 AM (GMT Standard Time, UTC+00:00) ( )

Sometimes, in own orchestrations we need to know if a message context property exists inside one message in particular.  Well, the exists operator is useful in this situation.

The exists operator can be use in Filter expressions or Decide shapes.  The filter expression can determine if a message is welcome in the orchestration or not, and you can use the exists operator to allow messages that contain one or various message context property incoming to process.

But, if you need to take a decision about what way to follow when a message context property exists or not in the message you can use a Decide shape and the exists operator.  The syntax to exists operator is: PropertyName exists MessageName.

For example, if you need to know if the BTS.AckFailurecategory property is inside the message, you must use this expression: BTS.AckFailureCategory exists MessageIn

 Wednesday, March 15, 2006
Wednesday, March 15, 2006 4:15:04 AM (GMT Standard Time, UTC+00:00) ( )

I have developed a new version of BTSEasyReflector.  This new version include the refactoring of the code (I tried to simplify the code), new icons to represent visually each biztalk artifact, and - at last - I added two new classes to write dynamically the properties of each artifact using reflection.

You can visit and download it from BTS Easy Reflector

Note this version was developed with VS .Net 2005 and BizTalk Server 2006 RC.  If you have any question or suggestion, pls send me it to carlos1254@hotmail.com

 Saturday, March 11, 2006
Saturday, March 11, 2006 4:14:18 AM (GMT Standard Time, UTC+00:00) ( )

Microsoft has added new features and changed others in WMI provider to BizTalk Server 2006.  These features include:

  • add two new class MSBTS_SendHandler2 and MSBTS_TrackedMessageInstance2
  • remove the MSBTS_ServiceInstance.ServiceInstanceID property
  • change the definition (properties and methods) of 7 classes

I show below the complete list of changes:

MSBTS_GroupSetting Class

Properties

(+) BizTalkOperatorGroup: Gets the name of the BizTalk Administrator Microsoft® Windows® NT® Group

MSBTS_Host Class

Methods

(+) Cluster: Clusters all BizTalk Host Instances of the given BizTalk Host

(+) GetClusterResourceGroupNames: Returns List of cluster resource groups available

(+) UnCluster: Un-Clusters all BizTalk Host Instances of the given BizTalk Host

MSBTS_HostInstance Class

Properties

(+) ClusterInstanceType: This property tells whether the BizTalk Host Instance NT service is clustered

MSBTS_HostSetting Class

Properties

(+) ClusterResourceGroupName: When the host instances of this host are clustered, this property contains the cluster resource group name set by the Administrator

(+) DBQueueSizeThreshold: Maximum number of items in the Database

(+) DBSessionThreshold: Maximum number of DB Sessions (per CPU) allowed before throttling begins

(+) DeliveryQueueSize: Size of the in-memory Queue that the host maintains as a temporary placeholder for delivering messages

(+) GlobalMemoryThreshold: Maximum System-wide Virtual Memory (in percent) usage allowed before throttling begins

(+) InflightMessageThreshold: Maximum number of in-memory in-flight messages allowed before throttling Message Delivery begins

(+) IsHost32BitOnly: This property indicates whether the host instance process should be created as 32-bit on both 32-bit and 64-bit servers

(+) MessageDeliverySampleSpaceSize: This property indicates the number of samples that are used for determining the rate of the Message Delivery to all Service Classes of the Host

(+) MessageDeliverySampleSpaceWindow: Time-window (in milliseconds) beyond which samples will be deemed invalid for consideration

(+) MessageDeliveryOverdriveFactor: Percent factor by which the system will overdrive the Input rate for Message Delivery Throttling

(+) MessageDeliveryMaximumDelay: Maximum Delay (in milliseconds) imposed for Message Delivery Throttling. Zero indicates disable Message Delivery Throttling

(+) MessagePublishSampleSpaceSize: Number of samples that are used for determining the rate of the Message Publishing by the Service Classes

(+) MessagePublishSampleSpaceWindow: Time-window (in milliseconds) beyond which samples will be deemed invalid for consideration

(+) MessagePublishOverdriveFactor: Percent Factor by which the system will overdrive the Input rate

(+) MessagePublishMaximumDelay: Maximum Delay (in milliseconds) imposed for Message Publishing Throttling. Zero indicates disable Message Publishing Throttling

(+) ThreadPoolSize: Maximum number of messaging engine threads per CPU

(+) ThreadThreshold: Maximum number of threads in the process (per CPU) allowed before throttling begins

(+) ProcessMemoryThreshold: Maximum Process Memory (in percent) allowed before throttling begins

MSBTS_ReceiveLocation Class

Properties

(+) EncryptionCert: Contains the Name of the certificate used for outbound encryption

(+) SendPipeline: Represents the name of the pipeline that will process outbound documents

(+) SendPipelineData: Contains the custom configuration data for the SendPipeline

MSBTS_ReceivePort Class

Properties

(+) RouteFailedMessage: Controls whether failed messages have to be routed to failed message subscribers

(+) MSBTS_SendHandler2 Class

Properties

(+) AdapterName: Contains the name of the adapter used by the given instance

(+) CustomCfg: Contains adapter-specific configuration in XML format

(+) HostName: Contains the name of the BizTalk Host for this transport handler

(+) HostNameToSwitchTo: Contains the name of the BizTalk Host that this transport handler should switch to

(+) IsDefault: Indicates whether the send handler is the default one for this adapter type

MSBTS_SendPort Class

Properties

(+) OrderedDelivery: Determines whether the port should send messages in an ordered manner

(+) StopSendingOnFailure: Controls how EPM handles failures for order delivery enabled send port's primary transport

(+) RouteFailedMessage: Controls whether failed messages have to be routed to failed message subscribers

MSBTS_ServiceInstance Class

Properties

(-) ServiceInstanceID: Contains the ID of the service instance to which this message belongs

(+) MSBTS_TrackedMessageInstance2 Class

Properties

(+) MessageInstanceID: Contains the ID of the message

(+) PartCount: Number of message parts

(+) SourceDBName: Name of the SQL database where the tracked message is stored

(+) SourceDBServerName: Name of the SQL Server where the tracked message is stored

Methods

(+) SaveToFile: This method saves message context and parts into multiple output files

(+) this feature has been added
(-) this feature has been removed

Note: this information was based on BTS 2006 RC documentation, thus, is possible that these features change in BTS 2006 RTM version.

 Thursday, February 16, 2006
Thursday, February 16, 2006 4:12:51 AM (GMT Standard Time, UTC+00:00) ( )

Microsoft.BizTalk.Deployment.dll is an unsupported assembly provided by Microsoft, it is used to perform all actions related with the deployment of EAI solutions in BizTalk Server 2006 Beta 2.  This assembly provides classes to import, export, add and remove resources, register and unregister assemblies in the gac, and so on....

Additionally, with Microsoft.BizTalk.Deployment.dll you can extract the artifacts contained inside a biztalk assembly (.dll) using its classes and interfaces.  For example, if you want to know if a file is a biztalk assembly you can use this code:

if (BizTalkLatamAssembly.BtsAssemblyManager.IsBizTalkAssemblyByPath(pathBtsAssembly))
{
// crate an instance of BizTalkAssembly
Microsoft.BizTalk.Deployment.BizTalkAssembly biztalkAssembly =
new Microsoft.BizTalk.Deployment.BizTalkAssembly();
biztalkAssembly.Load(pathBtsAssembly);
// create an instance of BtsAssemblyManager
Microsoft.BizTalk.Deployment.Assembly.BtsAssemblyManager btsAssemblyManager =
new Microsoft.BizTalk.Deployment.Assembly.BtsAssemblyManager(pathBtsAssembly, biztalkAssembly);
// load the BtsAssembly from BtsAssemblyManager
Microsoft.BizTalk.Deployment.Assembly.btsAssembly = btsAssemblyManager.BtsAssembly;
}

Also, you can get the pipelines from a biztalk assembly using BtsAssembly class and IBizTalkOrchestration interface, see below:

IEnumerator listOfPipelines = btsAssembly.AssemblyMetaData.Pipelines;
listOfPipelines.Reset();
while (listOfPipelines.MoveNext())
{
Microsoft.BizTalk.Deployment.MetaDataOM.IBizTalkPipeline pipeline = listOfPipelines.Current
as Microsoft.BizTalk.Deployment.MetaDataOM.IBizTalkPipeline;
System.Console.WriteLine("Pipeline name: " + pipeline.Name);
}

I wrote an easy sample called "BTS Easy Reflector" that uses the classes of Microsoft.BizTalk.Deployment.dll to show information about a biztalk assembly.  You can download it from "BTS Easy Reflector: Workspace home" and send me your feedback.

This information and project was developed with BizTalk Server 2006 Beta 2, thus, is possible that it doesn't work to final relase .

 Tuesday, February 14, 2006
Tuesday, February 14, 2006 4:10:21 AM (GMT Standard Time, UTC+00:00) ( )

If you get the System.OutOfMemoryException exception when you map large messages, may be you need to read this kb "The BizTalk service restart unexpectly when you map large message in BizTalk Server 2004".  It explains the cause and possible solutions to solve this problem.

For more information go to http://support.microsoft.com/kb/913959

 Friday, February 10, 2006
Friday, February 10, 2006 4:09:12 AM (GMT Standard Time, UTC+00:00) ( )

Microsoft.BizTalk.Databases.dll is an unsupported assembly in BizTalk Server framework.  It provides functionality to query the servers (SQL Server, Windows, Clusters, etc) and its database – if is a SQL Server - over the network.  To do it, this assembly exposes 5 classes: BizTalkDatabaseInfo, Database, DatabaseCollection, Server, y ServerCollection; and each class have its own properties and methods.

T
he use of these classes is very easy, in the following example I query the SQL Server that exists in my network using ServerCollection y Server.

foreach (string name in Microsoft.BizTalk.Databases.ServerCollection.GetSqlServerNames())
{
    Microsoft.BizTalk.Databases.Server server = new Microsoft.BizTalk.Databases.Server(name);
    System.Console.WriteLine("Server name: " + server.Name);
    System.Console.WriteLine("Platform Identifier: " + server.PlatformIdentifier.ToString());
    System.Console.WriteLine("Type: " + server.Type.ToString());
    System.Console.WriteLine("Version: " + server.Version.ToString());
}

Or, to query the databases in each SQL Server you can use the code that I show below.  In the example, I query each database in SQL Server and I ask if the database is a BizTalk Database:

Microsoft.BizTalk.Databases.Server server = new Microsoft.BizTalk.Databases.Server("server_name");
bool isBtsDb = true;
foreach (Microsoft.BizTalk.Databases.Database database in server.GetDatabaseCollection())
{
    System.Console.WriteLine("Database: " + database.Name);
    try
    {
        isBtsDb = database.IsBizTalkDatabase;
        if ( isBtsDb ) 
            System.Console.WriteLine("///// Begin - BizTalk Database ");
    }
    catch
    {
        isBtsDb = false;
    }
    System.Console.WriteLine("Is BizTalk database: " + isBtsDb.ToString());
    if (isBtsDb)
    {
        System.Console.WriteLine("BizTalk Db name: " + database.BizTalkDatabaseInfo.Name);
        System.Console.WriteLine("BizTalk Db version: " + database.BizTalkDatabaseInfo.Version.ToString());
        System.Console.WriteLine("BizTalk Db description: " + database.BizTalkDatabaseInfo.Description);
        System.Console.WriteLine("///// End - BizTalk Database ");
    }
}

The last functionality doesn’t work in Database class because when I ask if a database is a BizTalk Database using IsBizTalkDatabase property, Database class only checks for BizTalk Management DB and ignore another database.

Unfortunately, by this reason, you cannot use this property… I hope that Microsoft people can resolve this “issue” in the next version; it’ll be a great help.

 Friday, December 30, 2005
Friday, December 30, 2005 4:05:32 AM (GMT Standard Time, UTC+00:00) ( )

If you have(had) any problem when you are(were) publishing orchestrations as Web Services... then you must read this article "You cannot call an orchestration that is exposed as a Web service on a server that is running BizTalk Server 2004"....

The article explains three symptoms, its causes and how we can resolve it.  As part of article, these are the symptoms explained:

Symptom 1

The following error messages are logged in the Application event log on the server that is running BizTalk Server 2004:

The Messaging Engine failed to register the adapter for "SOAP" for the receive location "/VirtualDirectory/Name.asmx". Please verify that the receive location is valid, and that the isolated adapter runs under an account that has access to the BizTalk databases.

An attempt to connect to "BizTalkMgmtDb" SQL Server database on server "Server" failed with error: "Cannot open database requested in login 'BizTalkMgmtDb'. Login fails.".

Symptom 2

On a remote server that is running BizTalk Server 2004, the following error message is logged in the Application event log when you call the orchestration that is exposed as a Web service:

The "SOAP" adapter is suspending an outbound message going to destination URL:"<http://VirtualDirectory/Name.asmx>". Details: "Server was unable to process request. --> File or assembly name FileName.dll, or one of its dependencies, was not found.".

When you call the orchestration that is exposed as a Web service from a client computer that is not running BizTalk Server 2004, you may receive an error message that is similar to the following:

SoapException: Internal SOAP Processing Failure

Symptom 3

The following error message is logged in the Application event log on the server on which the Web service is exposed:

There was a failure executing the receive pipeline:
"Microsoft.BizTalk.DefaultPipelines.XMLReceive" Source: "Microsoft.BizTalk.Messaging" Receive Location: "/VirtualDirectory/Name.asmx" Reason: Specified cast is not valid.

 Wednesday, November 30, 2005
Wednesday, November 30, 2005 4:03:21 AM (GMT Standard Time, UTC+00:00) ( )

Now, we can send e-mails with local file(s) as attachment(s) in BizTalk 2006 without add these files as Multipart-MessageParts of the message that we'll send.  This new feature can be used for both static and dynamic ports.

If you use static ports, you can use the new Admin Console to select the file(s) that you can send without problems.  But, if you need that these files change depending of message type, then you must use a dynamic port and set the path of file(s) to new SMTP.Attachments context property of http://schemas.microsoft.com/BizTalk/2003/smtp-properties namespace.  There is only one restriction, you have to use a pipe character (|) to separate all path file(s) and one more pipe in the end of path(s), for example:


Msg_Mail(SMTP.From) = "carlos1254@mycompany.com";
Msg_Mail(SMTP.SMTPHost) = "SMTPServer";
Msg_Mail(SMTP.Subject) = "Dynamic attach files";
Msg_Mail(SMTP.Attachments) = "c:\file1.txt|c:\image2.jpg|d:\file1.xml|";
Port_SendMail(Microsoft.XLANGs.BaseTypes.Address) = mailto:carlos1254@destiny.com;

This is a fantastic new feature of SMTP Adatper in BizTalk 2006.