SALES: 1-800-867-1380
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

InstanceStore.Execute Method

Executes a persistence command synchronously. Examples of persistence commands are: LoadWorkflowCommand and SaveWorkflowCommand.

Namespace:  System.Runtime.DurableInstancing
Assembly:  System.Runtime.DurableInstancing (in System.Runtime.DurableInstancing.dll)

public InstanceView Execute(
	InstanceHandle handle,
	InstancePersistenceCommand command,
	TimeSpan timeout
)

Parameters

handle
Type: System.Runtime.DurableInstancing.InstanceHandle

An instance handle.

command
Type: System.Runtime.DurableInstancing.InstancePersistenceCommand

The command to be executed.

timeout
Type: System.TimeSpan

The timeout value for the operation.

Return Value

Type: System.Runtime.DurableInstancing.InstanceView
An InstanceView object representing the known state of the instance after the successful completion of the command. If Execute was called under a transaction, this state may include uncommitted data. Once the transaction is committed successfully, the data in the InstanceView object can be considered committed

A host calls the Execute method to execute a persistence command against an instance handle, which the host obtains by invoking the CreateInstanceHandle method. The instance handle may be bound to entities that represent the context and subject of the command, such as an instance, instance owner, or instance lock. Only one command may be issued against an instance handle at a time.

Caution noteCaution

If this method is executed with a CreateWorkflowOwnerCommand, it will create an InstanceOwner and bind it to the instance. This means that no other process will be able to access that workflow; if the process ends, the workflow cannot be recovered or executed. If such a workflow is executed again, a InstanceLockedException will be thrown.

If CreateWorkflowOwnerCommand is not used, the instance store will create a temporary InstanceOwner that will be deleted at the end of the process. However, if the process ends before the workflow’s final persistence point, this exception will be thrown, unless the period of time specified in the HostLockRenewalPeriod parameter has expired.

.NET Framework

Supported in: 4.5, 4

.NET Framework Client Profile

Supported in: 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft