Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 58 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
58
Dung lượng
0,91 MB
Nội dung
Contents
Overview 1
Introduction to theExchangeServer
Event Service 2
Introduction to Event Scripts 7
Writing an Event Script 14
Debugging Event Scripts 24
Using Event Scripts in Solutions 30
Exchange Server Routing 38
Lab A: Creating the Escalation Event
Script 43
Review 53
Module 13:Usingthe
Microsoft Exchange
Server EventService
Information in this document is subject to change without notice. The names of companies,
products, people, characters, and/or data mentioned herein are fictitious and are in no way intended
to represent any real individual, company, product, or event, unless otherwise noted. Complying
with all applicable copyright laws is the responsibility of the user. No part of this document may
be reproduced or transmitted in any form or by any means, electronic or mechanical, for any
purpose, without the express written permission of Microsoft Corporation. If, however, your only
means of access is electronic, permission to print one copy is hereby granted.
Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual
property rights covering subject matter in this document. Except as expressly provided in any
written license agreement from Microsoft, the furnishing of this document does not give you any
license to these patents, trademarks, copyrights, or other intellectual property.
1999 Microsoft Corporation. All rights reserved.
Microsoft, Active Desktop, Active Directory, ActiveX, BackOffice, Developer Studio, FrontPage,
JScript, MSDN, MSN, NetMeeting, Outlook, PivotChart, PivotTable, PowerPoint, Visual Basic,
Visual C++, Visual FoxPro, Visual InterDev, Visual J++, Visual SourceSafe, Visual Studio,
Windows, Windows Media, and Windows NT are either registered trademarks or trademarks of
Microsoft Corporation in the U.S.A. and/or other countries.
The names of companies, products, people, characters, and/or data mentioned herein are fictitious
and are in no way intended to represent any real individual, company, product, or event, unless
otherwise noted.
Other product and company names mentioned herein may be the trademarks of their respective
owners.
Project Advisor: Janet Wilson
Project Lead and Instructional Designer: Anne Bockman (Excell Data Corporation)
Instructional Designers: Josh Barnhill (Volt Technical) and Jo Berry (Exchange)
Lead Program Manager: Greg Bott
Program Managers: Colleena Carr and Chris Boar (Intl Vendor)
Graphic Artist: Andrea Heuston (Artitudes Layout and Design)
Editing Manager: Lynette Skinner
Editor: Jennifer Kerns (S&T Onsite)
Copy Editor: Shari G. Smith (R & S Consulting)
Online Program Manager: Arlo Emerson (Aditi)
Production Support: Irene Barnett (Barnett Communications)
Manufacturing Manager: Bo Galford
Manufacturing Support: Mimi Dukes (S&T Onsite)
Development Services: Kimber Dodge
Lead Product Manager: Mary Larson
Group Product Manager: Robert Stewart
Module13:UsingtheMicrosoftExchangeServerEventService iii
Instructor Notes Module13:UsingtheMicrosoft
Exchange ServerEventService
This module provides students with the ability to use the Microsoft® Exchange
Server EventService within collaborative applications. Themodule also
provides an introduction to ExchangeServer Routing. At the end of this
module, you will be able to create, edit, and debug an event script on an
Exchange Server public folder. You will also be able to encapsulate event-script
functionality within Component Object Model (COM) add-ins. In addition, you
will be able to describe how to use the tools of ExchangeServer Routing to
create workflow and process-design applications.
Materials and Preparation
This section provides you with the materials and preparation needed to teach
this module.
Materials
To teach this module, you need the following materials:
Microsoft PowerPoint® file 1593a_13.ppt
Module 13, “Using theMicrosoftExchangeServerEvent Service”
Preparation
To prepare for this module, you should:
Read all the materials for this module.
Read the instructor notes and margin notes for the module.
Complete the lab.
Presentation:
60 Minutes
Lab:
45 Minutes
iv Module13:UsingtheMicrosoftExchangeServerEventService
Module Strategy
Use the following strategy to present this module:
Introduction to theExchangeServerEventService
Describe the architecture and set-up process of theMicrosoftExchange
Server Event Service.
Introduction to Event Scripts
Explain the benefit, limitations, important registry settings, and common
uses of event scripts.
Writing an Event Script
Explain how to bind an agent to a server and select the folder event that you
want to be monitored. Explain how to create and edit a script. Describe how
to use the intrinsic objects that are passed when a script runs. Describe the
security considerations for event scripts.
Debugging Event Scripts
Explain how to use theMicrosoft Script Debugger for error trapping.
Describe how to use theMicrosoft Windows NT Event Log for error
logging.
UsingEvent Scripts in Solutions
Explain how to simplify debugging by encapsulating the functionality of an
event script within a COM add-in. Explain how the MoveApp escalates
messages by using an event script.
ExchangeServer Routing
Describe server-side routing architecture. Explain that ExchangeServer
Routing Objects can be used to build workflow and process-design
applications. Explain that theExchangeServer Routing Wizard is a sample
application that demonstrates the use of ExchangeServer Routing
components.
Module13:UsingtheMicrosoftExchangeServerEventService 1
Overview
Introduction to theExchangeServerEvent Service
Introduction to Event Scripts
Writing an Event Script
Debugging Event Scripts
UsingEvent Scripts in Solutions
ExchangeServer Routing
At the end of this module, you will be able to:
Explain the purpose of the Microsoft® ExchangeServerEvent Service, a
feature of MicrosoftExchange Server.
Describe the benefits, limitations, security considerations, registry settings,
and common uses of event scripts.
Create and edit an event script on an ExchangeServer public folder.
Resolve programming errors in event scripts by usingthe Script Debugger.
Explain how to encapsulate event-script functionality within Component
Object Model (COM) add-ins and describe how the MoveApp escalates
messages by using an event script.
Describe the architecture of ExchangeServer Routing and describe how to
use its tools to design workflow and process-design applications.
Slide Objective
To provide an overview of
the module topics and
objectives.
Lead-in
In this module, you will learn
how to incorporate the
Exchange ServerEvent
Service and theEvent
Scripting Agent in a
collaborative solution.
2 Module13:UsingtheMicrosoftExchangeServerEventService
Introduction to theExchangeServerEventService
Architecture of theExchangeServerEvent Service
Setting Up theExchangeServerEvent Service
The MicrosoftExchangeServerEventService (Events.exe) is a Microsoft
Windows NT
® service that runs on a MicrosoftExchangeServer computer.
This service is installed as part of theExchangeServer version 5.5 setup. By
using Microsoft Outlook
® 2000, you can configure this service to monitor
events that occur in folders you specify. TheExchangeServerEventService
extends the possibilities of what you can develop on theExchangeServer
platform—from automated administrative tasks to workflow applications.
Slide Objective
To outline this topic.
Lead-in
The ExchangeEventServer
Service enables you to
develop a range of
collaborative applications,
from automated
administration to workflow.
Module13:UsingtheMicrosoftExchangeServerEventService 3
Architecture of theExchangeServerEventService
Exchange Server
Information Store
Exchange Server
Information Store
Application Folder
Docs
Exchange Server
Event Service
Exchange Server
Event Service
Change List
Event Handler
(agent)
Notify
ICS
The ExchangeServerEventService receives notifications from Exchange
Server folders about the state of folder items. TheExchangeServerEvent
Service passes events, such as the creation of a new message in a folder, to the
correct event handler—an agent—with some information about the source of
the event, the message, and the folder that caused the event.
Detecting Changes to Monitored Folders
The ExchangeServerEventService uses Incremental Change Synchronization
(ICS) technology to determine when an item is added, changed, or deleted in a
particular folder. ICS allows the client—in this case, theExchangeServerEvent
Service—to query the information store on theserver and request information
about all changes that have occurred in a particular folder since the last
synchronization. By using ICS, theExchangeServerEventService never
misses an event, even if ExchangeServerEventService is taken offline. When
the ExchangeServerEventService goes back online, it queries for any changes
to the folders it is monitoring and fires the correct events to the corresponding
event handlers for that folder.
Firing Events Asynchronously When Changes Are
Detected
The ExchangeServerEventService fires events asynchronously when an item
is added, changed, or deleted in a folder, or according to time intervals. The
events for adding, changing, and deleting items are self-explanatory. The fourth
event—the timed event—requires more explanation. You specify intervals to
indicate when to fire the timer event. These intervals can be hourly, daily, or
weekly, depending on the needs of your application—for example, every 15
minutes, every three hours, or every week on Monday at 3:00 P.M.
Slide Objective
To show the architecture of
the ExchangeServerEvent
Service.
Lead-in
The ExchangeServerEvent
Service receives
notifications of events from
Exchange Server folders
and passes events to the
correct agent.
4 Module13:UsingtheMicrosoftExchangeServerEventService
Setting Up theExchangeServerEventService
1 Change the Account Under Which theExchange Server
Event Service Runs
2 Give Users Permission to Create Agents
3 Install theServer Scripting Add-in
4 Configure the Monitored Folder
Before you can start to work with theExchangeServerEventService and write
agents, you must install theservice and get it running correctly in your
environment. By default, theExchangeServerEventService is installed when
you install ExchangeServer 5.5.
If you are upgrading from a previous version of Exchange Server, you
must add theExchangeEventServerService during installation.
Configuring theExchangeServerEventService is a four-step process.
Step 1: Change the Account Under Which theExchange
Server EventService Runs
By default, theExchangeServerEventService logs on by usingthe credentials
of theExchangeServerService Account. Although this account has permission
to access many of the items stored in Exchange Server, it has very limited
Windows NT permissions. If you want to change the level of access this
account has, or audit the account, you can change theMicrosoft Windows NT
Server account under which theExchangeServerEventService runs.
Use the Services program in Control Panel to change the Services account. To
do this, in Control Panel for theExchangeServerEvent Service, click the
Services icon, and then change the Log On As settings.
Slide Objective
To list the steps involved in
setting up theExchange
Server Event Service.
Lead-in
You set up theExchange
Server EventService by
changing the account under
which theExchangeServer
Event Service runs, giving
users permission to create
agents, installing theServer
Scripting add-in, and
configuring the monitored
folder.
Note
Module13:UsingtheMicrosoftExchangeServerEventService 5
Ensuring the Specified Account Has Correct Permissions
If you do change the Windows NT Server account for theExchangeServer
Event Service, follow these guidelines.
Ensure that the account you specify for theEventService has the Log On
As A Service permission set in the User Manager for Domains.
Ensure that the account has the proper ExchangeServer permissions to
access any of the mailboxes or public folders where scripts will be installed.
Otherwise, your scripting agent will not function correctly. You set
permissions (such as Mailbox Owner and Send As permissions) for all
necessary resources in theMicrosoftExchangeServer Administrator
Program.
Step 2: Give Users Permission to Create Agents
If you want users to write agents, you must first give them permission to do so.
You give users permission to create and bind agents by setting their permissions
for a system folder named EventConfig_servername, where servername is the
name of your server. You must have at least Author permissions for the
EventConfig_servername folder to grant additional permissions to users.
Giving Users Permissions to Create and Bind Agents
To give users permissions to create and bind agents:
1. Start theExchangeServer Administrator program.
2. Locate and select the EventConfig_servername folder, where servername is
the server on which theExchangeServerEventService is running.
3. On the File menu, click Properties.
The Properties dialog box appears with the General tab active.
4. Click Client Permissions.
The Client Permissions dialog box appears.
5. Click Add, and then select the user (or account name) who will have
permission to run agents on this server.
6. In the Roles dialog box, click Author or another role with greater
permissions (for example, Owner).
6 Module13:UsingtheMicrosoftExchangeServerEventService
Step 3: Install theServer Scripting Add-in
The Server Scripting add-in is not installed in Outlook 2000 by default. You
must install this add-in for event scripts to run properly.
Installing theServer Scripting Add-in
To install theServer Scripting add-in:
1. In Outlook 2000, on the Tools menu, click Options.
The Options dialog box appears.
2. Click the Other tab and then click Advanced Options.
The Advanced Options dialog box appears.
3. Click Add-In Manager.
The Add-In Manager dialog box appears.
4. Select theServer Scripting check box.
5. Click OK on each of the three open dialog boxes.
Step 4: Configure the Monitored Folder
Configuring the monitored folder is the final step in the process of configuring
the ExchangeServerEvent Service.
You must have Owner permission for the folder you intend to monitor.
Configuring the Monitored Folder
To configure the monitored folder:
1. In Outlook 2000, right-click theExchangeServer folder that you want to
monitor, and then click Properties on the shortcut menu.
The Properties dialog box for that folder appears.
2. Click the Agents tab.
3. Create, change, disable, or delete agents in your folder, and then click OK.
Note
[...]... added to the description field in theEvent Detail dialog box for an ExchangeServerEventService entry in the Application Event Log 30 Module13:UsingtheMicrosoftExchangeServerEventServiceUsingEvent Scripts in Solutions Slide Objective To outline this topic Lead-in Because debugging on theserver is difficult, you should consider using COM objects to encapsulate the functionality of an event. .. script will use the name of the pre-logged-on CDO session because theExchangeServerEventService is logging on as this user The sent messages will also be saved in the Sent Items folder of that user For these reasons, consider creating unique identities for your agents, and log on as these users to save your scripts Module 13:UsingtheMicrosoftExchangeServerEventService 21 Usingthe EventDetails.FolderID... 20 Module13:UsingtheMicrosoftExchangeServerEventServiceUsing Intrinsic Objects Passed When a Script Runs Slide Objective To list the objects and variables passed when an event script runs Lead-in You can use objects and variables passed by theExchangeServerEventService to determine which item triggered an event and in which folder an event occurred Usingthe EventDetails.Session Object Using. .. because theExchangeServerEventService does not provide this capability Module 13:UsingtheMicrosoftExchangeServerEventService 11 Single-Threaded Architecture Limits Processing TheExchangeServerEventService is single threaded; that is, scripts registered on theserver process one at a time Because only one script can execute at a time, all of the other scripts must wait for the first script... notification to theEventServiceThe default value is 60 seconds However, for testing and production servers, you might want to lower this value to shorten the length of time between a change in the store and theEventService being notified 14 Module13: Using theMicrosoft Exchange ServerEventService Writing an Event Script Slide Objective To outline this topic Lead-in To write an event script,... (specifically theMicrosoft Developer Studio Integrated Development Environment) as your script editor You can debug these scripts by using theMicrosoft Script Debugger program that is included with Microsoft Internet Information Server 7 8 Module13: Using theMicrosoft Exchange ServerEventService Benefits of Event Scripts Slide Objective To list the benefits to developers of usingevent scripts... to the user in the form of a failure message 10 Module13: Using theMicrosoft Exchange ServerEventService Limitations of Event Scripts Slide Objective To list the limitations of usingevent scripts Lead-in You should understand the limitations of event scripting before you develop an event script Asynchronous Event Firing Limits Item Volume Including Business Logic on Folders Slows Exchange Server. .. folders monitored by theExchangeServerEventService You can programmatically respond to folder events by: Writing your own agent Using theMicrosoft Exchange Server Routing Engine, which is a custom agent that runs under the control of theExchangeServerEventService You can write custom agents by usingMicrosoft Visual Basic®, Scripting Edition (VBScript), Microsoft JScript®, or Microsoft Visual... ProcessObj.Process(EventDetails.Session, _ EventDetails.MessageID, EventDetails.FolderID) End Sub Requirements for Using Custom COM Components There are two primary requirements for using custom COM components with theExchangeServerEvent Service: The components must not have any user interface (UI) elements Because theExchangeServerEventService is running on theExchangeServer computer without a user at the. .. has ExchangeServer permissions equal to those of the script author when accessing objects within the CDO session ExchangeServer Scripting Agent Permissions Match ExchangeServer Permissions Typically, theExchangeServer Scripting Agent runs on theExchangeServer site service account, whose Windows NT permissions match those of basic ExchangeServer components, such as the directory service and the .
2 Module 13: Using the Microsoft Exchange Server Event Service
Introduction to the Exchange Server Event Service
Architecture of the Exchange. Exchange Server Event Service
Setting Up the Exchange Server Event Service
The Microsoft Exchange Server Event Service (Events.exe) is a Microsoft