Share via


Debugging Script in the Workflow Designer for Exchange Server

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 Designer for Exchange Server relies on server-side script that cannot display user information. As a result, you cannot use typical debugging options, such as the MSGBOX function. There are, however, several different strategies for debugging server-side workflow scripts. The options available to you depend on your access to the server on which the scripts are running.

  • If you are an administrator with physical access to the server console   You can use the Microsoft Script Debugger on the server console. You can enable script debugging for your application folder within the Workflow Designer. On the Project Property Page, select the Script debugging enabled for this folder check box. For more information, search for "Microsoft Script Debugger" in the Exchange Server Programmer's Reference at http://msdn.microsoft.com/exchange/.

  • If you have access to the Microsoft® Windows NT® event logs on the server through the Event Viewer program   You can use the default Workflow AuditTrail Provider to log messages to the event log.

    The following line of script will write the string "Document check executed properly." to the AuditTrail Provider:

    WorkflowSession.AddAuditEntry "Document check executed properly."
    

    For more information, search for "AuditTrail" on the Microsoft® Developer Network (MSDN®) Library online at http://msdn.microsoft.com/en-us/library/default.aspx.

  • If you do not have access to either the server console or the server event logs   But, you are running in privileged mode, see Workflow Process Security Mode. One way of tracking the occurrence of state changes is to create a script in the Script Editor to write a message to a file. If you are running in restricted mode, you can track the state changes using a procedure that sends e-mail. In either case, you call the script in the event procedure of the event you are monitoring.

See Also

Scripting in the Workflow Designer for Exchange Server | Creating Script Procedures | Workflow Process Security Mode | Choosing Workflow Events | Script Examples for Exchange Server | Script Errors | Finding Errors Using the Event Viewer | Writing Messages to File | Creating and Sending an E-mail | Security Checklist