Pipeline Mapping Order
Remember, when you apply maps in a receive port; the maps are applied after the pipeline process. On the way out, the direction is opposite.
…(read more)
Remember, when you apply maps in a receive port; the maps are applied after the pipeline process. On the way out, the direction is opposite.
…(read more)
So I am currently architecting and developing a BizTalk 2006 SAP Integration solution for a customer. This is really great stuff. One of the key designs of this solution was using SSO to store SAP configuration data along with other custom data. In my opinion if you are thinking about using configuration data inside of BizTalk you must take a serious look at SSO as a data store. One of the gems out there to get someone up to speed very quickly is two samples from MS, get them here. The ones you want to look at are the ‘Enterprise Library 2.0 with BizTalk Server’ and ‘SSO as Configuration Store’. The former one includes the design and runtime assemblies that extend the configuration provider allowing you to use SSO as a configuration store while using Enterprise Library (or someone else’s product) which I feel solved the problem of why developers never used the SSO in the first place. I’ve been to many customers that are currently using BizTalk and because maybe they didn’t understand the ins and outs of SSO, they ignored it completely. On a little side note, if you want a good place to start learning about SSO go to Richard Seroter’s blog about SSO here. He’s a great talent in the BizTalk space. Now where was I? Oh yes so the second sample is a great introduction on actually using the tools provided out of the box to enable you to create an ‘Affiliate Application’. What is an ‘Affiliate Application’ you ask? Basically the AAs are logical containers that represent a system use what to use SSO with (SAP in my case). Now AAs can be grouped into several types (of course) and those types are Individual, Group and Host Group.
For this article I’ll be focusing on Individual types which offer a 1:1 mapping between a windows based account and non-windows account (e.g. SAP account). Now since SAP uses basic authentication credentials (username and password) so the mapping is quite easy.
Now in order to enable SSO you can use the command line utility SSOManager.exe -enablesso as SSO is not enabled by default. Now the easiest way to send data into SSO is by using an XML document and using the SSOManager.exe -createapps this will tranverse the XML document and create an AA and key-value pairs. Here’s a sample XML file to send in:
<?xml version=”1.0″?>
<sso>
<application name=”AppMgmtUsingSSOApp”>
<description>AppMgmtUsingSSOApp</description>
<appUserAccount>BizTalk Application Users</appUserAccount>
<appAdminAccount>BizTalk Server Administrators</appAdminAccount>
<field ordinal=”0″ label=”reserved” masked=”no” />
<field ordinal=”1″ label=”connectionString” masked=”yes” />
<flags configStoreApp=”yes” allowLocalAccounts=”yes” enableApp=”yes” />
</application>
</sso>
Notice the 0 ordinal being reserved, this must be set as so, or an exception is thrown.
Now MS always gives you at least ten different ways to do the same thing. So another way to enter your data in the SSO data store you need the SSO Client Utility that comes with the Enterprise SSO bits. If you look at the BizTalk help files and search for ’How to install the SSO Client Utility’ you’ll find the steps involved. Developers can also programmatically read and write data to the SSO store using the SSOConfigStore object. Here’s a sample for reading and writing configuration to the store:
public static string Read(string appName, string propName) { try { SSOConfigStore ssoStore = new SSOConfigStore(); ConfigurationPropertyBag appMgmtBag = new ConfigurationPropertyBag(); ((ISSOConfigStore) ssoStore).GetConfigInfo(appName, idenifierGUID, SSOFlag.SSO_FLAG_RUNTIME, (IPropertyBag) appMgmtBag); object propertyValue = null; appMgmtBag.Read(propName, out propertyValue, 0); return (string)propertyValue; } catch (Exception e) { throw; }
}
public static void Write(string appName, string propName, string propValue) { try { SSOConfigStore ssoStore = new SSOConfigStore(); ConfigurationPropertyBag appMgmtBag = new ConfigurationPropertyBag(); object tempProp = propValue; appMgmtBag.Write(propName, ref tempProp); ((ISSOConfigStore)ssoStore).SetConfigInfo(appName, idenifierGUID, appMgmtBag); } catch (Exception e) { throw; } }
Notice the use of the ConfigurationPropertyBag object which is just a class that inherits from IPropertyBag which signature looks like this:
public interface IPropertyBag { void Read(string propName, out object ptrVar, int errorLog); void Write(string propName, ref object ptrVar); }
Now in term of using this data store to hold SAP data mappings, first we need to find out what SAP needs in addition to just username and password to gain access to the system. Here’s a list of keys that we need to set in our key-value pairs:
So once you setup these key-value pairs, you can configure your adapter by selected the AA from a dropdown of available AAs in the configuration window thus not having to fill out username and password on that screen. To the adapter the AA is mutually exclusive to a UserName and Password pair. Internally after looking at the adapter code, the adapters make a call to the SSO with a ValidateAndRedeemTicket method passing in the message itself and the AA information and getting the credentials in the form of a string[] object in return.
I guess my point in this article is just to bring awareness to SSO because as I look out onto the BizTalk landscape I’m not seeing customers using it (1) to its full potential and (2) at all and I find SSO as a value add to most solutions. So please get out there and download the samples and enjoy. I’m sure to be posting more about SSO in the near future so stay turned.
|
|
When using XML as your fact, if the namespace changes, make sure you update your rules. The easiest way may be to export the rules (via BizTalk Administration Console > Applications > Assembly > Policies) and do a search and replace on the namespace.
In an effort to expand on this entry, while testing, there are many times where I have to use the mllpreceive.exe to capture data.
I have made it easy by adding right click functionality.
I created a batch file called Receive.bat with the following contents:
MLLPRECEIVE.EXE /P 12000 /SPLIT /SB 11 /EB 28 /CR 13 /D %1
I then […]
Hello Everyone,
My name is Sreedhar Pelluru and I am a Programmer Writer with BizTalk Server team here at Microsoft. I own the content for Business Rule Engine (BRE) at the time of this posting. The reason for creating this blog is to evangelize about BRE. You will also see postings from our BRE development team on this blog periodically. I am planning to blog on basic and advanced features of BRE and walkthroughs that use BRE features. Please feel free to send me any feedback on BRE content in BizTalk documentation or any posting on this site.
Thanks & Regards,
Sreedhar Pelluru
MCSD .NET, MCP (BizTalk 2006)
The first in a series of papers addressing developing code for BAM solutions is now live at
http://download.microsoft.com/download/b/1/d/b1d9ddf9-88c6-4d4e-abea-4787fdc85bec/DevelopingWithBAM101.exe
This paper covers the basics of using EventStreams to instrument your existing business processess.
Now that the Commerce Server development team has shipped their flagship product, they’ve started to publish some great new posts about using Commerce Server 2007. If you don’t already subscribe to these blogs, you really should!
Nihit Kaul [MSFT] – SDET (Super Dude Especially Testing) has posted a bunch of great tips for working with Commerce Server 2007. Nihit is a great guy and accomplished developer/tester who frequents the microsoft.public.commerceserver newsgroups, helping out folks with their CS development issues.
CS 2007: Things you didn’t know about the Customer and Orders Manager UI
CS 2007: Running Pipelines in a Console Application
CS 2007: How to display a custom user profile definition in the Customer and Orders Manager?
CS 2007: Where is my CreditCardNumber?
Alan Faulkner [MSFT] – SDET (Another Super Dude and Great Proof Reader) has also been busy with some really good posts explaining the inner workings of Commerce Server 2007. If you liked my recent TechNet article about using the new Orders Adapter, thank Alan. He was kind enough to proof read it during the early stages!
Error Connecting to Sql Server when running Data Warehouse Import Wizard
How to generate trace output for the Commerce Server Adapters
Commerce Server Adapter Message Schemas Shipped in SDK
Why isn’t my Commerce Server Events recorded in Data Warehouse Analytic Reports?
Order Adapter’s Status Values
Vinayak Tadas [MSFT] – CSCG (Commerce Server Catalog Genius) has some really in-depth posts about the Catalog subsystem that anyone using CS2007 should read again and again.
Improving the catalog search experience in Commerce Server 2007
Implementing Thesaurus support in the catalog system
New Catalogset features in Commerce Server 2007
Vinod Kumar [MSFT] – TM (The Man!) has also begun publishing some excellent posts, especially if you plan to extend the new Orders system in Commerce Server 2007.
Orders DataMigration From CS2002/2000 to CS2007
Extensibility Notes
Changing Column Matching for OrderTemplate and Basket Persistence
Mapping Weakly Typed Properties to Storage
Extending the Orders System
Technorati Tags: Commerce Server
We just released two great resources for BizTalk BAM aficionados. The first,
BAM Frequently Asked Questions covers great topics like BAM tracing, common errors, maintaining the BAM databases and more. Good stuff.
I really like the second doc.
Developing with BAM goes through the BAM API and explains (with code snippets) how to use the API. Obviously you could write
volumes on the tactics for BAM programming, but this document is a great start for those looking to get more out of BAM.
Technorati Tags: BizTalk
Next week I am relocating to Chicago. I’ve already found the Midwest BizTalk User Group and I plan on attending the Chicago meetings. I’ll still be writing BizTalk Server content while attending graduate school.
Liza