SqlTrackingService.UseDefaultProfile 属性

定义

获取或设置一个值,该值指定是否应为没有跟踪配置文件的工作流类型使用默认 TrackingProfileGets or sets a value specifying whether a default TrackingProfile should be used for workflow types that do not have a tracking profile.

public:
 property bool UseDefaultProfile { bool get(); void set(bool value); };
public bool UseDefaultProfile { get; set; }
member this.UseDefaultProfile : bool with get, set
Public Property UseDefaultProfile As Boolean

属性值

Boolean

如果应使用默认跟踪配置文件,则为 true;否则为 falsetrue if a default tracking profile should be used; otherwise, false. 默认值为 trueThe default is true.

注解

如果 UseDefaultProfiletrue,当工作流运行时引擎尝试为跟踪服务没有关联 SqlTrackingService 的工作流 TrackingProfile 获取跟踪配置文件时,Type 将返回默认的 TrackingProfileIf UseDefaultProfile is true, the SqlTrackingService will return a default TrackingProfile whenever the workflow runtime engine tries to get a tracking profile for a workflow Type for which the tracking service has no associated TrackingProfile.

现成可用的默认跟踪配置文件与所有活动事件、用户事件以及工作流实例发出的工作流事件相匹配。The out-of-box default tracking profile matches all activity events, user events, and workflow events emitted by a workflow instance. 可以使用 UpdateDefaultProfile 存储过程来更改默认跟踪配置文件。You can change the default tracking profile by using the UpdateDefaultProfile stored procedure.

备注

UpdateDefaultProfile 存储过程将更改默认跟踪配置文件。The UpdateDefaultProfile stored procedure will change the default tracking profile. 当工作流运行时引擎为跟踪服务没有关联跟踪配置文件的工作流类型请求配置文件时,将会返回这个新的默认配置文件。This new default profile will be returned when the workflow runtime engine requests a profile for a workflow type for which the tracking service has no associated tracking profile. 以前与旧默认配置文件关联的工作流类型将仍然与该配置文件关联,即使在调用 UpdateDefaultProfile 之后也是如此。必须对要与新默认配置文件关联的任何工作流类型显式调用 UpdateTrackingProfile 存储过程。Workflow types that were previously associated with the old default profile will still be associated with that profile even after UpdateDefaultProfile is called; you must explicitly call the UpdateTrackingProfile stored procedure on any of these workflow types that you want to associate with the new default profile.

UseDefaultProfile 为 true 时,SqlTrackingService 将为其数据库中没有关联跟踪配置文件的任何工作流类型将默认跟踪配置文件返回到工作流运行时引擎。While UseDefaultProfile is true, the SqlTrackingService will return the default tracking profile to the workflow runtime engine for any workflow type for which it doesn't have a tracking profile associated in its database. 如果稍后将 UseDefaultProfile 设置为 false,默认配置文件将仍然与数据库中的这些工作流类型关联。If you later set UseDefaultProfile to false, the default profile will still be associated with these workflow types in the database. 您可以对工作流类型调用 DeleteTrackingProfile 存储过程,以便不再将跟踪配置文件与该类型关联,也可以对工作流类型调用 UpdateTrackingProfile 存储过程,以便更改与该类型关联的跟踪配置文件。You can call the DeleteTrackingProfile stored procedure on a workflow type to no longer associate a tracking profile with that type, or you can call the UpdateTrackingProfile stored procedure on a workflow type to change the tracking profile associated with that type.

备注

工作流运行时引擎会将其跟踪配置文件放在缓存中。The workflow runtime engine caches its tracking profiles. 因此,它必须为在其缓存中已有关联跟踪配置文件的任何工作流类型接收 ProfileRemoved 事件,然后才能为该工作流类型的新实例停止使用其缓存的配置文件。Therefore, it must receive a ProfileRemoved event for any workflow type for which it already has a tracking profile associated in its cache before it will stop using its cached profile for new instances of that workflow type. 同样,工作流运行时引擎必须为此类工作流类型接收 ProfileUpdated 事件,然后才能将新的跟踪配置文件加载到其缓存中,以便与工作流类型的新实例相关联。Likewise, the workflow runtime engine must receive a ProfileUpdated event for such workflow types before it will load a new tracking profile into its cache to associate with new instances of the workflow type. SqlTrackingService 检查数据库以查找其跟踪配置文件更改时,它将为适用的工作流类型引发相应的事件。The SqlTrackingService raises the appropriate events for applicable workflow types when it examines the database for changes to its tracking profiles. SqlTrackingService 执行此操作所依照的频率是由 ProfileChangeCheckInterval 设置的。The frequency at which the SqlTrackingService performs this operation is set by ProfileChangeCheckInterval. 因此,当您调用 UpdateTrackingProfileDeleteTrackingProfile 存储过程时,在工作流运行时引擎反映其配置文件缓存中的更改之前,可能会有一段时间延迟(由 ProfileChangeCheckInterval 指定)。Therefore, whenever you call the UpdateTrackingProfile or DeleteTrackingProfile stored procedures there may be a delay of up to the period specified by ProfileChangeCheckInterval before the workflow runtime engine will reflect your changes in its profile cache.

有关跟踪配置文件的详细信息,请参阅 创建和使用跟踪配置文件For more information about tracking profiles, see Creating and Using Tracking Profiles.

适用于