EvaluateCondition Method
EvaluateCondition Method
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.
The workflow engine calls this method when the action table specifies a custom Component Object Model (COM) object as the condition on the matching row. The custom COM object must implement this method.
Applies To
Type Library
Microsoft CDO Workflow Objects for Microsoft Exchange
DLL Implemented In
CDOWF.DLL
Syntax
[Visual Basic]Function EvaluateCondition
(
pSession As WorkflowSession,
pResult As Boolean
)
[C++]HRESULT EvaluateCondition ( IWorkflowSession* pSession, VARIANT_BOOL* pResult );
Parameters
pSession
pResult
Returns the condition as a reference to a VARIANT_BOOL.
Return Value
Returns S_OK if successful, or an error value otherwise.
Remarks
When your action table includes the programmatic identifier (PROGID) of a custom COM object as a condition, the workflow engine creates an instance of your COM object and calls the EvaluateCondition method that your COM object has implemented. COM objects can only be created in privileged-mode workflows, so the engine checks to see if this ProcessInstance belongs to a privileged-mode workflow. For more information, see the Mode Property.
Examples
To use this interface, you need to create your own COM object. If you implemented the following code in a dynamic-link library (DLL) and used the PROGID of your DLL in the Condition field of a row in your workflow action table, when the workflow engine used that row the following Condition would execute:
- Return TRUE.
[Visual Basic]
Implements CDOWF.ICustomActivity
Sub ICustomActivity_CompensatingAction(ByVal pSession As CDOWF.IWorkflowSession)
End Sub
Function ICustomActivity_EvaluateCondition(ByVal pSession As CDOWF.IWorkflowSession) As Boolean
ICustomActivity_EvaluateCondition = True
End Function
Sub ICustomActivity_ExecuteAction(ByVal pSession As CDOWF.IWorkflowSession)
End Sub
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.