Platform SDK: Exchange 2000 Server

Workflow Engine

[This is preliminary documentation and subject to change.]

Microsoft Exchange 2000 Server includes an in-process server (CDOWF.DLL) that implements the IProcessInstance Advance method, the workflow engine. The workflow engine controls the state changes to documents in your workflow folder. The workflow event sink (CDOWFEVT.DLL) calls the engine when an event fires in your workflow enabled folder.

You do not call the engine directly unless you are writing an event sink. Other applications may use the workflow engine by making direct calls to the IProcessInstance Advance method. The event sink passes the engine one of the event types used in your process design as well as useful context information. The engine maintains document integrity based on the parameters the event sink passes.

The engine checks your process design when it receives an event message. You define a workflow process and set it up to be executed based on Exchange Web Store events or system events. The process design encapsulates the logic for advancing the state of your workflow documents. It includes script or COM actions and conditions. The following is a conceptual diagram of an application folder with a default ProcessDefinition and several ProcessInstances.

The engine attempts to find a match between the message received and a rule in your process logic. When it finds a match it executes the prescribed action. The engine and the script host run in the workflow event sink process and have access to the ProcessInstance and the user context. The following conceptual diagram shows the Workflow event sink process hosting the script host and the workflow engine.

When the workflow engine finds a row match and executes the row's action script or COM object, it passes the host environment a WorkflowSession object with an ADODB Fields collection representing the ProcessInstance (row) undergoing transition. Only the workflow engine can change the status of a ProcessInstance directly. CDO Workflow uses the Web Store's support for per-property access control lists (ACL's) for this restriction.

The following sequence diagram presents the workflow operation concepts:

See Also

IProcessInstance.Advance