Share via


Control Service Instances Using Windows Server AppFabric Cmdlets

This topic describes how you control workflow service instances by using AppFabric cmdlets.

Note

To execute an AppFabric cmdlet manually, open the Windows PowerShell console for AppFabric, enter the appropriate cmdlet, and then press ENTER. For more information about executing cmdlets, see Running Windows Server AppFabric Cmdlets. For information about any of the classes or common parameters used in the syntax statements in this document, refer to Windows PowerShell for Windows Server AppFabric Reference.

To suspend a workflow service instance

In the Windows PowerShell console for AppFabric, execute the Suspend-ASAppServiceInstance cmdlet to suspend (pause) the execution of an instance and put it into the Suspended state. The instance is gracefully unloaded from memory and the instance’s state is persisted into the persistence store.

Syntax options for the Suspend-ASAppServiceInstance cmdlet:

Syntax 1

Suspend-ASAppServiceInstance -ServiceInstanceInfo <InstanceInfo>

Syntax 2

Suspend-ASAppServiceInstance -InputObject <ServiceInstanceInfo>
Parameter Description

–ServiceInstanceInfo <InstanceInfo>

Specifies the workflow service instance that needs to be suspended. This parameter is primarily used in piping scenarios.

Get-ASAppServiceInstance | Suspend-ASAppServiceInstance

To stop a workflow service instance

In the AppFabric Windows PowerShell console, execute the Stop-ASAppServiceInstance cmdlet to cancel or terminate one or more workflow service instances. Cancellation means that the instance's cancellation handlers are invoked if the user has defined them. Termination does not invoke any cancellation handlers. In both cases, the instance is moved to the Completed state.

Syntax options for the Stop-ASAppServiceInstance cmdlet:

Syntax 1

Stop-ASAppServiceInstance -ServiceInstanceInfo <InstanceInfo> [-terminate]

Syntax 2

Stop-ASAppServiceInstance -InputObject <ServiceInstanceInfo> -Terminate [<CommonParameters>]
Parameter Description

–ServiceInstanceInfo <InstanceInfo>

Specifies the workflow service instance that needs to be cancelled or terminated. This parameter is primarily used in piping scenarios.

Get-ASAppServiceInstance | Stop-ASAppServiceInstance

–terminate

If the –terminate option is specified, the instance is terminated; otherwise it is cancelled. This parameter is optional.

To resume a workflow service instance

In the AppFabric Windows PowerShell console, execute the Resume-ASAppServiceInstance cmdlet to resume a suspended workflow service instance. The instance is reloaded into its last known positive state from the persistence store.

Syntax options for the Resume-ASAppServiceInstance cmdlet:

Syntax 1

Resume-ASAppServiceInstance -ServiceInstanceInfo <InstanceInfo>

Syntax 2

Resume-ASAppServiceInstance -InputObject <ServiceInstanceInfo> [<CommonParameters>]
Parameter Description

–ServiceInstanceInfo <InstanceInfo>

Specifies the workflow service instance that needs to be resumed. This parameter is primarily used in piping scenarios.

Get-ASAppServiceInstance | Resume-ASAppServiceInstance