Windows Workflow Foundation 3


After wf receives external event, the host never sees any more tracking events


I have a host which starts workflows. It implements a TrackingChannel and TrackingService, and it sees a flurry of tracking events when a workflow starts running.My workflow includes a HandleExternalEvent activity. The event that satisfies this is raised by a separate application, which of course loads the runtime etc. This second application does not implement TrackingChannel/TrackingService.When that event is fired, the workflow proceeds on its way as it should. But the host that originally started it, although still running with its tracking stuff active, sees no more tracking events for that workflow. I was expecting these events to continue to be reported to it.What am I missing here?
Tracking is a service that runs in the host. If your second host that hydrates the persisted workflow that was originally running in the first host does not have these tracking services, then there will be no more tracking. The first host will still have a running WorkflowRuntime with tracking services, but no running Workflow (since it is now running in the second host)
Does that make sense? If you want to have tracking then each Workflow runtime that may run a Workflow needs to have a loaded Tracking service.
Steve Danielson [Microsoft]This posting is provided "AS IS" with no warranties, and confers no rights.
If both/all of your hosts used the same database for SQLTracking then you would be able to query this database for your tracking data for the workflow and it should be pretty seamless for you. If a Workflow is persisted and then hydrated by multiple hosts, each of which have the traking service registered, then all of the tracking info for that one workflow should be in that one database.
Steve Danielson [Microsoft]This posting is provided "AS IS" with no warranties, and confers no rights.
Tracking is a service that runs in the host. If your second host that hydrates the persisted workflow that was originally running in the first host does not have these tracking services, then there will be no more tracking. The first host will still have a running WorkflowRuntime with tracking services, but no running Workflow (since it is now running in the second host)
Does that make sense? If you want to have tracking then each Workflow runtime that may run a Workflow needs to have a loaded Tracking service.
Steve Danielson [Microsoft]This posting is provided "AS IS" with no warranties, and confers no rights.
Yes, that makes sense.  I had sort of been imagining that the tracking was a publish-subscribe pattern where each host was subscribed to tracking events published by the workflow.  But from what you have explained it seems more as if the first host unsubscribes when the workflow is idled.   (Or maybe it's just wrong to think of tracking in publish-subscribe terms.)So if I wanted to compile a complete history of all the tracking information emitted by a workflow, I guess I would have to implement my own scheme to stitch together the events from each host that interacts with the workflow.  What would happen if both of my apps used the SQLTrackingService and stored everything in the same instance of the tracking database?
If both/all of your hosts used the same database for SQLTracking then you would be able to query this database for your tracking data for the workflow and it should be pretty seamless for you. If a Workflow is persisted and then hydrated by multiple hosts, each of which have the traking service registered, then all of the tracking info for that one workflow should be in that one database.
Steve Danielson [Microsoft]This posting is provided "AS IS" with no warranties, and confers no rights.

Related Links

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
CustomPersistedService
Workflow and Development Modes
My workflow deriving from my own workflow base class - will it work?
Object To Object Map Activity
Distributed Transaction with WWF
MaxInstances WorkflowRuntime
Remote workflow tracking
callback trigger
Question about hosting
Context bindings wsdl generation
Use of HandleExternalEvent result in an IfElse activity
Custom Activity Designer

Categories

MSDN
Data Platform Developm...
Microsoft Sync Framework
Windows Embedded Standard
Microsoft Research
Bing Maps
Other Forums
Archived Forums X-Z
Virtualization
Forums Redesign - Q&A ...
Where is the Forum For…?
Store Engagement Frame...
DirectShow Development
User Interface develop...
Windows Desktop Pro-Au...
Windows Desktop Web Se...
Hardware Development B...
Open XML Format SDK
Azure Storage
Azure Management Portal
Service Bus
Azure Virtual Machines
Azure Marketplace
Azure Key Vault
Azure Stream Analytics
Azure Batch
Azure Security Center
Azure Analysis Services
Windows Presentation F...
Common Language Runtim...
BizTalk Server RFID
WCF Data Services
ADO.NET Entity Framewo...
Reactive Extensions (Rx)
Microsoft Live Labs Volta
Small Basic
.NET Compact Framework
SQL Server XML
SQL Server Replication
Microsoft Drivers for ...
Database Design
SQL Server PowerPivot ...
Windows Embedded 8 Sta...
Standard 7: Components...
Windows Embedded Compa...
SQL Server 2012 Integr...
SQL Server 2012 Spatia...
Windows Forms General
Script Junkie Discussion
Microsoft Automatic Gr...
Bing Maps Web Controls
Project Server General...
Microsoft Unified Comm...
Silverlight 4
Report a Silverlight Bug
Managed Extensibility ...
Expression Encoder
Expression Web and Sup...
Windows Performance To...
Customer Care Framework
Visual Studio Report C...
Windows Performance To...
Retired SharePoint Bus...
Retired SharePoint Soc...
.NET Framework Network...
.NET Remoting and Runt...
Axum Incubation Project
Audio API and Programm...
Azure Troubleshooting,...
Building Windows Store...
Building Windows Store...
App Producer (archived)
Crystal Reports for Vi...
Dryad, DSC, and DryadL...
Dynamic Languages on .NET
Feedback for Visual Ba...
ISV Community Days
Network Quality of Ser...
Parallel Computing Gen...
Regular Expressions
Search Server: Known B...
SQL Server 2014 High A...
Tellme Studio (retired)
Using Visual Round Tri...
Tools for Windows Phon...
Visual Basic for Appli...
Visual Studio 2008 SP1...
Visual Studio Performa...
Visual Studio UI Autom...
Visual Studio Web Perf...
Web Development in Vis...
Windows Events
Windows MultiPoint Mou...
Building Windows Store...
Tools for Windows Stor...
Expression Blend for W...
XML in Visual Studio 2...
XNA Framework
Microsoft Graph

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile