Windows Workflow Foundation 3


Workflow Persistence & Event Arguments


I'm developing a State Machine workflow that passes parameters through events. The Workflow will have to persist its state in a SQL database. My understanding is that the persistence services will persist the current state of the Workflow (e.g. which state the Workflow is in). The workflow is rather useless without also persisting the parameters passed in the event arguments. Will the Workflow Persistence Services automatically persist the values passed in the event arguments or will I have to manually persist these parameters in the database?Thank you in advance,-- Sean
The parameters that you passed in get assigned to properties.  The persistence service binary serializes the workflow instance.  As long as the workflow doesn't change the values of the properties that the parameters were assigned to their original value will be persisted.
Thanks,
Joel West
MSFTE - SDE WF runtime and hosting
This posting is provided "AS IS" with no warranties, and confers no rights
The parameters that you passed in get assigned to properties.  The persistence service binary serializes the workflow instance.  As long as the workflow doesn't change the values of the properties that the parameters were assigned to their original value will be persisted.
Thanks,
Joel West
MSFTE - SDE WF runtime and hosting
This posting is provided "AS IS" with no warranties, and confers no rights
Thank you very much!
It's not obvious to me how to get the User Events back from the SqlTrackingService.  I can see all the Workflow and Activity events in the SQL database, but I can't see the User Events.  What is the proper way to get these values back?
If you are tracking any data using TrackData method, it will be saved as User Events. Here is a code snippet to access User events
SqlTrackingWorkflowInstance sqlTrackingWorkflowInstance;
            if (sqlTrackingQuery.TryGetWorkflow(workflowInstanceId, out sqlTrackingWorkflowInstance))
            {
                foreach (UserTrackingRecord userTrackingRecord in sqlTrackingWorkflowInstance.UserEvents)
                {
                    Console.WriteLine("\nUser Tracking Event : Event Date Time : {0}, Event Data : {1}\n", userTrackingRecord.EventDateTime.ToString(), userTrackingRecord.UserData.ToString());
Take a look at the sample UserTrackPoints in section \Windows Workflow Foundation\Samples\Technologies\Tracking\UserTrackPoints
Thank you, SonaliC!Using the StateMachine lab #4 as an example, I'm passing the OrderID in the event arguments to the Workflow.  I can see EventArgs in the userTrackingRecord, but it's always null.  Is there where my arguments should be?
Anybody?
Hi Senfo,
                 No. You should be able to get the tracked data in UserTrackingRecord.UserData. Also, make sure that you are looking at the correct user tracking event. If your profile enables all user events, you will also see state change events. To filter out just your events, use any string value for the key and you can add a profile which allows only events with that particular key.
Ranjesh

Related Links

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
Advantage and disadvantage of ASP.NET WorkFl
When do activities CANCEL and How do i force activities to cancel state?
Windows workflow 4.0 persistent issues
Windows Workflow 4
help needed in state machine workflow in asp.net
About the Role in WWF
Need suggestion of Workflow implementation

Categories

MSDN
Visual Studio Languages
Windows Desktop Develo...
Internet Explorer Deve...
Machine Translation an...
SQL Server (Pre-release)
Windows Forms
Orchard
ScriptJunkie
Microsoft Atlas API: D...
Bing Ads API: Development
Unified Communications
Other Forums
Archived Forums X-Z
Maps In Windows
Software Entwicklung f...
Visual Studio LightSwi...
Testing with Visual St...
Visual Studio Graphics...
Windows App Studio Beta
Windows Desktop Sideba...
Windows Hardware WDK a...
Word for Developers
Open XML Format SDK
SharePoint 2013 - Search
Azure SQL Database
Azure BizTalk Services
Azure API Management
Azure Notification Hubs
Azure Key Vault
Azure IoT Hub
Azure Analysis Services
Azure Database for MySQL
Visual Studio Visualiz...
Team Foundation Server...
Team Foundation Server...
BizTalk Server Adapter...
Commerce Server 2009
Reactive Extensions (Rx)
Microsoft Live Labs Volta
Internet Explorer Exte...
Internet Explorer Web ...
Partnering with Microsoft
Microsoft Robotics - C...
Microsoft Robotics - S...
Microsoft Device Emulator
SQL Server Tools
Transact-SQL
SQL Service Broker
SQL Server Setup & Upg...
SQL Server High Availa...
SQL Server PowerPivot ...
SQL Server Distributed...
Standard 7: Embedded E...
SQL Server 2012 Master...
Windows Forms Designer
ClickOnce and Setup & ...
Windows Forms Sample A...
CRM Development
WebsitePanel - Discuss...
Microsoft Automatic Gr...
Project Server General...
Project Server - Setup...
Bing Ads API: Development
Hosting and Streaming ...
MVVM / ViewModel Patte...
Accessing Web Services...
Customer Care Framework
Acropolis
AppFabric Service and ...
Building Windows Store...
App Producer (archived)
Doloto
LightSwitch in Visual ...
LINQ to SQL (Pre-Release)
Microsoft Security Dev...
Microsoft Unified Comm...
MS-Build, Multi-Target...
Network Quality of Ser...
patterns & practices: ...
NUI API and Programmin...
Search Server: Develop...
Search Server: Feature...
Silverlight (formerly ...
Silverlight (formerly ...
Surface Application De...
SyncFx - Microsoft Syn...
SQL Server 2014 In Azu...
SQL Server 2014 High A...
SQL Server 2014 Setup ...
Team Foundation Server...
Team Foundation Server...
Tailoring your Windows...
Visual Basic for Appli...
Visual C++ MFC and ATL
Visual J# General (Ret...
Visual Studio Applicat...
Visual Studio Editor i...
Visual Studio WPF/SL D...
Web Development in Vis...
Web Gadget Development
Windows Live Search: D...
Mango Update (Archived)
Expression Blend for W...
SQL Server 2016 Preview
Microsoft R Open

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile