Platform SDK: Exchange 2000 Server |
You encapsulate business logic in the ActionTable property of the ProcessDefinition object. The ActionTable is a set of rules that comprise the state-transitions for a particular workflow process. There are three ways of using the Action Table:
1) default workflow process
2) client-specified workflow process (eg, client picks from one of many processes installed in the folder)
3a) client picks a procdef from another folder
3b) client submits item with embedded procdef
Both 3a and 3b require Adhoc flag
Note the procdefs have to be Hidden to be considered "safe" for 2, 3a
Normally, all of the documents in a workflow folder follow the same business logic. In this case, the ActionTable is stored at the folder level. Every new document created in that folder will inherit a copy of the default Action Table, which it will use to track its State. You implement this type of ActionTable by setting the "http://schemas.microsoft.com/cdo/workflow/defaultprocdefinition" on the OnSyncSave registration item in the workflow folder.
Sometimes you may want to allow each document in a folder to have its own process definition. For example, you may have different classes of documents that have different approval behavior. A client may specify one of many processes installed in a folder depending on the class of document, or the client may specify a process from another folder. To specify a process from another folder the cdoWfAllowAdhoc flag must be set using the raw schema property with ADO.
Alternatively, your workflow may be truly ad hoc, where the end-user decides how a document should be routed for review while they are saving the document. You implement this type of ActionTable by setting the "http://schemas.microsoft.com/cdo/workflow/adhocflows" property on the OnSyncSave registration item in the workflow folder.
IProcessInstance.ProcessDefinition
IProcessInstance.ProcessDefinitionURL
[This is preliminary documentation and subject to change.]
For advanced developers the ProcessDefinition is the key element in your workflow design. This encapsulates the business logic in its ActionTable property and specifies what script file to use for conditions and actions to be executed at run-time. In addition, you specify in what security mode your workflow will run, and how you wish to audit workflow processes. This section includes the following topics.