Windows Workflow Foundation 3


SqlTrackingService & User Events


Can anybody please point me to a decent sample on the SqlTrackingService? I'm passing paremeters through EventArgs in my state machine workflow, but I can't seem to figure out how to get the data back. For example, if I pass a dollar amount when I raise an event, I'd eventually like to be able to recover that value from my application. I was hoping that the following code would reveal the parameters I had passed (or at least lead me in the right direction). Unfortunately, however, it has not. I was hoping that the event arguments could be recovered in the userTrackingRecord.EventArgs property.private void Test(){ if (Request.QueryString["InstanceId"] != null) { SqlTrackingWorkflowInstance sqlTrackingWorkflowInstance; SqlTrackingQuery sqlTrackingQuery = new SqlTrackingQuery("Data Source=MyComputer;Initial Catalog=SharedStore;Integrated Security=True"); System.Text.StringBuilder Message = new System.Text.StringBuilder(); if (sqlTrackingQuery.TryGetWorkflow(new Guid(this.GetSelectedOrderId()), out sqlTrackingWorkflowInstance)) { foreach (UserTrackingRecord userTrackingRecord in sqlTrackingWorkflowInstance.UserEvents) { Message.AppendFormat("\nUser Tracking Event : Event Date Time : {0}, Event Data : {1}\n", userTrackingRecord.EventDateTime.ToString(), userTrackingRecord.UserData.ToString()); //Message.AppendFormat("\nUser Tracking Event : Event Date Time : {0}, Event Data : {1}\n", userTrackingRecord.EventDateTime.ToString(), userTrackingRecord.UserData.ToString()); } ShowMessage(Message.ToString()); } }}
Nevermind, I wasn't calling the TrackData() method in my Workflow code.
Nevermind, I wasn't calling the TrackData() method in my Workflow code.
Alright, so I found my data, but I can't find what differentiates my UserData from the stuff that was automatically generated. For example, I really don't need the time that the event occurred. The only things I need are the values that I passed into the event arguments. I don't want to have to rely on knowing the exact location in the array unless I have to.
You can create a custom tracking profile and use data extraction to pull out specific properties of activities if the values are getting set on the workflow or the activity.  Or you could create and deploy a custom profile that simplifies the data tracked so you wouldn't have to dig through data you weren't interested in. 
Matt

Related Links

Windows WorkFlow Foundation: Cannot add a new state in between two existing states.
Within VS2008, can't drill down into a workflow without checking it out
SQLTrackingService tracks incorrect WorkflowInstanceEvent order?
XAML Workflows, Property Bindings and Conditions sample
Tracking query timeouts
Insert activity during PreFilterProperties
Passing data from Activity to Activity in XAML Workflows
Problem with x:Class and CreateWorkflow
Activity property resets back to default inside while activity
Designer does not maintain scroll position returning back from eventdrivenactivity to root designer surface in WF 3
InvokeWorkflow inside ReceiveActivity does not start async
stop runnign an istance of a work flow
WorkFlow will not start. Stuck on workflowRuntime.CreateWorkflow?
Is there the ability for business users to modify the workflow?
How to: Activity Data Bind a collection object, not it's contents.
Problems with Ownership, Timers etc

Categories

MSDN
Visual Studio Languages
Visual Studio Development
Windows Phone Development
Visual FoxPro
Architecture
DevLabs
Windows Embedded Standard
Windows Live Developer
Open Specifications
Microsoft Azure
Windows Phone Preview ...
Archived Forums
Visual Studio LightSwi...
Visual Studio Code Vis...
Register and Manage Ac...
Application Compatibil...
Developing Windows Des...
Application Security f...
Windows Desktop Search...
Windows Hardware WDK a...
Office 365 for Developers
SharePoint 2013 - Deve...
SharePoint 2013 - Setu...
SharePoint 2010 - Search
Azure Multi-Factor Aut...
Azure Scheduler
Azure API Management
Azure DocumentDB
Azure App Service - AP...
Azure Blockchain
Azure Time Series Insi...
Team Foundation Server...
Team Foundation Server...
Architecture General
Commerce Server 2009
Reactive Extensions (Rx)
Training and Certifica...
Small Basic
SyncFx - General [Read...
SyncFx - Microsoft Syn...
Data Mining
.NET Framework inside ...
Database Mirroring
SQL Server Data Wareho...
Database Design
SQL Server Master Data...
Standard 2009: Embedde...
SQL Server 2012 Integr...
SQL Server 2012 SQL To...
Windows Forms Sample A...
CRM Development
Orchard –Discussions
WebsitePanel - Enterpr...
Bing Maps Web Controls
Office Live Basics, Es...
Programming Silverligh...
PivotViewer Control wi...
Game Development with ...
Expression Design
Expression Encoder
Visual Studio Report C...
Retired SharePoint Exc...
Retired SharePoint Acc...
.NET Remoting and Runt...
.NET StockTrader Sampl...
Announcements about pr...
Building Windows Store...
Casablanca
Core Coding Experience...
Dryad, DSC, and DryadL...
Game Technologies: XNA...
Getting Started With V...
HD DVD Interactivity A...
Hobbyist Zone
(Retired) Exchange Pre...
JScript for the .NET F...
Microsoft Unified Comm...
MS-Build, Multi-Target...
Monitor, Alert and Aut...
patterns & practices: ...
Popfly Explorer
Regular Expressions
Search Server: Feature...
Search Server: Federation
Silverlight (formerly ...
Share your How to samp...
SQL Server in Azure VMs
SQL Server 2014 SQL To...
SQL Server 2014 In Azu...
SQL Server 2014 In-Mem...
Visual C# 2008 (Pre-re...
Visual C# Express Edition
Visual C# Language
Visual Studio Async CTP
Visual Studio 2008 (Pr...
Visual Studio Gallery ...
Visual Studio LightSwi...
Visual Studio Performa...
Visual Studio Web Perf...
Windows Live Search: D...
Windows XP Wireless SDK
Mango Update (Archived)
Windows Phone Preview ...

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile