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

TransactionScope
where can get workflowinstance state?
Where to put ActivityBind code
Error Time out ....... in Notification services
enabling/disabling activities via policy
missing method exception in CallExternalMethodActivity
Performance of runtime creation and execution rules in WF
Error in my WorkFlow (Response.Redirect)
Approving Multiple Records in one go..
Dynamic Update
The Executing event of all my SetStateActivity objects dont fire
Design guidance needed for WWF application
Custom pub/sub service for WF message correlation
Is there any event get fired when I changed the content in the workflow designer?
Subscription handler threw System.FormatException
How can I designate string[] field as returnValue for ReceiveActivity?

Categories

MSDN
Commerce Server
JScript and Scripting
SQL Server
SQL Server (Pre-release)
Development
Bing Maps
Visio 2010
Microsoft Atlas API: D...
Silverlight
Archived Forums N-R
Archived Forums SA-SM
Archived Forums
Suggestions and Feedba...
Visual C#
Parallel Computing in ...
AdSDK Integration & Ad...
Windows Desktop Perfmo...
Developing Apps for Of...
Excel for Developers
Outlook for Developers
SharePoint 2013 - Setu...
Azure SQL Database
Microsoft Azure Site R...
Azure Stream Analytics
Azure Log Analytics
Azure Security Center
Azure DevTest Labs
Claims based access pl...
Team Foundation Server...
BizTalk Server General
ADO.NET Entity Framewo...
Debugger Canvas
Microsoft Translator U...
SyncFx - General [Read...
Microsoft Robotics - D...
SQL Server Data Access
SQL Server Replication
SQL Server Data Wareho...
SQL Server In-Memory T...
SQL Server 2012 High A...
Windows Forms General
Windows Forms Sample A...
Live Connect (Archived)
Windows Live General: ...
Windows Live  Spaces: ...
Speech Service for Dev...
WebsitePanel - Support
Bing Maps for Windows ...
Office Live Basics, Es...
Project Server General...
Microsoft Lync Persist...
Silverlight Controls a...
Visual Studio & Silver...
WCF RIA Services with ...
Retired SharePoint Ent...
.NET Remoting and Runt...
Architecture, Tools, a...
App Producer (archived)
CAT.NET
Developer Documentatio...
Git, Mercurial and Dro...
ISV Community Days
LINQ to SQL (Pre-Release)
Microsoft Security Dev...
Microsoft Security Dev...
patterns & practices: ...
Popfly Bugs and Sugges...
Project Codename:  Jasper
NUI API and Programmin...
Search Server: Federation
Silverlight (formerly ...
SQL Server 2014 SQL To...
SQL Server 2014 Databa...
Team Foundation Server...
Team Foundation Server...
Transactions Programming
Tools for Windows Phon...
Visual Studio Applicat...
Visual Studio Gallery ...
Visual Studio UI Autom...
Visual Studio Web Perf...
Visual Studio Online "...
Windows Live Alerts De...
Windows Live Controls ...
Windows SideShow Devel...
Working with Data and ...
Tools for Windows Stor...
Mango Update (Archived)
XML in Visual Studio a...
Kinect for Windows v2 SDK
Skype Web SDK

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile