Workflow Logging in WWF
By : Kasim Wirama, MCDBA
Many aspects you need to consider when you will deploy your workflow. Faced by diverse possibility of user interaction in real world, you need to consider some aspects. They are workflow logging , workflow scheduling, how to save the last state before the workflow go idled because it is left by user for a long time, how to track steps in workflow. Let’s see each of them below.
Sometimes, some problem arise on your workflow in production environment, in this case you need to know what things cause the problem, so you turn on tracing facility on workflow configuration file with one of these value : All, Critical, Warning, Error, Off, for example :
<configuration>
<system.diagnostics>
<switches>
<add name=”System.Workflow.Runtime” value =”All” />
<add name=”System.Workflow.Activities” value =”Critical” />
<add name=”System.Workflow LogToFile” value = “1”/>
<switches>
</system.diagnostics>
</configuration>
From this sample application configuration above, it instructs workflow to log all activities resulted from workflow runtime object, and only records error raised from activities inside the workflow instance.
When you set value 1 to LogToFile, all logging activities will be written to file, named WorkflowTrace.log, this log will be in same folder with your workflow assembly.
Run your workflow, after you ends your workflow client, you will find new workflow trace on your workflow client assembly’s folder.