Protocols Element (ADF)

Contains elements that define one or more delivery protocols used by the notification class to deliver notifications.

Syntax

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

Element Characteristics

Characteristic Description

Data type and length

None.

Default value

None.

Occurrence

Optional once per NotificationClass element.

Updates

Can be added and deleted when updating the application.

Element Relationships

Relationship Elements

Parent element

NotificationClass Element (ADF)

Child elements

Protocol Element (ADF)

Remarks

The child elements of the Protocols element define one or more delivery protocols used by the notification class. Each notification class must have at least one delivery protocol used to deliver notifications.

If you add or delete a Protocols element, updating the application deletes and re-creates the notification class to which it corresponds. This includes dropping and re-creating the SQL Server tables used by this notification class. Any data existing in the original SQL Server tables is permanently deleted.

Example

The following example shows how to define two delivery protocols, one built-in SMTP and one custom HTTPLogger, for a notification class.

<Protocols>
    <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>
    <Protocol>
        <ProtocolName>HttpLogger</ProtocolName>
        <Fields>
            <Field>
                 <FieldName>escaping</FieldName>
                <SqlExpression>'yes'</SqlExpression>
            </Field>
            <Field>
                <FieldName>Subject</FieldName>
                <SqlExpression>
                'Stock notification: '
                    +CONVERT (NVARCHAR(30), GETDATE())
                </SqlExpression>
            </Field>
            <Field>
                <FieldName>SubscriberId</FieldName>
                <SqlExpression>DeviceAddress</SqlExpression>
            </Field>
        </Fields>
    </Protocol>
</Protocols>

See Also

Reference

Application Definition File Reference

Other Resources

Configuring Delivery Protocols
Updating Instances and Applications

Help and Information

Getting SQL Server 2005 Assistance