Search

Search:

Namespace:

Search Result
.
See
.

Depending on the object used to call GetService a number of RuntimeServices might not be returned, a null/Nothing is returned instead. This is the case with a ActivityExecutionContext which will not return any of the following: WorkflowSchedulerService, WorkflowPersistenceService, TrackingService, WorkflowCommitWorkBatchService, WorkflowLoaderService or the WorkflowRuntime itself.

.
Summary
Determines is the SqlTrackingService participates in transactions.
.

If you are tracking the progress of events in a workflow using a SqlTrackingService object you might have noticed you aren't seeing any events in the database until the workflow is either finished or unloaded. In fact you won't get to see any event until the WorkflowPersisted event has fired. The reason for this is that the default for the SqlTrackingService is to be transactional. Even though the docs claim the default for the SqlTrackingService.IsTransactional is false in fact it is true. This results in the records being written to the database but you won't see them when querying because they are still locked in a transaction. So if you need or want to see the up-to-date events while the workflow is still executing you need to set the SqlTrackingService.IsTransactional to false before adding the service to the WorkflowRuntime.

.
Summary
.
Summary
.

SqlTrackingQuery provides methods and properties that you can use in order to access certain kinds of tracking data stored in a SQL database by the SqlTrackingService. Access to this data is provided through SqlTrackingWorkflowInstance objects. You can call TryGetWorkflow to try to get a SqlTrackingWorkflowInstance for a specific workflow instance. You can call GetWorkflows to get a collection of SqlTrackingWorkflowInstance objects that correspond workflow instances that have tracking data that matches a set of query parameters contained in a SqlTrackingQueryOptions that is passed as a parameter to the method. See the SqlTrackingWorkflowInstance class for more information about the kind of tracking data available and see the SqlTrackingQueryOptions class for more information about the kind of queries that can be performed.

.
  • Participates in workflow transactions by default; the behavior is controlled by the SqlTrackingService IsTransactional property.
.

In addition, WF provides SqlTrackingQuery APIs that you can use to query the tracking data stored in the SqlTrackingService.

.

If you are tracking the progress of events in a workflow using a SqlTrackingService object you might have noticed you aren't seeing any events in the database until the workflow is either finished or unloaded. In fact you won't get to see any event until the WorkflowPersisted event has fired. The reason for this is that the default for the SqlTrackingService is to be transactional. Even though the docs claim the default for the SqlTrackingService IsTransactional is false in fact it is true. This results in the records being written to the database but you won't see them when querying because they are still locked in a transaction. So if you need or want to see the up-to-date events while the workflow is still executing you need to set the SqlTrackingService.IsTransactional to false before adding the service to the WorkflowRuntime.

.

http://msdn2.microsoft.com/en-us/library/system.workflow.runtime.tracking.sqltrackingservice.aspx

.
Summary
.

Set the SqlTrackingService PartitionOnCompletion to true to move the tracking data as soon as a workfow instance completes.

.

See Moustafa Khalil SqlTrackingService Data Maintenance 101 blog post at http://blogs.msdn.com/moustafa/archive/2006/03/23/559391.aspx for more details on the basics.

.
        SqlTrackingService tracking = new SqlTrackingService(@"Data Source=.\sqlexpress;Initial Catalog=WorkflowTracking;Integrated Security=True");
.

When you use this you might receive a InvalidOperationException with message: 'StateHistory' property requires the 'System.Workflow.Runtime.Tracking.SqlTrackingService' service. This is because it uses the SqlTrackingService to retreive all previous states from.

.

By default only a single tracking service is provided, the SqlTrackingService. Use this as the base class to create new types of tracking service.

.

http://msdn2.microsoft.com/en-us/library/system.workflow.runtime.tracking.trackingservice.aspx

.
Summary
.
Summary
.

Of course you could also use my SqlCeWorkflowPersistenceService as the persistence service, download it from http://code.msdn.microsoft.com/SqlCeWFPersistence. I never did create a TrackingService based upon SQL Compact but if enough people are interested I might just do so

.
  • TrackingService
.

Tracking services manage tracking profiles and storage of tracking information. WF provides an out-of-box SQL-based implementation of a tracking service implemented in the SqlTrackingService class.