Activating workflows
Note: This topic has no later version.
The workflow extensions in EPiServer CMS are based on Windows Workflow Foundation 3.5. Workflows in EPiServer will change in coming versions of the platform due to the upgrade of WF by Microsoft (in .NET 4.5).
Introduction
As of release 7.14 of the EPiServer.CMS.Core package, workflows are no longer activated per default in the configuration when creating new sites from Visual Studio. This guide covers the steps necessary to activate workflows in configuration and user interface. Note that the workflow implementation in EPiServer CMS is set to change in upcoming versions.
Configuration changes
The following shows the additions that are needed to the configuration files.
If there is an existing disable attribute on the episerver/workflowSettings-element in your configuration file, make sure it is set to false or remove the attribute.
web.config
<configuration>
<configSections>
<section name="workflowRuntime" type="System.Workflow.Runtime.Configuration.WorkflowRuntimeSection, System.Workflow.Runtime, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</configSections>
<workflowRuntime EnablePerformanceCounters="false">
<Services>
<add type="System.Workflow.Runtime.Hosting.DefaultWorkflowSchedulerService, System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" maxSimultaneousWorkflows="5" />
<add type="System.Workflow.Runtime.Hosting.SharedConnectionWorkflowCommitWorkBatchService, System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add type="System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService, System.Workflow.Runtime, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" UnloadOnIdle="true" />
</Services>
</workflowRuntime>
</configuration>
episerver.config
<episerver xmlns="http://EPiServer.Configuration.EPiServerSection">
<workflowSettings>
<workflowHost type="EPiServer.WorkflowFoundation.AspNetWorkflowManager,EPiServer.WorkflowFoundation" />
<definitions>
<definition name="Sequential Approval" description="A sequential approval workflow for pages" type="EPiServer.WorkflowFoundation.Workflows.SequentialApproval,EPiServer.WorkflowFoundation" />
<definition name="Parallel Approval" description="A parallel approval workflow for pages" type="EPiServer.WorkflowFoundation.Workflows.ParallelApproval,EPiServer.WorkflowFoundation" />
<definition name="Request for feedback" description="Assigns request for feedback tasks to users/roles" type="EPiServer.WorkflowFoundation.Workflows.RequestForFeedback,EPiServer.WorkflowFoundation" />
<definition name="Ready for translation" description="Assigns translation tasks to users/roles" type="EPiServer.WorkflowFoundation.Workflows.ReadyForTranslation,EPiServer.WorkflowFoundation" />
</definitions>
<externalServices>
<externalService type="EPiServer.WorkflowFoundation.Workflows.ApprovalService,EPiServer.WorkflowFoundation" />
<externalService type="EPiServer.WorkflowFoundation.Workflows.ReadyForTranslationService,EPiServer.WorkflowFoundation" />
<externalService type="EPiServer.WorkflowFoundation.Workflows.RequestForFeedbackService,EPiServer.WorkflowFoundation" />
</externalServices>
</workflowSettings>
</episerver>
User interface
To enable the workflow user interface, log in to the EPiServer CMS Admin view. Go to Config and Tool Settings, and select Plug-in Manager.
Select EPiServer User Interface, go to the Overview tab, select the checkbox for Workflows and save.
Database schema
Installing the database schema for the SqlWorkflowPersistenceService provided by Microsoft:
- Connect to the database using SQL Server Management Studio.
- On the File menu, click Open, and then open the SQL script %WINDIR%\Microsoft.NET\Framework\v3.0\Windows Workflow Foundation\SQL\<language>\SqlPersistence_Schema.sql
- Run the query by clicking Execute to create the SQL Persistence Service tables.
- On the File menu, click Open, and then open the SQL script %WINDIR%\Microsoft.NET\Framework\v3.0\Windows Workflow Foundation\SQL\<language>\SqlPersistence_Logic.
- Run the query by clicking Execute to create the SQL Persistence Service stored procedures.
Last updated: Feb 23, 2015