TryLoadRunnableWorkflowCommand 类

定义

表示工作流宿主将针对实例存储执行的命令,用于将持久性存储中的可运行实例加载到内存中。Represents the command that a workflow host executes against an instance store to load runnable instances in the persistence store into the memory.

public ref class TryLoadRunnableWorkflowCommand sealed : System::Runtime::DurableInstancing::InstancePersistenceCommand
public sealed class TryLoadRunnableWorkflowCommand : System.Runtime.DurableInstancing.InstancePersistenceCommand
type TryLoadRunnableWorkflowCommand = class
    inherit InstancePersistenceCommand
Public NotInheritable Class TryLoadRunnableWorkflowCommand
Inherits InstancePersistenceCommand
继承
TryLoadRunnableWorkflowCommand

注解

如果某个实例未处于挂起状态或完成状态并且满足以下条件,则该实例可 运行An instance is runnable, if it is not in the suspended state or the completed state and satisfies the following conditions:

  • 实例处于解除锁定状态,并且具有已过期的挂起计时器。The instance is unlocked and has a pending timer that has expired.

  • 实例处于解除锁定状态,并且其状态为 "正在 执行"。The instance is unlocked and its status is Executing.

  • 实例上的锁已过期。The instance has an expired lock on it.

实例存储应定期搜索属于使用该存储的工作流宿主的可运行实例。An instance store should periodically search for runnable instances that belong to a workflow host that uses the store. 在持久性存储中查找与其工作流主机类型匹配的可运行实例时,它应引发 HasRunnableWorkflowEventIt should raise the HasRunnableWorkflowEvent when it finds a runnable instance in the persistence store that matches its workflow host type. 如果实例存储在持久性存储中未找到可运行实例,它应继续监视持久性存储来查找任何可运行实例。If the instance store does not find a runnable instance in the persistence store, it should continue to monitor the persistence store for any runnable instances.

引发 HasRunnableWorkflowEvent 之后,实例存储应停止监视持久性存储来查找可运行实例,直至它收到并执行 TryLoadRunnableWorkflowCommand 为止。After raising the HasRunnableWorkflowEvent, the instance store should stop monitoring the persistence store for runnable instances until it receives and executes the TryLoadRunnableWorkflowCommand. 只有在 TryLoadRunnableWorkflowCommand 执行未返回任何可运行实例的情况下,监视才会继续。The monitoring continues only if the TryLoadRunnableWorkflowCommand execution does not return any runnable instances.

当工作流宿主收到 HasRunnableWorkflowEvent 时,它将针对实例存储执行 TryLoadRunnableWorkflowCommand,以将该实例加载到内存中。When a workflow host receives the HasRunnableWorkflowEvent, it executes the TryLoadRunnableWorkflowCommand against the instance store to load the instance into the memory.

构造函数

TryLoadRunnableWorkflowCommand()

初始化 TryLoadRunnableWorkflowCommand 类的实例。Initializes an instance of the TryLoadRunnableWorkflowCommand class.

属性

AutomaticallyAcquiringLock

指示此命令是否可尝试获取对此实例的锁定。Indicates whether the command could attempt to acquire a lock on the instance.

(继承自 InstancePersistenceCommand)
IsTransactionEnlistmentOptional

返回一个值,指示暂留提供程序是否可以在执行此命令时选择不在环境事务 (Transaction.Current) 中登记。Returns a value that indicates whether the persistence provider may choose not to enlist in the ambient transaction (Transaction.Current) when executing this command.

(继承自 InstancePersistenceCommand)
Name

获取永久性命令的名称。Gets the name of the persistence command.

(继承自 InstancePersistenceCommand)

方法

Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)
Validate(InstanceView)

验证此命令。Validates the command.

(继承自 InstancePersistenceCommand)

适用于