Support for Queries
The SQL Workflow Instance Store records a set of well-known properties in the store. Users can query for instances based on these properties. The following list contains some of these well-known properties:
Site Name. Name of the Web site that contains the service.
Relative Application Path. Path of the application relative to the Web site.
Relative Service Path. Path of the service relative to the application.
Service Name. Name of the service.
Service Namespace. Name of the namespace that the service uses.
Current Machine.
Last Machine. The computer on which the workflow service instance ran the last time.
Note
For self-hosted scenarios using Workflow Service Host, only the last four properties are populated. For Workflow Application scenarios, only the last property is populated.
The workflow runtime supplies values for the first three properties. The workflow service host supplies the value for the Suspend Reason property. The SQL Workflow Instance Store itself supplies values for the Last Updated Machine property.
The SQL Workflow Instance Store feature also lets you specify the custom properties for which you want to store the values in the persistence database and that you want to use in queries. For more information about custom promotions, see Store Extensibility.
Views
The instance store contains the following views. See Persistence Database Schema for further details.
The Instances View
The Instances view contains the following fields:
Id
PendingTimer
CreationTime
LastUpdatedTime
ServiceDeploymentId
SuspensionExceptionName
SuspensionReason
ActiveBookmarks
CurrentMachine
LastMachine
ExecutionStatus
IsInitialized
IsSuspended
IsCompleted
EncodingOption
ReadWritePrimitiveDataProperties
WriteOnlyPrimitiveDataProperties
ReadWriteComplexDataProperties
WriteOnlyComplexDataProperties
The ServiceDeployments view
The ServiceDeployments view contains the following fields:
SiteName
RelativeServicePath
RelativeApplicationPath
ServiceName
ServiceNamespace
The InstancePromotedProperties view
The InstancePromotedProperties view contains the following fields. For details on promoted properties, see the Store Extensibility topic.
InstanceId
EncodingOption
PromotionName
Value# (a range of fields from Value1 to Value64).