To be able to have BizTalk360 alerts created from BTDF, you need to do the following:

  1. Download BT360Deploy
  2. Get certain information from your BizTalk360 environment
  3. Add BT360Deploy to your BTDF project
  4. Add BizTalk360 keys to the Settings file from BTDF

Download BT360Deploy

BT360Deploy is a console application which uses some Nuget-packages. All the binaries you need can be downloaded as a single package. That package also contains the following documentation:

  • How to use BT360Deploy v1.1.pdf (this documentation)
  • Mapping between BizTalk360 and the BTDF Settings file v1.1.pdf
  • BizTalkDeploymentFramework.BizTalk360.targets
  • SettingsFileGenerator.xml

How to use BT360Deploy v1.1.pdf

This document is a manual on using BT360Deploy.

Mapping between BizTalk360 and the BTDF Settings file v1.1.pdf

This document describes which Alert related fields in BizTalk360 User Interface correspond with which fields in the BTDF Settings file.


This file will be copied to the installation folder of MSBuild. This is described later in this document.


This is a sample BTDF Settings file which contains all the possible fields which are currently supported by BT360Deploy.

Incorperate BT360Deploy into BTDF

Now you have the binaries and the documentation, we’ll copy the necessary files to the needed locations.

1. Navigate to the installation folder of BTDF. This folder is something like:

     C:\Program Files (x86)\Deployment Framework for BizTalk 6.0

2. Navigate to the subfolder Framework\DeployTools and create a new folder called BizTalk360
3. Copy the binaries of BT360Deploy to that folder.
4. Next navigate to the MSBuild installation folder, it’s something like:

     C:\Program Files (x86)\MSBuild

5. Navigate to the subfolder DeploymentFrameworkForBizTalk\5.0. From the Documentation folder of the BT360Deploy package copy BizTalkDeploymentFramework.BizTalk360.targets to that folder.

Note: Don’t forget to repeat these steps on each server where you deploy your BizTalk Applications.

Get certain information from your BizTalk360 environment

To be able to run correctly, you need to gather the following information and add it to the BTDF Settings file:

  • URL of BizTalk360
  • BizTalk360 Environment Id
  • A BizTalk360 authorized Windows Account

URL of BizTalk360

It is enough to know the URL you use to start BizTalk360, so in most cases the format will be:

http://<server name>/BizTalk360

BT360Deploy will extend the given URL to get to the services from BizTalk360.

BizTalk360 Environment Id

BizTalk360 uses the concept of environments. Each environment corresponds with another BizTalk group. This way you can maintain and operate multiple BizTalk groups from the same user interface.

Each environment is uniquely identifiable by an Id, actually a Guid, which can be retrieved from the API Documentation screen in BizTalk360. This screen can be found by navigating to Settings / API Documentation. There, a list shows all environments and their ids, which are present in your BizTalk360 configuration.

The API Documentation is part of the Platinum license tier. If your organization did not purchase that tier, you won’t be able to access the API Documentation, hence you can’t retrieve the needed EnvironmentId.
In that case, you can open SQL Server Management Studio, connect to the instance which contains the BizTalk360 database, create a new query and execute the query below:

SELECT * FROM [BizTalk360].[dbo].[b360_admin_BizTalkEnvironment]

With the response you will be able to retrieve the EnvironmentId you need.

A BizTalk360 authorized Windows Account

To be able to use the BizTalk360 API you need to have a Windows account that has authorizations to create alerts in BizTalk360. Because you also have to apply the password of that account, it is better to use a Windows account which only has few authorizations in BizTalk360. This account needs the following authorizations:

- All Applications
- Manage Alarm

Add BT360Deploy to your BTDF project

Now you have gathered the needed information, you can start incorperating BT360Deploy into your BTDF project. Start with copying the BT360Deploy binaries into your Visual Studio solution which contains the BizTalk Application and it Deployment project.

Note: Although you can add all fields from the Alarm screens, only the following fields are required:

- Alarm Name
- Email ID’s

1. Open your Deployment project and add the following line on top of the project file

  <Import Project="$(DeploymentFrameworkTargetsPath)BizTalkDeploymentFramework.BizTalk360.targets"/>

2. Copy the following text at the end of your project file

  <Target Name="CustomPostDeployTarget">
     <CallTarget Targets="DeployBizTalk360" />

Add BizTalk360 keys to the Settings file from BTDF

Next we’ll add BizTalk360 keys to the Settings file of your BTDF project. Besides the keys mentioned above, we’ll also add key to define the BizTalk360 alert.

  1. Open the SettingsFileGenerator.xml in Excel.
  2. Start with adding the following keys in the first and second columns:

     Settings column Default values column 
     BizTalk360_url  <BizTalk360 URL>
     BizTalk360_environmentId  <BizTalk360 Environment Id>
     BizTalk360_user  <BizTalk360 authorized Windows account>
     BizTalk360_userPassword  <Password of BizTalk360 authorized Windows account>
  3. To create a simple alert add the following keys

    Settings column  Default values column 
     BizTalk360_alertName  <Name of BizTalk Application>
     BizTalk360_commaSeparatedEmails  <Email address to receive notification>
     BizTalk360_isAlertDisabled  False
     BizTalk360_alertASAPWaitDurationInMinutes  10
     BizTalk360_isContinuousErrorRestricted  3
     BizTalk360_isAlertOnCorrection   True
  4. Finally add the following fields to monitor the state of certain artifacts

    Settings column  Default values column 
     BizTalk360_expectedStateReceiveLocations  Enabled
     BizTalk360_expectedStateSendPorts  Started
     BizTalk360_expectedStateOrchestrations  Started
  5. Now save and close the file

When everything is put in place correctly, you can deploy the BizTalk application and the BizTalk360 Alert will be created.

Also when you generate a MSI (Tools / Deployment Framework for BizTalk / Build Server Deploy MSI) and deploy the BizTalk Application, the BizTalk360 Alert becomes created nicely.

To check the results in BizTalk360, you navigate to Monitoring / Manage Alarms and the newly created Alarm will show up there.

Setting the expected state for particular Ports and/or Orchestrations

When you provide the expected state fields for Ports and/or Orchestrations, the state will be set for all the Ports and/or Orchestrations within the BizTalk Application at hand.
If you want to set the expected state of specific Ports and/or Orchestrations to another value you can use the following fields:
- Receive Locations: BizTalk360_rl_exp_<Name of the Receive Location>
- Send Ports: BizTalk360_sp_exp_<Name of the Send Port>
- Orchestrations: BizTalk360_orch_exp_<Name of the Orchestration>

For more information, check the Mapping documentation.

Creating BizTalk360 Alert only for Acceptance and Production environment

In most cases you won’t have BizTalk360 licenses for your entire DTAP environment, but only for your Production and/or Acceptance environment. This means you don’t have to create alerts for your Development and Test environment. To achieve that you need to do the following:
- Add a variable called Environment to your BTDF Settings file
- Assign a value per environment
- Add the variable to your BTDF project file
- Add a filter to the CustomPostDeployTarget

Add a variable called Environment to your BTDF Settings file

From your Visual Studio solution, open the SettingsFileGenerator.xml with Excel. Add an extra line just before the SSOAppUserGroup line. In the first column type ‘Environment’, which will be the name of this new variable.

Assign a value per environment

Per environment you’ll assign this variable a name, for example DEV, SDEV, TEST, ACC and PROD.

Add the variable to your BTDF project file

Next you need to make the new variable available in the BTDF project file. Therefore you need to open the project file and look for an ItemGroup which contains the value PropsFromEnvSettings.
Typically this settings contains the values SSOAppUserGroup and SSOAppAdminGroup. Add a semicolon and the new variable Environment. Afterwards the ItemGroup will look like below.

    <PropsFromEnvSettings Include="SsoAppUserGroup;SsoAppAdminGroup;Environment" />

Add a filter to the CustomPostDeployTarget

In the final step you’ll arrange that the step which executes BT360Deploy only gets executed in case you’re deploying on the ACC or PROD environment. Navigate to the target called CustomPostDeployTarget and add the condition: $(Environment)=='ACC' OR $(Environment)=='PROD' to it.
When you’ve done that, the target will look as follows:

<Target Name="CustomPostDeployTarget" Condition="$(Environment)=='ACC' OR $(Environment)=='PROD'">
   <CallTarget Targets="DeployBizTalk360" />

That’s it! Now when you generate a MSI (Tools / Deployment Framework for BizTalk / Build Server Deploy MSI) and run it, it will only create that BizTalk360 Alert on your Acceptance and Production environment!

Actions on existing BizTalk360 Alerts

In case BT360Deploy tries to create a BizTalk360 Alert with a name for which an Alert is already created, the default behavior of BT360Deploy is that it overwrites the existing BizTalk360 Alert. You can change this behavior by providing the parameter –existing (or –e). This parameter accepts the following values:
update: Update the existing Alert instead of overwriting it
overwrite: Overwrite the existing Alert. This is the default behavior
donothing: Leave the existing Alert in its current state. No further action is taken

Executing BT360Deploy from the CustomPostDeploy target

The DeployBizTalk360 target mentioned in the previous paragraph contains the command to call BT360Deploy, so the syntax of BT360Deploy is hidden from the user. If you want have more control over that syntax, you can call the BT360Deploy directly from the CustomPostDeploy target.
By doing so, you can provide parameters to update an existing BizTalk360 Alert, instead of overwriting is, which is the default behavior of BT360Deploy. 

If you want to call BT360Deploy directly from the CustomPostDeploy target, that target will look like below

<Target Name="CustomPostDeployTarget" Condition="$(Environment)=='ACC' OR $(Environment)=='PROD'">       <Exec Command="&quot;$(DeploymentFrameworkDir)\DeployTools\BizTalk360\BT360Deploy.exe&quot; -a &quot;$(BizTalkAppName)&quot; -s &quot;$(SettingsFilePath)&quot;" ContinueOnError="false" />



Last edited Mar 19, 2016 at 9:10 PM by LexHegt, version 17