Windows Workflow Foundation (WF)

 

WF Runtime Image

 

Persistence Service

// Persitence parameter values
bool unloadOnIdle = true;
TimeSpan reloadIntevral = new TimeSpan(0, 0, 0, 20, 0);
TimeSpan ownershipDuration = TimeSpan.MaxValue;
SqlWorkflowPersistenceService sqlPersistenceService =
             new SqlWorkflowPersistenceService(connectionString,
             unloadOnIdle, ownershipDuration, reloadIntevral);

Setting up of the database for the persistence and tracking services

Persistence DB

image

Tracking DB

image

 
Configuration of workflow in App.Config
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="WFR"
             type="System.Workflow.Runtime.Configuration.WorkflowRuntimeSection,
             System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral,
             PublicKeyToken=31bf3856ad364e35"  />
  </configSections>
  <WFR Name="BasicHostingExample">
    <CommonParameters>
     <add name="ConnectionString"
                  value="Initial Catalog= WFTrackingAndPersistence;
                    Data Source=localhost;
                    Integrated Security=SSPI;"  />
    </CommonParameters>
    <Services>
      <add type="System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService,
                    System.Workflow.Runtime, Version=3.0.00000.0,
                    Culture=neutral, PublicKeyToken=31bf3856ad364e35"
                    UnloadOnIdle="true"
                    LoadIntervalSeconds="10"/>
    </Services>
  </WFR>
</configuration>

One Response to “Windows Workflow Foundation (WF)”

  1. Junyang says:

    Wah… so chim…

Leave a Reply

You must be logged in to post a comment.