Поделиться через


Protocol Element (ADF)

Contains elements that define a delivery protocol used by the notification class to deliver notifications.

Синтаксис

<NotificationClasses>
    <NotificationClass>
        ...
        <Protocols>
            <Protocol>

Element Characteristics

Characteristic Description

Data type

None.

Default value

None.

Occurrence

Required once or more per Protocols element.

Updates

Can be added and deleted when updating the application.

Element Relationships

Relationship Elements

Parent element

Protocols Element (ADF)

Child elements

ProtocolName Element (ADF)

Fields Element for Protocol (ADF)

ProtocolExecutionSettings Element (ADF)

Замечания

The child elements of the Protocol element define a delivery protocol used by the notification class. Each notification class must define at least one delivery protocol to deliver notifications.

The delivery protocol must be associated with a delivery channel in the instance configuration file (ICF). For more information see Определение каналов доставки.

Пример

The following example shows how to define an SMTP delivery protocol, and provides values for the fields required to create an SMTP message. (Values surrounded by percent characters (%) are parameters defined either in the ParameterDefaults element or when creating the instance of Notification Services.)

If the initial delivery attempt is unsuccessful, notifications sent using this protocol attempt redelivery 15 minutes after the initial attempt, 30 minutes later, and then one hour later.

<Protocol>
    <ProtocolName>SMTP</ProtocolName>
    <Fields>
        <Field>
            <FieldName>Subject</FieldName>
            <SqlExpression>%SubjectLine%</SqlExpression>
        </Field>
        <Field>
            <FieldName>From</FieldName>
            <SqlExpression>%fromAddress%</SqlExpression>
        </Field>
        <Field>
            <FieldName>To</FieldName>
            <FieldReference>DeviceAddress</FieldReference>
        </Field>
        <Field>
            <FieldName>Priority</FieldName>
            <SqlExpression>%mailPriority%</SqlExpression>
        </Field>
        <Field>
            <FieldName>BodyFormat</FieldName>
            <SqlExpression>&quot;html&quot;</SqlExpression>
        </Field>
    </Fields>
    <ProtocolExecutionSettings>
        <RetrySchedule>
            <RetryDelay>P0DT00H15M00S</RetryDelay>
            <RetryDelay>P0DT00H30M00S</RetryDelay>
            <RetryDelay>P0DT01H00M00S</RetryDelay>
        </RetrySchedule>
    </ProtocolExecutionSettings>
</Protocol>

См. также

Справочник

Application Definition File Reference

Другие ресурсы

Задание имени и полей протокола доставки
Обновление экземпляров и приложений

Справка и поддержка

Получение помощи по SQL Server 2005