NotificationClass Element (ADF)

Provides a location for defining one notification class.

Syntax

<NotificationClasses>
    <NotificationClass>

Element Characteristics

Characteristic Description

Data type

None.

Default value

None.

Occurrence

Optional once or more per NotificationClasses element.

Updates

Can be added and deleted when updating the application.

Element Relationships

Relationship Elements

Parent element

NotificationClasses Element (ADF)

Child elements

NotificationClassName Element (ADF)

Schema Element for NotificationClass (ADF)

FileGroup Element for NotificationClass (ADF)

ContentFormatter Element (ADF)

DigestDelivery Element (ADF)

MulticastDelivery Element (ADF)

NotificationBatchSize Element (ADF)

Protocols Element (ADF)

ExpirationAge Element (ADF)

Remarks

If you delete a notification class, Microsoft SQL Server 2005 Notification Services drops the table for the notification class when you update the application. This deletes any data the table might contain.

If you rename a notification class, Notification Services creates a new notification class and deletes the old notification class.

Example

The following example shows a complete definition for a notification class. The notification class provides stock information to subscribers via email over the SMTP protocol.

<NotificationClass>
    <NotificationClassName>StockNotifications</NotificationClassName>
    <Schema>
        <Fields>
            <Field>
                <FieldName>StockSymbol</FieldName>
                <FieldType>char(10)</FieldType>
            </Field>
            <Field>
                <FieldName>StockPrice</FieldName>
                <FieldType>money</FieldType>
            </Field>
        </Fields>
    </Schema>
    <FileGroup>Secondary</FileGroup>
    <ContentFormatter>
        <ClassName>Stock.StockFormatter</ClassName>
        <AssemblyName>C:\CustomCFs\StockFormatter.dll</AssemblyName>
        <Arguments>
            <Argument>
                <Name>OutputHTML</Name>
                <Value>true</Value>
            </Argument>
        </Arguments>
    </ContentFormatter>
    <DigestDelivery>true</DigestDelivery>
    <NotificationBatchSize>100</NotificationBatchSize>
    <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>
                <FailuresBeforeAbort>20</FailuresBeforeAbort>
                <MulticastRecipientLimit>10</MulticastRecipientLimit>
                <WorkItemTimeout>P0DT00H30M00S</WorkItemTimeout>
            </ProtocolExecutionSettings>
        </Protocol>
    </Protocols>
    <ExpirationAge>P0DT02H30M00S</ExpirationAge>
</NotificationClass>

See Also

Reference

Application Definition File Reference

Other Resources

Defining Notification Classes
Updating Instances and Applications

Help and Information

Getting SQL Server 2005 Assistance