Windows Workflow Foundation 3


State Machine Workflow and ListenActivity


 
I have a State Machine Workflow in which I have an HandleExternalEvent waiting for the user to raise an "approved" event on it.  I would like to only wait a certain period of time before I give up on the user and transition to an "expired" state.  The ListenActivity seems to be the right thing for that, but is only available in a Sequential workflow.  Anyone know how to implement similar functionality in a State Machine Workflow?
 
Thanks,
Russ.
 
Nags,
 
It turned out that I needed to set the LoadIntervalSeconds setting for the persistence service.  It is working fine now.  Thanks for your help!
 
Russ.
Hi Russ,
This can be done with with Two EventDrivenActivities in the StateActivity. Let the first EventDrivenActivity have the HandleExternalEvent which is going to listen for the Event "Approved" and a SetState activity to set the transition to "Approved" State. In the second EventDrivenActivity add a DelayActivity and set the time you want to wait and finally have a SetState activity mapped to "Expired" State. 
Hope this helps.
OK, Thanks - I'll give that a try.
 
ShalNAg,
 
I tried the method you described, but the delay activity in the second EventDrivenActivity never gets executed.  I set it to delay in 30 seconds, and it never executes.  Any ideas?
 
Thanks,
Russ.
Russ,
I guess something is not set properly. Did you notice any error message? 
If you provide the code/ screenshot of the workflow, I could be able to help you.
Thanks,
Nags
 
Nags,
 
It turned out that I needed to set the LoadIntervalSeconds setting for the persistence service.  It is working fine now.  Thanks for your help!
 
Russ.

Related Links

WF custom persistence once again
Hands on Labs 2.2
WF Virgin
Error in the Hands on lab 09
Workflow Designer
How do you load XOML only State Workflow in WFPad for WWFBeta 2.2 (with namespace for codebehind assembly, and activities)?
invoke sub StateMachine workflow
Using WWF to model and support "Tech Trees" in RTS games
RuleConditionDialog and intellisense
Workflow Persistence & Event Arguments
PersistenceService - Transaction Timeout
SimpleExpenseReport
SQLTrackingQuery from Workflow
CreateWorkflow failing validation
xbox live mic help
download code samples of Microsoft press' windows workflow foundation step by step - Kenn Scribner

Categories

MSDN
Using Forums
Microsoft Azure
Apps for Office and Sh...
Architecture
Microsoft Sync Framework
Microsoft Robotics
Windows Embedded Standard
Bing Maps
Archived Forums #
Archived Forums C-D
Archived Forums E-H
Archived Forums M
Maps In Windows
Visual C++
C++ Standards, Extensi...
MSBuild
Visual Studio LightSwi...
Visual Studio Diagnost...
Tools for Apache Cordova
General Windows Deskto...
Windows Desktop Develo...
Windows Imaging Compon...
Access for Developers
SharePoint 2013 - Gene...
Microsoft Azure Site R...
Azure Mobile Engagement
Azure Logic Apps
Azure Disk Encryption
.NET Framework Setup a...
Team Foundation Server...
The Forum of Sho
Microsoft Translator D...
SQL Server SMO/DMO
SQL Server Security
Getting started with S...
Power Pivot
SQL Server PowerPivot ...
SQL Server In-Memory T...
Standard 2009: Compone...
Standard 2009: Misc
SQL Server 2012 High A...
SQL Server 2012 Analys...
SQL Server 2012 PowerP...
SQL Server 2012 Databa...
Windows Live ID: Devel...
Windows Live Writer: D...
CRM Deployment
Orchard - Help and Sup...
Script Junkie Discussion
WebsitePanel - Enterpr...
Developing for the Mob...
MSDN Magazine
Project Server - Setup...
Microsoft Lync Persist...
Microsoft Unified Comm...
Getting Started with S...
Programming Silverligh...
Visual Studio & Silver...
PivotViewer Control wi...
Game Development with ...
Silverlight for Window...
Expression Studio with...
Windows Performance To...
Customer Care Framework
Connected Services Fra...
Retired SharePoint Exc...
Project Online General...
ADO.NET Entity Framewo...
Architecture, Tools, a...
AppFabric Caching
Commerce Server 2002 a...
Core Coding Experience...
Direct3D 10
General Windows MultiP...
Face Tracking – Kinect...
LightSwitch in Visual ...
Microsoft Unified Comm...
Model-Based Testing wi...
Multimap API Developme...
Network Class Library ...
Office Live Small Busi...
Popfly Game Creator
Search, Organize, and ...
SyncFx - Feedback [Rea...
SyncFx - Microsoft Syn...
SyncFx - Technical Dis...
Team Foundation Server...
TFS Deployment to Azure
UI Design for Windows ...
Tailoring your Windows...
Visual Basic Language
Visual C# IDE
Visual C++ Express 200...
Visual C++ IDE
Visual Studio Team Ser...
Visual Studio 2008 IDE...
Visual Studio Performa...
Visual Studio Online "...
Windows Presentation F...
Building Windows Store...
XML in Visual Studio 2...
XML Paper Specificatio...
OneDrive Development (...

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile