共用方式為


使用 AppFabric Cmdlet 來控制服務執行個體

此主題說明如何使用 AppFabric Cmdlet 來控制工作流程服務執行個體。

注意

若要以手動方式執行 AppFabric Cmdlet,請開啟 AppFabric 的 Windows PowerShell 主控台,輸入適當的 Cmdlet,然後按下 ENTER。如需有關執行 Cmdlet 的詳細資訊,請參閱執行 AppFabric Cmdlet。如需有關此文件之語法陳述式中使用之任何類別或常用參數的詳細資訊,請參閱 AppFabric 的 Windows PowerShell 參考

暫停工作流程服務執行個體

在 AppFabric 的 Windows PowerShell 主控台中,執行 Suspend-ASAppServiceInstance Cmdlet 以暫停執行個體的執行並讓它進入「已暫停」狀態。執行個體會以正常方式從記憶體解除載入,且執行個體的狀態會被保存到持續性儲存區。

Suspend-ASAppServiceInstance Cmdlet 的語法選項:

語法 1

Suspend-ASAppServiceInstance -ServiceInstanceInfo <InstanceInfo>

語法 2

Suspend-ASAppServiceInstance -InputObject <ServiceInstanceInfo>
參數 描述

–ServiceInstanceInfo <執行個體資訊>

指定需要暫停的工作流程服務執行個體。此參數主要用於管道處理案例。

Get-ASAppServiceInstance | Suspend-ASAppServiceInstance

停止工作流程服務執行個體

在 AppFabric Windows PowerShell 主控台中,執行 Stop-ASAppServiceInstance Cmdlet 以取消或終止一或多個工作流程服務執行個體。取消表示會叫用執行個體的取消處理常式 (若使用者已定義)。終止不會叫用任何取消處理常式。在這個兩個案例中,執行個體都會變成「已完成」狀態。

Stop-ASAppServiceInstance Cmdlet 的語法選項:

語法 1

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

語法 2

Stop-ASAppServiceInstance -InputObject <ServiceInstanceInfo> -Terminate [<CommonParameters>]
參數 描述

–ServiceInstanceInfo <執行個體資訊>

指定需要取消或終止的工作流程服務執行個體。此參數主要用於管道處理案例。

Get-ASAppServiceInstance | Stop-ASAppServiceInstance

–terminate

若指定 –terminate 選項,則會終止執行個體;否則會取消執行個體。此為選用參數。

繼續工作流程服務執行個體

在 AppFabric Windows PowerShell 主控台中,執行 Resume-ASAppServiceInstance Cmdlet 以繼續暫停的工作流程服務執行個體。執行個體會從持續性儲存區重新載入到其上次已知正常狀態。

Resume-ASAppServiceInstance Cmdlet 的語法選項:

語法 1

Resume-ASAppServiceInstance -ServiceInstanceInfo <InstanceInfo>

語法 2

Resume-ASAppServiceInstance -InputObject <ServiceInstanceInfo> [<CommonParameters>]
參數 描述

–ServiceInstanceInfo <執行個體資訊>

指定需要繼續的工作流程服務執行個體。此參數主要用於管道處理案例。

Get-ASAppServiceInstance | Resume-ASAppServiceInstance

  2012-03-05