Partager via


Protocols Element (ADF)

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

Syntaxe

<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)

Notes

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.

Exemple

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>

Voir aussi

Référence

Application Definition File Reference

Autres ressources

Configuration des protocoles de remise
Mise à jour des instances et des applications

Aide et Informations

Assistance sur SQL Server 2005