Microsoft Knowledge Base Email Alertz

(825123) - Explains how to use input methods and Get methods to create pages to help configure a BizTalk Server pipeline Application Integration Component (AIC).

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 825123 - Last Review: December 3, 2004 - Revision: 1.2

How to configure properties and settings that are used by pipeline Application Integration Components (AIC) in BizTalk Server 2000 and 2002

On This Page

INTRODUCTION

This article discusses how to configure various properties and settings that are used by pipeline Application Integration Components (AIC). You can configure the properties by creating configuration dialog boxes for pipeline AICs by using methods that are included in Microsoft BizTalk Server 2000 and Microsoft BizTalk Server 2002. To access these settings, click Advanced on the Channel Properties Advanced Configuration page in BizTalk Messaging Manager.

Configuration dialog box anatomy

Two Active Server Pages (ASP)

When you configure an AIC or one of the transports that are supplied with BizTalk Server, notice that the configuration is one page of input fields that is similar to a standard Windows form. However, behind the configuration dialog boxes are the following two ASP files:
  • A project_component.asp page
  • A project_component_post.asp page
These ASP pages supply the logic that is required for the configuration dialog box. These ASP pages are named after the AIC component that they configure. For example, a component with a program ID of Biztalk.AIC would have the following two configuration pages:
  • BizTalk_AIC.asp
  • BizTalk_AIC_post.asp
The project_component.asp page contains the statements that draw the user interface for the configuration panel. The project_component_post.asp page is called when the user submits the information. Therefore, the whole configuration dialog is a Web page with various inputs on it. These inputs must feed data back to the object for storage in a SQL Server database. The input methods that are described in this article help you store this data in a SQL Server database.

Configuration page details

Examine the configuration pages for the file transport in the following example. First, examine the BizTalk_SendLocalFile_1.asp file. From the naming convention, this must match up to a component with a program ID of "BizTalk.SendLocalFile.1".
<%@ LANGUAGE = VBScript %>
<%
'---------------------------------------------------------------------
'
'	BizTalk_SendLocalFile_1.asp
'
'	Microsoft BizTalk Server 2002
'	Copyright (C) Microsoft Corporation, 1998-2002.  All rights reserved.
'
'---------------------------------------------------------------------
%>

<!--#INCLUDE FILE="pe_edit_header.asp" -->

<%
	call DisplayReadonlyText("Filename")
	call InputTextAccel("Username", L_SendLocalFileUserName_Accelerator)
	call InputPasswordAccel("Password", L_SendLocalFilePassword_Accelerator)
%>
	
<TR>
    <TH VALIGN="TOP" ALIGN=LEFT></TH>
    <TD VALIGN="TOP">
		<TABLE>
			<% 
			call InputRadioAccel("CopyMode", 0, NULL, NULL, L_CopyMode0_Accelerator)
			call InputRadioAccel("CopyMode", 1, NULL, NULL, L_CopyMode1_Accelerator)
			call InputRadioAccel("CopyMode", 2, NULL, NULL, L_CopyMode2_Accelerator)
			%>
		</TABLE>
	</TD>
</TR>

<!--#INCLUDE FILE="pe_edit_footer.asp" -->
These ASP pages supply the logic that is required for the configuration dialog box. These ASP pages are named after the AIC component that they configure. For example, a component with a program ID of Biztalk.AIC would have the following two configuration pages:

Notice the calls to the following methods:
  • DisplayReadonlyText
  • InputTextAccel
  • InputPasswordAccel
These methods that are included in the Pe_edit_header.asp file generate input text boxes in the configuration dialog box.

The <TR> tag creates a table. Because the code starts with <TR>, it implies that the table is already opened. If you examine the code for the Pe_edit_header.asp file, notice that one of the last actions of the code is to create a table. This action makes sure that any configuration page that you create is already hosted in a table structure. The table structure contains calls to the InputRadioAccel method. These calls create input methods in the configuration dialog box. In this example, three option buttons are created.

The Pe_edit_footer.asp file contains code to close the table that was opened in the Pe_edit_header.asp file. The Pe_edit_footer.asp file creates another table to host the OK, Cancel, and Help buttons.

The BizTalk_SendLocalFile_1.asp file, together with the header, the footer, and the other Pe_*.asp files that are on the computer, generate the configuration dialog box, including input text fields.

The BizTalk_SendLocalFile_1.asp file generates the input text fields, but it does not handle the values that are submitted by the user. That process is performed by the BizTalk_SendLocalFile_1_post.asp file that is listed in the following example:
<%@ LANGUAGE = VBScript %>
<%
'---------------------------------------------------------------------
'
'	BizTalk_SendLocalFile_1_post.asp
'
'	Microsoft BizTalk Server 2002
'	Copyright (C) Microsoft Corporation, 1998-2002.  All rights reserved.
'
'---------------------------------------------------------------------
%>

<!--#INCLUDE FILE="pe_global_edit.asp" -->
<%

call GetInputText("Filename", 1, bufsize_medium)
call GetInputNumber("CopyMode", 0, 2)

call GetInputText("Username", 0, bufsize_medium)
call GetInputText("Password", 0, bufsize_medium)

%>
<!--#INCLUDE FILE="pe_post_footer.asp" -->
The code for generating a page and the logic to submit the data is contained in various Pe*.asp files. You only have to write code for two files that create the inputs and retrieve the values.

Use different input methods for a configuration page

Input methods

Many pre-built input methods are available in the Pe*.asp files that you can use for a configuration page. These input methods include the following:
  • InputTextArea(field)
  • InputTextAccel(field, accel)
  • InputText(field)
  • InputNumber(field)
  • InputNumberAccel(field, accel)
  • InputFloat(field)
  • InputFloatAccel(field, accel)
  • InputPassword(field)
  • InputPasswordAccel(field, accel)
  • DisplayReadonlyText(field)
  • InputSelection(field, arr, accel)
  • InputArray(field, arr)
  • InputArrayAccel(field, arr, accel)
  • InputSimpleList(field, list_name)
  • InputSimpleListAccel(field, list_name, accel)
  • InputOption(name, value)
  • InputRadio(name, value, custom_title, table_entry)
  • InputRadioAccel(name, value, custom_title, table_entry, accel)
  • InputCheckBox(name)
  • InputCheckBoxAccel(name, accel)

Parameters

The following table describes the parameters that are used in the input methods:
Collapse this tableExpand this table
ParameterDescription
fieldThe name of the dictionary item that this field should populate or should be populated from.
accelThe character to use for the accelerator for this field.
arrAn array of items.
list_nameThe name of a dictionary item that contains an array.
nameThe name of the dictionary item that this field should populate or should be populated from.
valueThe value for a multiple-selection option such as an option button or an item in a list. If the item is selected, the associated dictionary item is set to the value.
custom_titleThe string text to display next to an option button.
table_entryDescriptive text to display next to an option button.
Many of these methods accept only one parameter of field. This value is the name of a dictionary item that is used by this transport. For example, in the following code, any value that is entered will be stored in the "file_path" dictionary key for this AIC:
InputText("file_path")

Considerations with input methods

Some methods, such as the InputRadioAccel method, are a more complex. When you use one of these methods, note the following considerations:
  • The input method tries to build the HTML elements that are required to display the input text field. The method takes the field that you specify. Then, it tries to look up a label to display next to the input text box. The input method does this by trying to find a string that matches the field name and the AIC component name in the strings table that was created by the Global.asa file.

    For example, for the file transport and a field of FileName, the input method looks for a string in the table that is named "label_SendLocalFile_FileName". If it cannot find that string, the input method only looks for the field name. In this case, that field name is "label_FileName". If you examine the Global.asa file that is located in the Drive:\Program Files\Microsoft BizTalk Server\Messaging Manager folder, you will find an entry for "strings.label_FileName".

    This entry points to a static value that was created in the Strings.asp file in the same folder. In this instance, we have an entry of "Destination file name" before the input field. If there is no matching entry in the strings table, the input method displays the field name.
  • The input method performs the same actions for the "help field" as it does for the input text field. The "help field" is a string of additional information that appears under the field. The input method first looks for "help_SendLocalFile_FileName". If the input method cannot find "help_SendLocalFile_FileName", it tries to look for "help_FileName". If the input method cannot find "help_FileName" either, nothing appears.

    The input method also retrieves the current value of the dictionary item that is specified in the field value. Then, it populates the input dialog according to this data.

Use Get methods to retrieve data

Get methods

To retrieve the data that is submitted by the input methods, the following pre-built Get methods exist:
  • GetInputPassword(field, min, max)
  • GetInputText(field, min, max)
  • GetSelection(field, min, max)
  • GetInputNumber(field, min, max)
  • GetInputFloat(field, min, max)
  • GetCheckBox(field)

Parameters

The Get methods include the following parameters:
Collapse this tableExpand this table
ParameterDescription
fieldThe name of the dictionary item to be populated with this data.
minThe minimum length for strings. For numeric values, it is the smallest number that you can use.
maxThe maximum length for strings. For numeric values, it is the largest number that you can use.
The following constants for minimum and maximum values are predefined:
  • bufsize_small = 256
  • bufsize_medium = 1000
  • bufsize_large = 4000
  • max_int = 2000000000
When you submit the data in the form, the values that you submit are passed to the _post.asp page. The Get methods pull in the data. Then, they validate the data by using the minimum and maximum criteria. If the data is not valid, the Get methods display an error message. Then, the data is stored in the dictionary field for the AIC.

Examples

For many of these examples, examine the configuration pages that are included with BizTalk Server for the built-in transports.

The BizTalk_SendLocalFile_1*.asp files have examples of the following methods:
  • InputText
  • InputTextAccel
  • InputPasswordAccel
  • InputRadioAccel
The BizTalk_SendHTTPX_1*.asp files use the following methods, in addition to custom code to implement a certificate drop-down list:
  • DisplayReadonlyText
  • InputCheckBoxAccel
  • InputNumberAccel
Most of the input methods are covered in the ASP pages that are included with BizTalk Server. Only the input methods that use a list name or an array are missing. To use an array, you must pass an array of objects to the method call. For example, use the following syntax:
InputArray("testarray",array("item1","item2","item3"))

APPLIES TO
  • Microsoft BizTalk Server 2000 Standard Edition
  • Microsoft BizTalk Server 2002 Standard Edition
Keywords: 
kbhowtomaster KB825123
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate