When’s a ‘Stopped Send Port’ NOT a ‘Stopped Send Port’

When’s a ‘Stopped Send Port’ NOT a ‘Stopped Send Port’

I’ve had an interesting discussion this week with some of my fellow BizTalk MVPs
and also a few MS folks.

Here’s the crux of my beef.
1. Stop a Send Port or Orchestration – it is still Enlisted but
in the Admin Console it’s stopped. (at this stage – you’re stopped and my ‘stopped’
are the same)
2. Shoot a message into BizTalk destined for the stopped Send Port or grab one of
the queued up Suspended-Resumable messages and say “Resume” (mind
you, you do have other options here of Resume in Debug Mode etc)
3. Guess what happens?? BizTalk Queues the message up as it knows the corresponding
Send Port is stopped???? NO!!!!! BizTalk will send the message through the
STOPPED send port
– (bang head against wall)
4. This ‘feature’ IS useful for when BizTalk receives a flood
of msgs and an issue arises downstream (backend system or so) and you can ‘trickle
feed’ A msg to the back end system.
5. I think this functionality should be tied into some sort of ‘Resume for Debug’
type wording. Something to indicate that it’s an ‘unusual’ circumstance.
6. The terminology within the Admin Console is what I have an issue with. The port
is Stopped, an NT Service is STOPPED, an application is ‘stopped’
so these terms of stopped differ in the biztalk world.
7. Outcome of the week’s discussion: MS are looking into changing the terminology
within the Admin console. smile_regular

Doing BizTalk Coding with a Tablet PC

Well I have been traveling heaps lately, I have a 4 week schedule that has me doing 12 flights, but that is not the point of this post, I was on a flight home last Friday night and I really wanted to finish working on a BizTalk error handling orchestration, so out came the Toshiba M4 tablet and even though I had a empty seat beside me, with the people in front having the seats reclined, I just could not use the keyboard, so I decided to try BizTalk programming with the pen, and as crazy as it sounds I could do most things I needed to do, I did need to key in a few things, but I found the items I needed and did some cut and past.

Now this makes my decision about what laptop to get in June when my Toshiba M4 is due to be replaced, I had pretty well decided on going with a Dell 820, full spec’d out, but now I am thinking more and more about another tablet pc, so time to start having some more looks.

May 2nd – Next Sydney BTS User Group Session On – Building a custom R2 Adapter

Examining
and Building an R2 Adapter using the New R2 Adapter Framework 

Wednesday, 2nd
May 2007


6:00 PM
Food and Drinks, 6:30 PM Kick Off


1
Epping Road, Microsoft


North
Ryde, Sydney

Hi
all on our Post Anzac Day Wednesday meeting and I hope two-up was (will be) kind to
you. This month we’re at Microsoft North Ryde with a presentation on Adapters, Adapters
and more Adapters. The new BizTalk Adapter Framework is called The
Line Of Business Adapter Framework SDK
(LOB Adapter SDK between friends)
and is based on Windows
Communication Foundation(WCF)
. As you can imagine, WCF adds a ton of functionality
around the way we do messaging.

With BizTalk 2006 R2 comes many new features and improvements we examine R2 .NET Adapters
(WCF Based) and also look at new WCF and WF BizTalk BAM Interceptors, allowing you
to post to BAM directly from WCF or WF.

I’ve provided a calendar appointment for your calendars so join me.

Presenter:

Mick
Badran, BizTalk MVP
who
specialises in Microsoft Technologies as a Solutions Architect/Developer. With over
15 years consulting experience and 12 years as a Microsoft Certified Trainer provides
in depth real world knowledge.

Session
Details

So
what is the story with Integration and Adapters in BizTalk 2006 R2? This session covers
the roadmap going forward in building BizTalk .NET Adapters (those based on WCF) in
the new Framework. It will discuss all the benefits of the new framework and explain
options on where to host these adapters.

We will also examine the relationship between BizTalk and the WCF based adapters with
respect to Message Contexts, and multipart messages.

The
Session details are as follows:

1.     R2
WCF Adapters Explained – including the new BAM Interceptors for WCF and WF

2.     LOB
Adapter SDK framework explained

3.     Building
a new Custom Adapter using the LOB Adapter SDK

As
always love to hear from you and what’s been getting you excited at work.

Who
Should Attend?

If
you’re looking to get additional business related information out of your Biztalk
processes then this session is for you.
This session is technically focused for Biztalk developers and System Architects.

Please be sure that you RSVP so we know
how many to expect. Reply with a yea or ney to [email protected]

Looking forward to seeing you there at
Microsoft Premises – North Ryde


Mick and Mark 

Ph: 0404 842 833 (Mick’s mobile)
SydBiz.Org

 

Querying Commerce Server with Commerce Servers’ BizTalk Adapters

I am working on a large project  where we need to query Commerce Server to create data feeds to send to such sites as MSN Shopping, Yahoo Shopping, PriceGrabber, etc.   When we create these data feeds we need to query for every item in the catalog. 


 


There are a couple of blogs out there with examples of querying for a specific item but in this case I needed to get every single item.    One of the things that was not clear to me was if I was supposed to use the field name defined in Commerce Server or if I was supposed to use the column name that I found in the database.


 


Well, it turned out that I was supposed to use the column name of the database that I wanted to search on.


 


We had an Inventory catalog and I found that all of the current data had a the value of 1 in the status column.  So, in my Orchestration I created a message based on the  InventoryQuery schema (msgInventoryQuery )and created the  message in a  ConstructMessage shape using the following xml in the MessageAssignment shape.


 


msgInvXmlDoc=new System.Xml.XmlDocument();


 


msgInvXmlDoc.LoadXml(“<CommerceServerInventoryQuery InventoryCatalog=’Default’ SearchClause=’Status=\”1\”‘/>”);


msgInventoryQuery = msgInvXmlDoc;


 


For the catalog query I created a message using the CatalogQuery schema and created the following message


 


msgCatXmlDoc=new System.Xml.XmlDocument();


 


msgCatXmlDoc.LoadXml(“<CommerceServerCatalogQuery ProductCatalog=” SearchClause=’DefinitionName =\”ProductGroup\” or DefinitionName =\”ProductItem\”‘/>”);


msgCatalogQuery = msgCatXmlDoc;


 


 



 


In this orchestration I had 4 queries that I was doing against Commerce Server and needed to receive them in whatever order they came back.  I utilized a parallel shape with the receive shape connected to a request / response port.  Then I used a Solicit-Response send port for the physical send port utilizing the Catalog and Inventory Commerce Server adapters. 


 


After deployment and binding I am now able to query Commerce Server and receive the entire contents of the catalog.


 


 


 


 

BizTalk Deployment Error: Failed to update binding information. All orchestration ports must be bound and the host must be set.

When deploying a BizTalk 2006 solution from Visual Studios, you may have encountered errors similar to this one:
Error 6 Failed to update binding information.
Could not enlist orchestration ‘DataStream.SOL.ScaterServiceRequests,DataStream.SOL.Demo, Version=1.0.0.0, Culture=neutral, PublicKeyToken=806c67aab899168c’.
Could not enlist orchestration ‘DataStream.SOL.ScaterServiceRequests’. All orchestration ports must be bound and the host must be set….(read more)

Configure your BizTalk applications to run under seperate Host with Click of a button?

Companies use BizTalk Server in a variety of configurations. Let’s see this scenario:

Scenario: Company-X is a medium sized company they got variety of small BizTalk applications like “Order Processing”, “Payroll Processing”, “Payment Processing” etc. But they only have one BizTalk infrastructure (they got replica setting for testing and production) with 2 BizTalk application servers (BizTalk group) connected to 2 SQL servers clustered. All their BizTalk applications are deployed in this BizTalk group. All the applications are configured to run within the default In-Process and Isolated host and one instance per host is created on both the application servers.

The main issues with the above scenario are:

  • Every time a new application is deployed or existing application is upgraded the host instances needs to be restarted (to refresh cached components). Stopping or restarting the host instance is going to affect each and every deployed application. At the minimum none of the applications are going to process any messages during the upgrade process.
  • Security can be compromised, because there is no security boundary between applications.
  • If one application causes problem to the host instance it’s going to affect the overall system.

The solution to the above mentioned problems is to create separate logical hosts for each application and then creating corresponding host instances. Logical hosts can be created for BizTalk application using variety of tools that comes out of the box like BizTalk administration console, WMI, etc, but we’ll face the following issues

  1. A thorough understanding of the host and host instances concept is required for the person who is performing the task.
  2. Creating logical host and configuring the BizTalk artifacts manually (handlers, receive locations, send ports and orchestrations) are error prone.
  3. Managing multiple logical hosts and their corresponding configuration will become more difficult over time.

ApplicationHostCreator is designed to create and manage logical hosts for BizTalk applications seamlessly to support situations as described in the above scenario.

Read more about how to use the tool and download version 1.0 of the tool at http://www.biztalk247.com

LINK: http://www.biztalk247.com/v1/articles/appHostCreator.aspx

Nandri!

Saravana

Can you use Dynamic Send Port without Orchestration? Yes you can.

Dynamic send ports are used in situations, where you don’t know in advance the type of transport adapter to use to send messages to your trading partner. May be based on certain content in your message you need to make that decision at runtime to pick up the transport adapter. The below figure shows the configuration for a Dynamic One-Way Send port, you can see you only specify the Name and Pipeline details (you can specify some of the other properties like maps, filters, etc).

Example Scenario: Say you are receiving an order message as shown below, which contains the “From” and “To” information in the header.
<Order>
<Header>
<From>me</From>
<To>Contoso</To>
</Header>

<Body>………</Body>
</Order>

Based on the “To” (trading partner name) you need to pick up the appropriate transport (ex: Contoso = FTP, Northwind=HTTP).

Dynamic Send port works very well with Orchestration, all you need to do is specify the following line inside your expression shape

Port_1(Microsoft.XLANGs.BaseTypes.Address) = “http://www.tradingpartner.com/receive.ashx

That’s all it requires to route the message to dynamic send port. BizTalk resolves the correct transport address from the URI you specified.

(I put the following screen shot, so you know what I’m talking about) 

Behind the Scene:

When you create a Dynamic Send Port from BizTalk management console and start it, in the background BizTalk creates subscriptions for all the adapters installed in your server. A query for subscription shows the following result.

If you look at the expression used inside the subscription you’ll see it’s looking for 3 properties “OutboundTransportType” (HTTP,FILE,FTP etc), “SPID” (Send Port Id) and existence of “OutboundTransportLocation”. The below figure shows the expression used for SendPort4: HTTP

When the orchestration submits the message to the MessageBox it promotes these three properties in the message context, which then gets picked up by the corresponding Dynamic Send Port.

How to use Dynamic Send Port without Orchestration?

If you want to use Dynamic Send Port in a  content based routing scenario (aka Messaging-Only scenario) one option is to promote the 3 properties

  • OutboundTransportType
  • SPID
  • OutboundTransportLocation

somewhere in your receive pipeline using custom pipeline component and submit it to the message box, which will then be picked up by the corresponding Dynamic Send Port. The only problem with this approach is SPID (Send Port id) is a system generated value and it might differ from environment to environment.

So, what’s the best solution?

All you need to do is define a new FILTER in your Dynamic send port, example BTS.ReceivePortName == <<your receive port name>>. That’s all it requires. Now if you look at the expression for SendPort4: HTTP you can see it accepts 2 different conditions one with SPID OR the other other one with ReceivePortName. So, all you need to do now is promote the following properties somewhere in your receive pipeline and submit the message to the MessageBox.

  • ReceivePortName
  • OutboundTransportType
  • OutboundTransportLocation

Instead of ReceivePortName you can use whatever promoted property you have in your system. Now, you know for sure those values are not going to change like SPID.

Nandri!

Saravana