a trace of thought on...BizTalk Server, Team Foundation Server, Windows Mobile, etc. RSS 2.0
 Wednesday, March 01, 2006

There are some updates to the Deployment Framework and log4net story that I've been meaning to release for quite some time. After this, I'll focus my deployment efforts on BizTalk 2006 (didn't I say that last release?)

Below are a list of revisions. On this blog's home page under "Downloads", you will find an updated full download (with sample), as well as updated "Core" and "Tools" downloads.  "Core" contains only the deployment framework itself and can be used for upgrades of existing projects.  "Tools" contains source for all utilities used by the framework.  Be sure to put a fresh copy of BizTalk.NAnt.Tasks.dll in your nant\bin directory. 

  • Update to the log4net.Ext.Serializable library.  Note that the "Tools" download now has variants of this library for both log4net 1.2.0 and 1.2.9, though the sample is built against 1.2.9.  The important change here is that the original version of the library had a threading bug...as a result, the usage pattern for the library has changed somewhat.  Now, an instance of log4net.helpers.PropertiesCollectionEx is declared (as an orchestration variable), and an expression shape at the top of your orchestration will do something like below (notice logProps is passed to all logging calls so as to preserve context despite thread changes across dehydrations.)  See the sample for additional detail.

    logger = log4net.Ext.Serializable.SLogManager.
       GetLogger(@"BizTalkSample",log4net.helpers.CallersTypeName.Name);
    ...
    logProps.Set("InstanceId",TopLevelOrch(Microsoft.XLANGs.BaseTypes.InstanceId));
    logger.Debug(logProps,"Received top level request...");               
                   
  • Update to the SSOSettingsFileReader class to include an "Update" method.  Likewise, an additional custom NAnt task called "updatessoconfigitem" that allows you to add or update config items within an SSO affiliate application.  What is the use case for this?  Suppose you have a piece of information that you a) don't want to store in SettingsFileGenerator.xls (perhaps because you can't manage that file securely) and b) you need access to at run time.  (For instance, it might be an Oracle username/password.)  You could ask an operator/admin for this information at deployment time using SetEnvUI.exe/InstallWizard.xml (from the deployment framework) -- and then in your project-specific NAnt file do this:

       <target name="customSSO" if="${property::exists('serverDeploy') and serverDeploy}">
          <updatessoconfigitem ssoitemname="databaseUserName" ssoitemvalue="${sys.env.databaseUserName}"/>
          <updatessoconfigitem ssoitemname="databasePassword" ssoitemvalue="${sys.env.databasePassword}"/>
       </target>            
          

    At runtime, you can simply use SSOSettingsFileReader to retrieve this information.  Note that this example checks for whether we are doing a server deployment - so in this case, we would have the development environment values in SettingsFileGenerator.xls. 

  • Added a small utility called SSONameValueDump to the tools download to view current name/value pairs of an SSO affiliate application (if you have appropriate permissions.)
  • Update to the <controlbiztalkports> custom NAnt task to allow Send Port Groups to be shared across projects.  That is, Send Port Groups will only be removed if they no longer contain Send Ports (and putting new Send Ports into an already-existing Send Port Group will happen automatically.)
  • XmlPreprocess will be run against log4net configuration files, if you are using log4net. This allows you to use SettingsFileGenerator.xls to control logging levels for different physical environments.
  • SetEnvUI.exe no longer defaults to "last directory" when doing a file browse, to avoid confusion between applications when managing multiple BizTalk application installs.
  • If you use ElementTunnel, you will find that the xpath file will be reversed automatically for unescape operations (thanks to Frank de Groot for that update!)
  • Fix: When deploying HTTP/SOAP infrastructure, file system permissions granted to the specified application pool account.
  • Fix: The "quick update" target (updateOrchestrations) now respects true/false properties for includeSchemas, includeTransforms, etc. (A menu option in Visual Studio is created for this target when you use the MakeBizTalkExternalTools script. The target updates orchestrations, components, schemas, and transforms (see Flanders' post on this) Using this as part of your normal edit/run/debug cycle is a must for productivity…)
  • Fix: Handle multiple assemblies (of one artifact type) correctly in more cases, including where we are not deploying to the management database (i.e. gac deployment only.)

Download: Full Sample, Framework Core, Tools Source

Wednesday, March 01, 2006 12:27:09 PM (Central Standard Time, UTC-06:00)  #    Comments [10] -
Deployment Framework
Friday, March 24, 2006 11:11:51 AM (Central Standard Time, UTC-06:00)
I have a small change recommendation for the Excel Spreadsheet. Instead of using the Value property to retrieve the property value, would it be possible to use the Text property. This will allow custom formatted cells, like dates and times, to properly get reflected in the settings file. The changes is as simple as

propertyValue = Trim(Cells(i, colIndex).Text)
If propertyValue = "" Then ' Use Default value
propertyValue = Trim(Cells(i, 2).Text)
End If

Thanks,
craig
Craig Neuwirt
Thursday, May 04, 2006 3:30:43 AM (Central Standard Time, UTC-06:00)
Hi Scott,
We currently use your excellent framework for all our deployments in the 2004 environment. We are currently planning the upgrade to 2006 and from you post you are (horray) working on a 2006 deployment framework. Do you have an idea when first drafts of this will be ready? Could we offer our services as testers?

Thanks for your good work!
Matt :o)
Matt
Friday, May 12, 2006 8:18:25 AM (Central Standard Time, UTC-06:00)
2006 - soon and very soon (next couple weeks, I'm hoping)

thanks!
Tuesday, May 16, 2006 9:37:43 AM (Central Standard Time, UTC-06:00)
Great news - Thanks Scott.
Matt
Monday, June 26, 2006 4:57:58 AM (Central Standard Time, UTC-06:00)
Hi Scott,
Can you give any idea as to what changes we can expect in the next version of the Deployment framework.
Slán
Gar
PS keep up hte good work
Tuesday, June 27, 2006 7:21:19 AM (Central Standard Time, UTC-06:00)
I'm hoping to have more detail (and something to ship) very, very soon.
Tuesday, September 12, 2006 1:25:23 PM (Central Standard Time, UTC-06:00)
I don't know if this is good place to post a question, but I don't see a forum anywhere so I will give it a shot here.

I am attempting to implement the Deployment Framework for BizTalk 2004. I am abe to get my sln to build and to deploy from my local machine but when I create the MSI and run the deployment from start>>programs>>myproject>>Deploy, it does not work and I get an error. I am able to enter the input needed for the deployment but once I click "finish" (regardless of the options selected) it gives the following:

errorSystem.ComponentModel.Win32Exception: The system cannot find the file specified
at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start(String fileName)
at SetEnvUI.SetEnvUIForm.btnFinish_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

I see that it is a file is missing. When I enable the JIT Debugger and run the application I see that the "fileName" is null. Is this because it is not pulling the info from the Install-time Configuration? How do the Install-Time configuration variables get tied back into the deployment?

Thanks
Matt N
Tuesday, September 12, 2006 1:34:51 PM (Central Standard Time, UTC-06:00)
Hi Matt N -

The install time configuration variables that you supply in the wizard UI get fed to the deployment via environment variables.

However, I'm guessing that in your case, the failure is happening when the wizard attempts to launch "ServerDeploy.bat" - which is fed as a command line argument by the start-meny shortcut. Do you see the .bat files in your programs->myproject directory?

Ths msi building process should include those automatically.
Tuesday, September 12, 2006 1:35:23 PM (Central Standard Time, UTC-06:00)
I thought I should add an email address so the comments don't become a forum. Sorry.
Matt N
Tuesday, September 12, 2006 1:36:04 PM (Central Standard Time, UTC-06:00)
Matt N - you can email me with the mail link at the bottom of the blog.
Comments are closed.
Archive
<July 2008>
SunMonTueWedThuFriSat
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789
About the author:

Scott Colestock lives, writes, and works as an independent consultant in the Twin Cities (Minneapolis, Minnesota) area.

© Copyright 2008
Scott Colestock
Sign In
All Content © 2008, Scott Colestock
DasBlog theme 'Business' created by Christoph De Baene (delarou)