Tuesday, December 8, 2009

BizTalk Server Futures and Roadmap

I realize that I am a little late to this party, but figured I would provide my thoughts on the BizTalk Server Futures and Roadmap presentation by Balasubramanian Sriram that occurred at PDC 09 this past November. To view a re-play of his presentation check out the following link. Also note that some of the content from this post has been 'borrowed' from his presentation.


Current State
  • BizTalk adoption continues to be strong. Currently over 10 000 Global customers are benefiting from BizTalk Server. If my memory serves me correctly, they have added approximately 1500 customers over the past 2 years.
  • Major industries using BizTalk include Electronic Parts companies, Telecommunications, Aerospace and Defense, Chemical Companies, Railroads and Insurance. In Canada I am aware of a few other industries that are also benefiting from BizTalk Server including Utilities, Oil and Gas, Healthcare and Government.


Short-term Road Map

Here is a list of some of the Customer "wants" that are being addressed:

Platform support

  • Platform Alignment (Windows Server 2008 R2, SQL Server 2008 R2, Visual Studio 2010)
  • Tighter integration with Windows Workflow
  • Common Application Model (scaling up .net apps into an integration server)

Productivity

  • Ease of use in transformation scenarios
  • Trading Partner Management
  • Out of box connectivity (more adapters)

Enterprise Capabilities

  • ESB
  • Enterprise manageability (consolidated view of integration assets)
  • Low latency scenarios
How are some of these wants going to be addressed in the short term?
BizTalk Server 2009 R2


Platform support
  • VS 2010, Windows Server 2008 R2, SQL Server 2008 R2
Productivity Improvements
  • Single dashboard to apply and manage performance parameters
  • Out of box support for event filtering and delivering (RFID)
  • Powershell access to management tasks
  • New SCOM object model to better reflect BizTalk Artifacts

B2B Scenarios made easy

  • Mapper enhancements to make complex mapping easier to create and maintain
  • FTPS to provide secure transactions between businesses
  • Updated B2B accelerators for latest protocol versions
I am extremely encouraged to see theses added features in an R2 release especially since it seemed like BizTalk 2009 shipped yesterday. In particular, I am looking forward to the following features:
  • Platform support - It is nice to see that we should not have to wait as long as we previously did to be able to leverage some of these new technologies. It is always a bit of a downer when your organization is trying to stay current with technology only to have your application "slow the train down" because your application is not supported on the latest version of OS/DB/IDE etc.

  • Single Dashboard - It would be nice to get a composite view of your BizTalk environment from a single source. This Dashboard is also suppose to provide performance metrics and server health from one location. When working in an enterprise environment, multi-node groups are the norm, not the exception so it will be nice to have improved visibility.

  • New SCOM object model - I haven't been overly impressed with the SCOM management pack for BizTalk 2009. I find that some of the terminology that is used in the Management pack does not align with the terminology in the BizTalk Administration Console. For instance SCOM may notify you that you have an "Adapter" that is currently offline. No where in the BizTalk Admin console can you turn on/off, enable/disable an adapter. You can certainly add or delete an adapter but I am pretty sure that is not what SCOM is referring to. However, you can certainly enable/disable a receive location or stop a host instance which will impact an adapter's ability to function, but SCOM doesn't explicitly describe it this way. I also feel that the SCOM management pack doesn't correctly understand clustered host instances. I have received many alerts indicating that Clustered Host instance 'XYZ' is not running on Server 'b'. Well the reason for this is that the Host instance is currently active on Server 'a' and the nature of a Clustered resource is that it runs in an active/passive state by design.

  • Mapper Enhancements - Balasubramanian was correct when he mentioned the mapper as a "value add" for BizTalk. Since this is the case, then more should be done to improve a developer's productivity when using this tool. I have shown this tool to SAP resources describing how great the tool is only to find them cringing as we try to follow the connector lines when mapping an IDOC. I am extremely encouraged by what I saw and can definitely benefit by some of the new features described including only showing nodes that are involved in a map, auto scrolling, moving sections of maps to a new page and searching for nodes.




  • FTPS Adapter - This is welcomed change for me. The reality is that not every single interface is going to use the latest version of WCF. Providing an updated FTP adapter that supports security will be beneficial for BizTalk customers. I am still waiting for an update to the POP3 and SMTP adapters so that we can communicate with Exchange over MAPI. There is perceived risk associated with POP3 that makes Exchange administrators cringe when you ask them to open up POP3 connectivity. Yes 3rd party adapters do exist, but after several years, I do have expectations that something like this could be included in the box.

Future



Fear not, Microsoft will continue to support the BizTalk investments that have already been made to date. However, BizTalk will eventually run on top of AppFabric.

Here are some of the features that are envisioned for the future:

  • Use data contracts in maps and have the ability to transform to a schema and vice versa. One of the limitations of AppFabric (Dublin), in its current state, is the lack of a mapper tool to allow for transformation of messages. This new capability should fill in this current gap and also allow you to mix the use of data contracts with schemas in maps.
  • Create workflow activity based on map
  • Low-latency scenario versus durable messaging. This is a feature that many have been asking for. This feature is really intriguing in the sense that you can choose which path you would like to take when designing your message interactions. In Balasubramanian's scenario he was wanting to book a trip. Whenever read requests are required durable messaging is probably not required so why take on the additional performance hit that using MessageBox incurs. However when performing insert or update operations you probably want to use durable messaging to ensure that people's trips are booked. Using this hybrid approach allows for the best of both worlds within the same technology stack. Cool!
  • BizTalk will use innovations in AppFabric while preserving your investments
  • Current demo included Workflow in running in BizTalk Host – long term vision is for BizTalk to run in AppFabric host

A question that I have is: currently BizTalk is a product and has a licensing cost associated with it. AppFabric is really a framework that has no licensing costs associated with it. As these two platforms converge, which "components" will continue to have a licensing cost versus no licensing costs?

Overall it appears to me that the future for both of these platforms is extremely bright and Microsoft continues to make key investments into integration.

Sunday, November 8, 2009

BizTalk 2009: Windows Server 2008 and SAMBA shares

Another adventure that we experienced during a recent BizTalk 2009 cutover was the behaviour that Windows 2008 has on SAMBA shares.  For those of you who are unfamiliar with SAMBA shares they basically provide you the ability to access *nix shares from Windows based computers.

In our previous setup(BizTalk 2006 running on Windows 2003) we had no issues communicating with SAMBA shares. Our infrastructure team recently updated the test system that we connect to version > 3.x of SAMBA where we had no issues when communicating with Windows 2008/BizTalk 2009 servers.  When we went live with this cutover in Prod, the SAMBA version had not been updated in that environment yet and we were running an older version of SAMBA (2.2.x).  The result of this was the following error which led to Host Instances going offline.

 

Event Type:        Error
Event Source:    BizTalk Server 2009
Event Category:                (1)
Event ID:              6913
Date:                     11/7/2009
Time:                     7:00:50 PM
User:                     N/A
Computer:          Server
Description:

An attempt to connect to "BizTalkMgmtDb" SQL Server database on server "SQLServer\SQLInstance" failed.

Error: "Login failed. The login is from an untrusted domain and cannot be used with Windows authentication."

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

The underlying cause for these errors was the BizTalk Host Instance account, that is used to connect to these shares, was being locked out due the issues in connecting with SAMBA.  Pretty much a BizTalk Developer/Admin/Architect’s worst nightmare.

After performing some online searches we ran into the following article. The Article simply states that “Windows Vista and Server 2008 have a default version requirement of MS-LAN Manager communication that prohibits communication to older Linux-based Samba installations. This can be fixed via group policy or the local security policy.

You can read the article for more details, but what helped us was setting the LAN Manager authentication level to “Send LM & NTLM responses”.  Upon forcing a Group Policy update we were back in business thanks to the help of a few members of our infrastructure team.

We also looked into providing Authentication credentials but that wouldn't help since these are only provided when the Host Instance does not have access.  The BizTalk user did have access so those credentials are sent before these configured credentials are passed anyways.

image

BizTalk 2009 – NSoftware FTP Adapter FTP protocol error: 550 rename: Cross-device link

During a recent Production implementation of BizTalk 2009 we ran into an issue with the temporary folder option in the NSoftware FTP adapter.  The error itself is not an NSoftware bug, but rather a feature/limitation of the FTP Protocol.

Event Type:    Error
Event Source:    nsoftware BizTalk FTP Transmit Adapter
Event Category:    None
Event ID:    0
Date:        11/7/2009
Time:        2:50:22 PM
User:        N/A
Computer:    Server
Description:
Source: nsoftware BizTalk FTP Transmit Adapter (3.5.3488.0)
Source URI:
FTP://%User%@%FTPServer%:21/%RemotePath%/%RemoteFile%
Message Type: Error
Current Thread: 71
Transmission failed for message "019ef16e-0b57-4309-8a37-b5c05a61e7f9": Error uploading FTP data: FTP protocol error: 550 rename: Cross-device link

If this error persists, you may enable Warning or Verbose logging modes to enable the adapter to report more information regarding the progression of this error.

 

Our scenario involved writing files in a specific sequence using delivery notification and using a temporary folder to support some reliability requirements.  The idea behind using a temp folder is you get the data to a “staging” area and once the adapter can confirm that all data was written it performs a rename operation on that file which is extremely quick.  It also reduces the risk of a consuming application retrieving the data from the file as it is being written.  This is especially important in *nix environments since file level locking has not been implemented the same way as it has in Windows environments.

Here is how our destination folders have been configured:

/home/work

/home/arch

/home/temp

Since we are using delivery notification, the “work” file has to be written to first.  Once that operation has completed, then the arch(archive) file can be written.  Both of these messages are being sent through a dynamic send port and we have a routing rules repository where we store the specifics of where the message is suppose to be delivered to.  Our configuration called for both operations to use the same temp location. (Hindsight is 20/20)

In Test, everything worked out perfectly but when we ran this process in Prod we ended up with the aforementioned error.  The difference between these environments is that the “arch” folder exists on a separate disk than “work” or “temp” in Prod.  Essentially the FTP Protocol cannot perform the rename operation from the “temp” folder across to a folder on a different disk that has been mounted to the same server.

I was able to validate this by opening up a command prompt and establishing an FTP session.  Once I connected I tried to rename a file and place it on the “arch” disk.  I got a similar error:

ftp> rename list.txt /home/arch

350 File exists, ready for destination name

550 rename: Cross-device link

ftp>

 

In a previous blog post I discussed that NSoftware use to have a property called temporary file extension.  This property is no longer a property that is exposed in the Send Port configuration but is still supported when you dive into their documentation.  To use this property , you want to click on the “…” button beside the “Other” property.

 

image

In this property dialog box, populate TemporaryUploadExtension=.tmp

image

This feature acts similarly to the temp folder, the difference is that the “temp” file will be written to the same folder as the file that you are transferring .  A consuming system that respects file extensions will still be “OK” with this situation since the file name will have “.tmp” added to it until the entire file has been written and at this point will remove this temporary extension via the rename operation.

This situation just highlights how important matching your QA/Test environments and Production really is.  The other lesson is that not everything is exactly as it appears.  In our case the folder structures were exactly the same.  The difference was that one of the folders was mounted to a different disk. Finding this out is not a lot of fun when you are in the middle of a go live.

Tuesday, October 27, 2009

ShareTalk Integration (SharePoint/BizTalk) – Part 8 Integrating with the Cloud

First off I apologize for the length of this post, but I trust that you will find some benefits with it.  The goal of this post is to demonstrate an on-premise form being completed and having that information sent to the cloud via BizTalk 2009.  The cloud will route this request to an off-site service that will respond to this request indicating whether or not the request was valid and return a result back to BizTalk.  BizTalk will use this status to kick off some workflow. I will also dive into some of collaboration features of WSS 3.0 and demonstrate how you can still provide form exception handling and form re-submittal in an asynchronous scenario.

You may think that I am just trying to stuff as much Microsoft technology into one blog post as possible. What I am really demonstrating is giving BizTalk a user interface and allowing it to communicate with a off-premise service via the cloud.  The service itself is not hosted in the cloud, but rather in someone else’s data centre.  I am using the Microsoft cloud to relay the request using the App Fabric Service Bus(formerly known as the .Net Service Bus).

Note: I started this blog post back in early November prior to November 2009 CTP so I have had to go through and resolve the breaking changes that the new CTP introduced.  I am not planning on getting into these breaking changes in much detail, but for further details check out the App Fabric team’s blog post.

To give this post some business substance, I am going to walk through a condensed use case in the Power industry in Alberta, Canada.  The Power industry is broken down into a few segments: Generators, Transmission companies, Distribution companies and Retailers.  The scenario I am going to walk through is on that involves a customer switching their Retailer.  Distribution companies provide the “infrastructure” that allows power to be delivered to Residential and Industrial customers.  Distribution companies are also required to provide meter usage data to Retailers where they will use this information to provide the end customer with a bill.  Customers generally have an option when it comes to choosing their Retailer but not so much the Distribution company.  In this scenario, the customer would like to switch retailers.  The Retailer must send the Distribution company a “Switch Retailer Request” in order for this customer to be officially “switched”.  The Distribution company needs this information so that they can send the correct meter data to the Retailer so they can bill their customer.

 

image

  1. Information Worker will fill out InfoPath “Switch Retailer Request”
  2. InfoPath form will be saved into a WSS Document Library
  3. BizTalk will consume this InfoPath form and submit the data to the Distribution Company’s “Switch Retailer" Service.  This Service is an on-premise service that is accessible via the .Net Service Bus AppFabric Service Bus.
  4. The .Net Service App Fabric Service Bus will provide a “simple” SiteID validation.  A SiteID is a identifier used to designate a Customer site – kinda like an address.
  5. If the SiteID validation is successful then the retailer will be switched and the InfoPath form will be sent to the “Success Switch Retailer Request” document library
  6. If the SiteID validation fails then the InfoPath form will be sent to the “Failed Switch Retailer Request” document library
  7. When the InfoPath form is sent to the Failed Switch Retailer Request” document library an email will be sent to the information worker informing them that the switch was not successful. The Information worker can then update the form to fix the error.  An error description is also provided in an “Error Message” column in the document library.

On Premise Switch Retailer Service

The Switch Retailer Service was written using C#, WCF and the July CTP of the .Net Services SDK November CTP of the App Fabric Service Bus SDK.  I started with a pure WCF Service(so that I could generate Schemas for BizTalk) and then added the bits required for this service to be exposed via the .Net Service bus.  This is a similar approach to the one that Richard Seroter used in his blog post.

 

I started with a couple of data contracts:

  • SwitchRetailerRequest – this message will be sent from BizTalk and will contain pertinent information like the Customer’s Site ID, the Activation Date, the Retailer Id etc. 

image

  • SwitchRetailerResponse – this message will be sent back to BizTalk from the SwitchRetailer service.  As part of this message, a status will be sent back and an ErrorMsg when the Switch Retailer fails.

image

 

My interface defines an operation called “CustomerSwitchRetailer” and as you can see it is expecting a SwitchRetailerRequest and will return a SwitchRetailerResponse.  I have also provide a namespace and a name for this Service contract.

image

The implementation of this service includes a call to the “validSite” method.  This method contains the logic that indicates whether this site is valid. 

image

The host for this service is a console application.  If you are familiar with the “Echo” sample then this will look very familiar.  When the CTP changed, I had to update this method due to some of the breaking changes.

image

 Here is the significant portion of my services’ App.config.  I started with the .Net Services SDK Echo sample and have adopted it for my use.  Changes include creating a behaviour called “SbEndpointBehavior”.  In this behavior, I have indicated that I want to use “UserNamePassword” credentials as the credentialType.  When BizTalk connects to this service, we will need to match this credentialType in the BizTalk Admin Console.  The credentials themselves are credentials that you configure in the .Net Service bus developer portal.

The UserNamePassword credential type is no longer supported in the latest version of the CTP. The prescriptive guidance is to use one of the new authentication types including Shared Secret, Simple Web Token or SAML.  For the purpose of this example I have used Shared Secret.

Also notice the binding.  I have chosen the “netTcpRelayBinding” that ships with the .Net Service SDK.  When I initially created the WCF service I was using the basicHttpBinding but since I want to take advantage of the .Net App Fabric Service Bus’ relay capabilities I want to use this binding. 

image

 

BizTalk

If we shift gears to the BizTalk portion of the solution, you will find the following artifacts:

  • SwitchRetailer_InfoPath.xsd schema.  This schema is the message that BizTalk will receive from SharePoint and is also the underlying data structure in our InfoPath form.  The “ErrorMessage” element is not displayed on the InfoPath form but will be used later to populate a SharePoint column with the error message that is being returned from the Switch Retailer service.

image

  • Service Schema – This schema was initially generated from consuming the WCF service that I built(before converting it to a .Net Service bus service).  A powerful feature of WCF, and therefore the .Net App Fabric Service bus, is the separation between contracts and bindings.  I am still using the same contract between the WCF service and the one exposed by the .Net Service Bus, but the binding will be different.

image

  • I need a map that will transform the data in the InfoPath form into the Service Request method

image

  • Once I have this request mapped, I want to send it to the service and receive the response. 

image

  • As part of the response process, I need to determine the status of Switch Retailer.  I want to use a Distinguished field to make the retrieval of this status a simpler endeavor.  Since adding Distinguished Fields(or promoted properties) to a Service schema is not advised since you may update that schema later and lose the designation, I have created a helper message and want to map the Switch Retailer Response message to this helper message.

image

image

  • I have a simple decide shape that will check the value of this distinguished field.  In the event that the status is true then I want to populate the “Success” SharePoint document library and in the event that the status is false then I want to populate the “Unsuccessful” SharePoint document library. 

Note: The WSS Adapter can be used in a dynamic fashion, so I could eliminate 1 port and use a dynamic port instead of a static port.  To keep this example simple, I have opted to use 2 static ports.

image

 

image

  • In the “Else” branch I want to populate this return message with the Error Message from the service response message.  I will use this information to populate a column in the "Failures” document library

image

  • To allow for the Error Message to flow through to SharePoint, you will need to create a column in the document library(see below), but you will also need to configure BizTalk to pass this data along to SharePoint.  So in your “Failures” send port, set both the “Namespaces Aliases” and then set the Column 01 Value with an appropriate XPath statement.

Namespace Aliases: ns0=http://BizTalk_Server_Project3.SwitchRetailer_InfoPath

Column 01 Value: %XPATH=//ns0:SwitchRetailer/ErrorMessage%

image

SharePoint

I am not going to go through each step in detail if I have already gone through it prevously but I will try to link back each step to a previous blog post where applicable.

  • Creating the InfoPath form from an XSD (Post 6)

image

image

  • Publish Info Path form (Post 6).  As part of this process a document library called “Switch Retailer Document Library” was created.

image

  • Once you have published your form, when you click on “New” –> “New Document” your Switch Retailer Info Path Form should now appear.

image

image

  • Recall in the BizTalk section that I have to route Switch Retail responses to either a Unsuccessful or Successful document libraries (Post 3).  I have now gone ahead and done this.

image

image

  • In the case of the “Failures” document library I want to be able to provide error information into this document library so that when the information worker comes into fix the issue that they are aware of  what the issue is before they open the form.
    • Click on “Settings” –> “Create Column”

image

image

image

  • When a Switch Request Fails, I would like to notify the information worker of this situation.  Yes, BizTalk has an SMTP adapter, but I have decided to leverage SharePoint to provide this functionality.  In order to do this I need to set up my outgoing SMTP settings in WSS 3.0.
    • Launch the “SharePoint 3.0 Central Administration” tool

image

    • Click on “Application Management”

image

    • Click on “Web application outgoing e-mail settings”

image

    • Ensure that the correct Web Application has been selected and then provide the required email settings.  For this example I am just routing emails through my ISP.

image

    • Also ensure that the user who will be receiving these failure alerts has an email associated to their account.  To do this jump back to your “Web Site” and click on the “Site Actions” - “Site Settings” link

image

    • Click on “People and groups”

image

    • Click on the link of the user that you are interested in receiving email

image

    • Ensure that you have an email provided

image

    • Navigate back to your “Failures” document library

image

    • Click on “Actions” –> “Alert Me”

image

  • Provide a title for your alert, add any required users that you want to receive this email and then indicate when you want the user(s) to receive the email.  I have decided to configure these users to only receive alerts when a “new” item is added.

image

image

Configuring the demo

  • Start the “Switch Retailer Cloud” service

image

  • Since I am using the November 2009 CTP SDK and have opted to use the Shared Secret authentication type, I need to provided a Service Namespace, my Issuer Name and my Issuer Secret.  These details are available from the Azure Developer Portal.

image

image

  • Next I want to ensure my BizTalk configuration is correct.  The first step is to establish my receive location to SharePoint that will look for Switch Retailer InfoPath forms that have been submitted to the “Switch Retailer Document Library”

image

  • The next step is to establish my configuration that will allow BizTalk to connect to the App Fabric Service bus. In this two-way send port, I am going to use the WCF-Custom Adapter.  This Adapter will allow me to use the netTcpRelayBinding which allows me to communicate with the App Fabric Service Bus.  For this reason, you need to have the App Fabric Service Bus CTP installed on your BizTalk server.

image

image

I needed to create a Endpoint Behavior and since the Switch Retailer Service uses a transportClientEndpointBehaviour, the client(BizTalk) needs to match this Endpoint Behavior.  Since UserNamePassword is no longer an option, I have opted for “SharedSecret”.

image

  • I now need to create two Send Ports; one that will route Successful Retailer switches and one that will route Unsuccessful Retailer switches.

image

image

Running the Demo

In the previous steps, we have started the Switch Retailer Service, configured BizTalk and are are ready to start calling this service via SharePoint/BizTalk.  The first InfoPath form submitted will be successful, followed by a failed request.

  • InfoPath form has been populated and submitted

image

  • Switch Retailer Request has been placed in Document Library

image

  • BizTalk is polling this Document Library on a regular basis

image

  • The App Fabric Service receives this request and routes it to the Switch Retailer Service.  The service will validate the request and provide the response to BizTalk.

image

  • As you can see the response was successful and the document was routed through the SharePoint Success Send Port.

image

  • The InfoPath form has been routed to the “Success” Document Library

image

  • I will now send an invalid Switch Request by providing a Site ID that only has a length of 3.

image

  • The Service has detected this invalid Site Id and logged it accordingly

image

  • BizTalk has received the response and detected that the Switch Retailer failed.  BizTalk will therefore route this message to the “Failed” document library.

image

 

  • Failed InfoPath form has been delivered and the Error that has occurred is populated in the “Error Message” column.

image

  • I had previously configured SharePoint to notify me, via email, whenever a new document was placed in the “Switch Retailer Failures” document library. 

image

  • I have fixed up the Site Id and re-submitted

image

  • The Switch Retailer Service has received this updated request and this time it was successful

image

image

 

Generally hooking up BizTalk to a user interface can be a risky endeavor as the UI can be blocked while BizTalk is processing.  If a downstream system is down, a time out could exist on the UI client if BizTalk is working through its retry progressions.  By using the approach above, we have eliminated the potential of the UI client being locked up while BizTalk is calling the Switch Retailer service.  By leveraging some workflow capabilities in SharePoint and BizTalk we can still provide the user meaningful feedback in reasonable amount of time asynchronously.