Platform SDK: Exchange 2000 Server

EvaluateCondition Method

[This is preliminary documentation and subject to change.]

The workflow engine calls this method when the action table specifies a custom COM object as the condition on the matching row. The custom COM object must implement this method.

[Visual Basic,VBScript]
Function EvaluateCondition(pSession as WorkflowSession)As Boolean
[C++]
HRESULT _stdcall EvaluateCondition(IWorkflowSession* pSession, VARIANT_BOOL* pResult);
[IDL]
HRESULT _stdcall EvaluateCondition([in] IWorkflowSession* pSession, [out] VARIANT_BOOL* pResult);

Remarks

When your action table includes the ProgID of a custom COM object as a condition, the workflow engine will create an instance of your COM object and call the EvaluateCondition method that your COM object has implemented. COM objects can only be created in privileged-mode workflows, so the engine first checks to see if this ProcessInstance belongs to a privileged-mode workflow.

Example

In order to use this interface, you need to create your own COM object. If you implemented the following code in a dynamic link library 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:

[Visual Basic]
Implements CDOWF.ICustomActivity


Sub CompensatingAction(ByVal pSession As CDOWF.IWorkflowSession)

End Sub


Function EvaluateCondition(ByVal pSession As CDOWF.IWorkflowSession) As Boolean

    ICustomActivity_EvaluateCondition = True

End Function


Sub ExecuteAction(ByVal pSession As CDOWF.IWorkflowSession)

End Sub

See Also

IProcessDefinition_Mode

ICustomActivity