by community-syndication | Jul 28, 2006 | BizTalk Community Blogs via Syndication
This week I met with a healthcare customer who is using BizTalk to build a robust publish-subscribe architecture. One component
of this involves making last second decisions to either send or “eat” messages going out to a send adapter. I put together
a quick sample to demonstrate how you can selectively eat messages on the way out of BizTalk.
The core logic for this naturally resides in a custom pipeline component. Mine, called “EatMessage”, is a (any) send pipeline.
I have some custom properties that enable this component to be reused in multiple scenarios. The code looks like this:
public IBaseMessage Execute(IPipelineContext pc, IBaseMessage inmsg)
{
//grab value out of context using property fields
object eatField = inmsg.Context.Read(_FieldName, _FieldNS);
//if that value exists
if (eatField != null)
{
//compare the context value to the property condition
if (eatField.ToString() == _EatCondition)
{
System.Diagnostics.EventLog.WriteEntry(“Custom Pipeline”, “Message Eaten”);
//eat the message
return null;
}
else
{
return inmsg;
}
}
else
{
return inmsg;
}
}
So as you can see, I’ve got some design time properties that store the context property value and namespace, and a field
that is used to determine whether to eat the message or not. For instance, the _EatCondition might be equal to “true”, which
means if the context value equals “true” then eat the message. Or, it could be a date, or number, or whatever.
Next I build my schema. Basic stuff, contains a node called DoNotSend which I’ll set via a map, prior to sending the message
through the pipeline.
I then created a property schema with the one promoted EatValue node. I could reuse this with multiple different schemas.
Now the fun part. I created a new Send pipeline in my BizTalk project. I first drop the XML Assembler component, then plop
down the MessageEater component. As you can see here, there are the three properties I use later in the code.
Finally, I create a map. This map uses functoids to see if the Patient ID is a certain value, and if so, sets the DoNotSend
node to true. Otherwise, sets it to false.
After deploying the project, I created a send port to the FILE system. In it, I selected my new Send pipeline, and, the map. Since
the order of processing in a send port goes “Map –> Pipeline” I can be sure that the map outcome will feed the latest data to my pipeline component. After
building and testing, indeed, when I send a file through BizTalk with one particular Patient ID the message never comes back out, and
DOES get dropped if the Patient ID equals something else. Nice.
Technorati Tags: BizTalk
by community-syndication | Jul 28, 2006 | BizTalk Community Blogs via Syndication
If you try to create a new BAM definition (Excel) file by reusing and modifying another that has already been deployed, you’ll run into an error like this:
Microsoft (R) Business Activity Monitoring Utility Version 3.5.1602.0
Copyright (C) 2006 Microsoft Corporation. All rights reserved.
Using ‘BAMPrimaryImport’ BAM Primary Import database on server ‘BIZTALKHOST’…
Deploying Activity… Done.
Deploying View… Done.
ERROR: The BAM deployment failed.
Another element with ID IDA1E04C9C6CDD4E9EA9B092556AAF511F has already been deployed. Change the ID and retry.
You are getting this error because when you create (1) a new activity, (2) a new view, or (3) a new activity view association, an ID (GUID) is created to uniquely identify the item. This id is not regenerated when you rename the activity or the view. So when you re-purpose the Excel definition for your new activity or renaming your view, you get the above error.
There is a way around this if you don’t want to start from scratch. The following will show you how to get around this but be warned that you’ll lose the ability to get a live data workbook.
First, export the Excel definition as xml (menubar BAM -> Export XML), locate the ID that matches the error message and change it to another number (any will do, as the chances of it being used is fairly slim).
If you are reusing the template, you will likely have the same id for the Activity (//Activity/@ID), View (//View/@ID), and ActivityView (//ActivityView/@ID) nodes. Make sure you also change the referenced IDs.
Once you’ve made your modification, deploy the definition xml using the bm.exe command.
by community-syndication | Jul 27, 2006 | BizTalk Community Blogs via Syndication
As you may or may not have heard, a WCF adapter will be included in BizTalk Server 2006 R2! It won’t actually be a single adapter, but instead there will be multiple adapters with each one exposing one of the bindings that are included in WCF. Each adapter will also include a custom UI for configuring the most commonly used features of that particular binding. Do you have a custom binding? No Worries! There will also be a “Custom Binding” adapter that essentially opens the floodgates of WCF extensibility.
Here are some of the supported use cases for the WCF adapters:
- Exposing BizTalk orchestrations as a WCF web service
- Exposing BizTalk Content Based Routing applications as a WCF web service
- Consuming a WCF service from BizTalk orchestrations
- Consuming a WCF service from Content Based Routing applications
- Transactional message receive
- Transactional message send
- Using WS-* headers for routing and message processing
- Using custom headers for routing and message processing
- Using custom binding elements
- Using custom bindings
- Using BizTalk dynamic send ports
- Using BizTalk as SOAP intermediary
The WCF adapters will support the following WCF transports:
- HTTP / HTTPS
- SOAP
- MTOM
- TCP
- MSMQ
- Named Pipes
If you or your customers are interested in joining the Technical Adoption Program for this adapter, please email [email protected].
Thanks,
Joe
by community-syndication | Jul 27, 2006 | BizTalk Community Blogs via Syndication
Reusing BAM Excel template can cause problems. If you get an error like the following: “The BAM deployment failed. Another element with ID IDD1E0429C6CAA4E9EA9B092556AAF573F has already been deployed. Change the ID and retry” Read on to see why and how to fix it….(read more)
by community-syndication | Jul 27, 2006 | BizTalk Community Blogs via Syndication
Do you use any of the BizTalk Server 2006 LOB adapters? If not, do you plan to use any of them soon? The R2 TAP (Technology Adoption Program) requests your participation! We are looking for customers that currently use or plan to implement one or more of the following adapters:
- SAP
- Siebel eBusiness Applications
- PeopleSoft Enterprise
- J.D. Edwards OneWorld XE
- J.D. Edwards EnterpriseOne
- Oracle DB
- TIBCO Rendezvous
- TIBCO Enterprise Message Service
If you or your customer is interested participating as a supported early adaptor of BizTalk Server 2006 R2 and one of more of these adapters, please email [email protected].
Thanks,
Joe
by community-syndication | Jul 27, 2006 | BizTalk Community Blogs via Syndication
A request cameto me asking how to create a stored procedure call with no arguments.
Here is the steps for the following example:
Run the following script against the database:
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
if exists (select * from dbo.sysobjects where id = object_id(N’[dbo].[example]’) and OBJECTPROPERTY(id, N’IsProcedure’) = 1)
drop procedure [dbo].[example]
GO
CREATE PROCEDURE dbo.example
AS
BEGIN
SELECT’Hello’ [Result]
FOR XML RAW,xmldata
END
GO
SET QUOTED_IDENTIFIER OFF
GO
SET […]
by community-syndication | Jul 27, 2006 | BizTalk Community Blogs via Syndication
In BizTalk 2004, if you wanted to specify how an attachment filename was defined when sending an email through the SMTP adapter, you’d need to use the SMTPUtils class (whose code was included in the BizTalk documentation), like this:
SMTPUtils.Part.SetFileName(Message, filename);
In BizTalk 2006, however, using SMTPUtils is no longer necessary, thanks to the fact
that now you can directly reference the attachment part’s properties using an expression
in your orchestration. So now, you can do this:
<Message>.<Part>(MIME.FileName) = <filename>;
e.g.
EMail.OriginalMessage(MIME.FileName) = “OriginalMessage.xml”;

by community-syndication | Jul 27, 2006 | BizTalk Community Blogs via Syndication
We’ll be holding our next .NET Campsight — Building Connected Systems event in Redmond, WAon September 18-22 at the Redmond Town Center (awesome venue).
If you’re not sure what this event is all about, read this explanation.
The course is constantly evolving along with the latest Connected Systems technologies. In this 5th edition, we’re notching up the amount of .NET 3.0 coverage to about 20-25%. The rest will continue to focus on shipping technologies, best practice guidance, architecture/design, and of course future migration. It’s basically designed to be a one-stop-shop for building Microsoft Connected Systems today and tomorrow.
We’re also excited to have some awesome guest speakers lined up from the various product teams at Microsoft. You’ll hear from folks working on these next generation technologies and have a chance to get your toughest questions answered.
See the course description for more details.
by community-syndication | Jul 27, 2006 | BizTalk Community Blogs via Syndication
I found this article quite enjoyable. As I was reading, I kept day-dreaming about the various “divisions” I’ve experienced over the years that Andy’s piece highlights.
Are you a Mediator?
by stephen-w-thomas | Jul 26, 2006 | Stephen's BizTalk and Integration Blog
AppDev Training is offering a free CD Training Class!
They have many great courses to pick from including a new Microsoft BizTalk Server 2006 course called “Exploring BizTalk Server 2006”.
If you are new to BizTalk 2006, this looks like it would be an excellent opportunity to get 3 hours worth of free training. This CD covers the new features and functionally in BizTalk 2006.
Some other titles available are:
Exploring ASP.NET “Atlas” and Web 2.0
Exploring SQL Server 2005
It looks like this offer is also valid internationally but you have to pay shipping costs.
Oh, make sure you create a user account before you add anything to your cart. When I signed up, it seemed to clear my shopping cart. Also, if you get lost look for the “Free Training” button on the right side of the home page to get back to the free offer.