开发者

BTSTask and BTSControl for BizTalk 2009

开发者 https://www.devze.com 2023-01-05 10:09 出处:网络
I am using BTSTask and BTSControl to do some deployment operation on a BizTalk 2006.we moved to BizTalk 2009 and these tools seem to n开发者_JAVA技巧ot work with BT2009. are there any specific version

I am using BTSTask and BTSControl to do some deployment operation on a BizTalk 2006. we moved to BizTalk 2009 and these tools seem to n开发者_JAVA技巧ot work with BT2009. are there any specific version or new tools for BT2009?


I would instead look at the BizTalk Deployment Framework. Its built on MSBuild and WIX and does absolutely everything from adding developer tools to quickly deploy things for development to handling patching via WIX. I highly recommend it.


I did hit the same limitation with BizTalk 2009 but managed to work around using Microsoft.BizTalk.ExplorerOM from within PowerShell scripts.

Example for Stopping and Starting BizTalk Applications

(following this excellent blog post on BizTalk Deployments with PowerShell)

param
(
    [switch] $start,
    [switch] $stop,
    [string] $appName,
    [string] $connectionstring
)


    function Stop-Application
    {
        $app = $catalog.Applications[$appName]

        if ($app -eq $null)
        {
            Write-Host "Application " $appName " not found" -fore Red
        }
        else
        {
            if ($app.Status -ne 2)
            {
                $null = $app.Stop(63)
                $null = $catalog.SaveChanges()
                $null = $catalog.Refresh()
                Write-Host "Stopped application: " $appName -fore Green
            }
            else
            {
                Write-Host "Application: " $appName " already stopped" -fore Yellow
            }
        }
    }


    function Start-Application
    {
        $app = $catalog.Applications[$appName]

        if ($app -eq $null)
        {
            Write-Host "Application " $appName " not found" -fore Red
        }
        else
        {
            if ($app.Status -eq 2)
            {
                $null = $app.Start(63)
                $null = $catalog.SaveChanges()
                $null = $catalog.Refresh()
                Write-Host "Started application: " $appName -fore Green
        }
        else
        {
            Write-Host "Application: " $appName " already started" -fore Yellow
        }
    }
}


$null = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.BizTalk.ExplorerOM")

$catalog = New-Object Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer
$catalog.ConnectionString = $connectionstring


if ($catalog.Applications -eq $null)
{
    Write-Host "Application catalog is empty" -fore Red
}


if ($start)
{
    Start-Application
}


if ($stop)
{
    Stop-Application
}

Our BizTalk deployment is driven by MSBuild, BTSTask and ExplorerOM via PowerShell. I even managed to solve the problems when deploying Assemblies other Assemblies (or Ports) depend on.


I have no personal experience with BTSTask or BTSControl but I have actually been able to utilize Team Foundation Server to great success with BizTalk 2009. I basically followed the article outlined below and then customized it from there for my own environment:

BizTalk 2009 - Build & Deploy automation with Team Foundation Server 2008 – Part 1

0

精彩评论

暂无评论...
验证码 换一张
取 消