SQL Server knowledge center

everything about SQL Server
See also: Other Geeks@INDC

Workflow Logging in WWF

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.

Share this post: | | | |

Comments

Perry said:

Interesting. On my development machine, workflowtrace.log gets written to the root of my .net solution folder, not to the workflow assembly folder. In production, it does not get created at all. Any ideas as to why this may be happening?

Thanks

# December 31, 2007 11:51 PM

Kasim.Wirama said:

I have tried, and the log file is created on Release/Debug folder, try to check project projects where you build your assembly.

I corrected my article that log file is created on workflow client's folder not in workflow assembly's folder, because usually I choose sequential workflow with console application, so it is not obvious where the log is created until I separate workflow into workflow library project and workflow console application project.

Thank you for your correction.

# January 2, 2008 5:18 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 
Are you human?:  


Enter the numbers above: