Windows Workflow Foundation 3


How can I query StateMachineWorkflowInstance before the WF idles


I would like to retrieve the name of the State that a current State Machine Workflow Instance is in.  The StateMachineWorkflowInstance class works fine for this once the WF idles, but I am unable to use it to retrieve the current State when a WF instance is first started.  The idea is that I start a WF and then query the State.  Can this be done with StateMachineWorkflowInstance or will it require tracking?
The StateMachineWorkflowInstance is using tracking underneath to find out the current state.  You could add a CallExternalMethodActivity to a StateInitializationActivity added to each state and have it send the host the state’s name, and any other information you want.  Unless you have execution logic in your state initialization that causes a transition to another state, a state will become idle immediately after the state initialization completes execution.  You could just use the call external when you do cause a transition in the state initialization and let the StateMachineWorkflowInstance use tracking to find out the rest of the time.

Related Links

HandleExternalEvent Problem
WWF with .NET compact framework 2.0
How can I query StateMachineWorkflowInstance before the WF idles
Question about modifying a workflow
Rule Conditions against custom activities and XAML activation - how should I achieve this?
MOSS Publishing Site
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

Categories

MSDN
Visual Studio Development
Visual Studio Team Fou...
BizTalk Server
Microsoft ISV Communit...
Dynamics
Windows Hardware Devel...
Lync Server
Other Forums
Archived Forums #
Kinect for Windows SDKs
Visual C#
Visual Studio Setup an...
Visual Studio LightSwi...
Promote Your App
Windows Desktop Sideba...
Development with the W...
Windows Hardware Testi...
Access for Developers
SharePoint 2013 - Deve...
SharePoint Legacy Vers...
Azure SQL Database
Azure Pack
Azure App Service - We...
Azure Mobile Apps
Machine Learning
Azure SQL Data Warehouse
Azure Security Center
Azure Disk Encryption
Azure Blockchain
.NET Framework Setup a...
Windows Presentation F...
Windows Communication ...
Windows Workflow Found...
Commerce Server 2009
ADO.NET DataSet
Reactive Extensions (Rx)
Internet Explorer Exte...
SyncFx - General [Read...
SyncFx – Microsoft Syn...
Microsoft Robotics - V...
.NET Compact Framework
Visual Studio Smart De...
Transact-SQL
SQL Server Security
SQL Server Database En...
SQL Server PowerPivot ...
SQL Server Manageability
SQL Server In-Memory T...
Standard 2009: Tools
Standard 7: Servicing ...
Windows Server 2008 Ap...
Bing Maps: Map Control...
CRM Development
Dynamics 365 for Custo...
MSDN, TechNet and Expr...
Orchard –Discussions
The Samsung Windows De...
Exchange Server Protocols
Microsoft Unified Comm...
Microsoft Unified Comm...
Programming Silverligh...
MVVM / ViewModel Patte...
Expression Encoder
Reference Source Serve...
Customer Care Framework
Connected Services Fra...
ADO.NET Entity Framewo...
Architecture Events
Building Windows Store...
Core Coding Experience...
Deep Zoom Composer
Direct3D 10
Game Technologies: Gen...
General Windows MultiP...
LightSwitch HTML Clien...
JScript for the .NET F...
Microsoft Unified Comm...
Network Quality of Ser...
Parallel Computing Gen...
Performance Counters f...
POS for .NET
Silverlight (formerly ...
Service Bus EAI & EDI ...
SQL Creation
SQL Server 2014 Data Q...
SQL Server 2014 In Azu...
SQL Server 2014 Self-S...
SQL Server 2014 Report...
Team Foundation Server...
Visual Basic Interop a...
Visual Basic Language
Visual C++ 2008 (Pre-r...
Visual Studio Source C...
Visual Studio Online "...
Web Sandbox - Exploits
Windows Events
Windows Live Search: D...
Windows Presentation F...
Building Windows Store...
XML in Visual Studio 2...
XNA Game Studio Express
SQL Server 2016 Preview
Microsoft Graph

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile