Mode Property
Mode Property
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
Sets the type of security checking performed by the workflow engine.
Applies To
Type Library
Microsoft CDO Workflow Objects for Microsoft Exchange
DLL Implemented In
CDOWF.DLL
Syntax
[Visual Basic]Property Mode As CdoWfMode
[C++]HRESULT get_Mode(CdoWfMode* pVal);
HRESULT put_Mode(CdoWfMode Val);
Parameters
- pVal
Returns the value of the Mode property as a reference to a CdoWfMode Enum.- Val
Sets the value of the Mode property to the value of the CdoWfMode Enum.
Remarks
This property corresponds directly to the property in the Exchange store https://schemas.microsoft.com/cdo/workflow/mode. Applications can also use Microsoft ActiveX Data Objects (ADO), OLE DB, or WebDAV to update this property directly.
The Microsoft Exchange Server 2003 workflow engine will run in one of two modes:
- Restricted
- Privileged
In restricted mode, all executable workflow code is limited to a small number of "safe" actions. The script engine is in a constrained process such that no other Component Object Model (COM) objects can be co-created. Code executes under a security context with little or no permission (anonymous).
In privileged mode, the script engine is able to co-create any registered COM objects. Creating COM objects lets you integrate with other systems such as Structured Query Language (SQL) databases and other business applications that provide COM components. You can also use LDAP and Microsoft Active Directory in privileged mode. COM objects may also be used, in place of script, for workflow actions. The code executes under the same Microsoft Windows 2000 security context as the workflow engine itselftypically the Workflow System Account defined by the server administrator.
Workflow Event Sink (CdoWfEvt) checks for which mode a workflow runs in at run-time. CdoWfEvt component has a COM+ Application Role PrivilegedWorkflowAuthors attached to it. Only workflows authored by (last saved by) members of this role are allowed to run in unlimited mode. Second, the workflow author must also explicitly request that the workflow execute in unlimited mode, by setting a flag (Mode) on the ProcessDefinition object.
Example
The following example defines variables for a ProcessDefinition object and a IDataSource interface; creates the objects in memory; opens the ProcDefURL object with read/write access; sets the Mode property to 'Privileged' mode; and saves the change back to the ProcDefURL row in the Exchange store.
[Visual Basic]
Dim iPd As CDOWF.ProcessDefinition Dim iDsrc As CDO.IDataSource
Set iPd = New CDOWF.ProcessDefinition Set iDsrc = iPd
'ProcDefURL must be a valid URL to a ProcessDefinition item iDsrc.Open ProcDefURL, _ Nothing, _ adModeReadWrite, _ adFailIfNotExists
With iPd .Mode = cdowfPrivilegedMode End With
iDsrc.Save
See Also
Send us your feedback about the Microsoft Exchange Server 2003 SDK.
Build: June 2007 (2007.618.1)
© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.