EnableDebug Method

EnableDebug 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.

Enables script Just-In-Time (JIT) debugging.

Applies To

IProcessInstance Interface

Type Library

Microsoft CDO Workflow Objects for Microsoft Exchange

DLL Implemented In

CDOWF.DLL

Syntax

[Visual Basic]Sub EnableDebug
(
    bDebug As Boolean
)

[C++]HRESULT EnableDebug (     VARIANT_BOOL bDebug );

Parameters

  • bDebug

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

If you are using the Workflow Designer for Exchange 2000 Server, you do not need to use this method. The built-in workflow components call this method based on your selections.

This property corresponds directly to the Exchange store property https://schemas.microsoft.com/cdo/workflow/enabledebug. Applications can also use Microsoft ActiveX Data Objects (ADO), OLE DB, or WebDAV to update this property directly.

If you are an advanced developer, writing your own event sink, you can call this method to enable the JIT script debugging capability. Configure this capability by setting the "https://schemas.microsoft.com/cdo/workflow/enabledebug" property of the OnSyncSave;OnSyncDelete event registration item for your workflow folder. If you don't set this property explicitly, the event sink sets it to FALSE.

Note  To work correctly, JIT script debugging requires certain server environment settings. For more information, see Using the Microsoft Script Debugger.

You use JIT debugging for run-time errors. However, JIT debugging does not catch syntax errors. The workflow engine logs syntax errors in the AuditTrail.

Example

This example shows the event registration for "OnSyncSave;OnSyncDelete". You set the "https://schemas.microsoft.com/cdo/workflow/enabledebug" Exchange store property in this registration event record.

EventRuleItem = "OnSyncSave_OnSyncDelete_Rule"

'assumes sFolderURL is a string representing 'your application folder where you want to 'register the events sEvtRegURL = sFolderURL & EventRuleItem

'assumes sProcDefURL is a string representing 'the process definition item for this folder ProcessDefinitionURL = sProcDefURL

Rec.Open sEvtRegURL, , adModeReadWrite, _ adCreateNonCollection Or adCreateOverwrite, _ adDelayFetchFields If Err.Number <> 0 Then Debug.Print "Failed to open event registration record." & Err.Description End If

With Rec Set Flds = .fields Flds("DAV:contentclass") = "urn:content-class:storeeventreg" Flds("https://schemas.microsoft.com/exchange/events/EventMethod") = "OnSyncSave;OnSyncDelete" Flds("https://schemas.microsoft.com/exchange/events/SinkClass") = "CdoWfEvt.EventSink.1" Flds("https://schemas.microsoft.com/exchange/events/Criteria") = "WHERE $DAV:ishidden$ = FALSE" Flds("https://schemas.microsoft.com/cdo/workflow/defaultprocdefinition") = ProcessDefinitionURL Flds("https://schemas.microsoft.com/cdo/workflow/adhocflows") = 0 Flds("https://schemas.microsoft.com/cdo/workflow/enabledebug") = True Flds("https://schemas.microsoft.com/cdo/workflow/disablesuccessentries") = False Flds.Update .Close End With

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.