Tips and trix how to troubleshoot EPiServer workflows (based on Microsoft Workflow Foundation)
Logging for windows workflow foundation
Extra logging for Windows Workflow Foundation
<system.diagnostics>
<switches>
<add name="System.Workflow.Runtime" value="All" />
<add name="System.Workflow.Runtime.Hosting" value="All" />
<add name="System.Workflow.Runtime.Tracking" value="All" />
<add name="System.Workflow.Activities" value="All" />
<add name="System.Workflow.Activities.Rules" value="All" />
<add name="System.Workflow LogToTraceListeners" value="0" />
<add name="System.Workflow LogToFile" value="1" />
</switches>
<trace autoflush="true" indentsize="4">
<listeners>
<add name="customListener"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="WFTrace.log" />
</listeners>
</trace>
</system.diagnostics>
Remove running instances of workflows
Download
WindmillExplorerStart WindmillExplorer and connect to the current CMS database
Remove all entries below [Relations]/Workflow/Instances
Automatic start won’t work for Sequential Approval workflow
When looking closer at the log file with level set to debug, it is easy to see that the workflow will not start because non of the reviewer has access rights to publish.
C:\EPiServer\Sites\CMS6R2>tail -f EPiServerErrorLog.txt| grep EPiServer.WorkflowFoundation
2012-02-01 16:43:37,952 DEBUG [9] EPiServer.WorkflowFoundation.Services.CommunicationService.StartInstancesFromEvent - 21.5.7 Instance of definition Sequential Approval started from event PageCheckedIn
2012-02-01 16:43:37,977 INFO [9] EPiServer.WorkflowFoundation.InstanceHandler.StartInstance - 21.4.10 Start of an instance of Sequential Approval cancelled, reason: User Publisher, Reviewer, has not read or publish access for 188_190
Solution
Add publish rights to the groups that should publish the page
NotifyByEmail doesn’t work for the CreateTask activity
The sender of the mail is hardcoded to the user "WorkflowInstance" and has to exist as a user with an Email address. The receiver of the tyask needs also to have a Email address specified (not by default when using windows authentication).
Solution:
1) Create a user named “WorkflowInstance” and assign a email address for him.
2) Verify that the user has an email address to send to.