Welcome to MSDN Blogs Sign in | Join | Help

MADHU@MICROSOFT BLOG

All About Distributed apps

Syndication

News

Madhu Ponduru works at Microsoft. Everything here, though, is his personal opinion and is not read or approved by Microsoft before it is posted. No warranties or other guarantees will be offered as to the quality of the opinions or anything else offered here.
SAMPLE WF CONFIG FOR NLB SCENARIO

If you are deploying your workflow application to multiple machines(NLB scenario) and all these machines are using same database for persistence , you need to use following  config

(1)OwnershipTimeoutSeconds should be very high value ,so other hosts can't  load these workflows

(2)Disable auto unload

SAMPLE WORKFLOW CONFIG: 

<WorkflowRuntime Name="WorkflowServiceContainer">

<CommonParameters>

<add name="ConnectionString" value="Initial Catalog=SHARED;Data Source=localhost;Integrated Security=SSPI;"/>

</CommonParameters>

<Services>

<add type="System.Workflow.Runtime.Hosting.ManualWorkflowSchedulerService, System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

<add type="System.Workflow.Activities.ExternalDataExchangeService, System.Workflow.Activities, Version=3.0.00000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" ConfigurationSection="ExternalDataExchange"/>

<add type="System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService, System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" UnloadOnIdle="false" OwnershipTimeoutSeconds="5000" LoadIntervalSeconds="0" />

<add type="System.Workflow.Runtime.Hosting.DefaultWorkflowCommitWorkBatchService, System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<add type="System.Workflow.Runtime.Tracking.SqlTrackingService, System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" IsTransactional="false"/>

</Services>

</WorkflowRuntime>

 

AFTER WE ARE DONE WITH WORKFLOW, WE CAN CALL THIS METHOD TO UNLOAD WORKFLOW MANUALLY:

 

StateMachineWorkflowInstance stateInstance = new StateMachineWorkflowInstance(Application["WorkflowRuntime"] as WorkflowRuntime, instanceId);

stateInstance.WorkflowInstance.Unload();

 

 

Published Wednesday, October 08, 2008 1:36 PM by madhu_ponduru@hotmail.com

Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# SAMPLE WF CONFIG FOR NLB SCENARIO : EasyCoded @ Wednesday, October 08, 2008 5:17 PM

PingBack from http://www.easycoded.com/sample-wf-config-for-nlb-scenario/

SAMPLE WF CONFIG FOR NLB SCENARIO : EasyCoded

# re: SAMPLE WF CONFIG FOR NLB SCENARIO @ Thursday, October 09, 2008 4:22 AM

How can this be achieved with Workflow Services (WCF/WF)?

I do not want to use ExternalDataExchange any more, obviously... ;)

Christian Weyer

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement  
Page view tracker