安裝及設定 SharePoint Server 工作流程Install and configure workflow for SharePoint Server

摘要: 了解如何安裝及設定 SharePoint Server 中的工作流程。Summary: Learn how to install and configure workflow in SharePoint Server.

本文包含的資訊和設定 SharePoint Server 中的工作流程所需的程序。This article contains the information and procedures required to configure workflow in SharePoint Server.

重要

本文中的步驟適用於 SharePoint Server。SharePoint Foundation 2013 不支援的 SharePoint 2013 工作流程平台。The steps in this article apply to SharePoint Server. The SharePoint 2013 Workflow platform is not supported in SharePoint Foundation 2013.

注意

您可以觀看會逐步完成安裝及設定 SharePoint 2013 工作流程平台的程序的系列影片。若要檢視的影片,請參閱影片系列: 安裝及設定 SharePoint Server 2013 中的工作流程You can watch a video series that walks through the process of installing and configuring the SharePoint 2013 Workflow platform. To view the videos, see Video series: Install and configure Workflow in SharePoint Server 2013

概觀Overview

當您建立工作流程的 SharePoint Server 存在於新的選項。此選項會呼叫平台類型]。使用 SharePoint Designer 2013 來建立新的工作流程時圖會顯示 [平台類型] 選項。A new option exists when you build a workflow for SharePoint Server. This option is called Platform Type. The figure shows the Platform Type option when you are creating a new workflow by using SharePoint Designer 2013.

圖: SharePoint Server 包含三個工作流程平台選項。Figure: SharePoint Server includes three workflow platform options.

Three workflow platforms in SharePoint 2013.

提供當您先安裝 SharePoint Server 的平台為 SharePoint 2010 工作流程平台。SharePoint 2013 工作流程平台和 Project Server 平台需要額外的步驟。下表會概述三個工作流程平台。The only platform available when you first install SharePoint Server is the SharePoint 2010 Workflow platform. The SharePoint 2013 Workflow platform and the Project Server platform require additional steps. The three workflow platforms are outlined in the following table.

在 SharePoint Server 中可用的工作流程平台類型Workflow Platform types available in SharePoint Server

平台類型Platform Type 平台架構Platform Framework 需求Requirements
SharePoint 2010 工作流程SharePoint 2010 Workflow
Windows Workflow Foundation 3Windows Workflow Foundation 3
與 SharePoint Server 自動安裝。Installs automatically with SharePoint Server.
SharePoint 2013 工作流程SharePoint 2013 Workflow
Windows Workflow Foundation 4Windows Workflow Foundation 4
需要 SharePoint Server 及工作流程管理員。Requires SharePoint Server and Workflow Manager.
SharePoint 2013 Workflow - Project ServerSharePoint 2013 Workflow - Project Server
Windows Workflow Foundation 4Windows Workflow Foundation 4
需要 SharePoint Server、 工作流程管理員與 Project Server。Requires SharePoint Server, Workflow Manager, and Project Server.

注意

必須下載及安裝分別從 SharePoint Server 工作流程管理員。它不會不會自動安裝當您安裝 SharePoint Server。Workflow Manager must be downloaded and installed separately from SharePoint Server. It does not install automatically when you install SharePoint Server.

安裝及設定 SharePoint ServerInstall and configure SharePoint Server

您必須安裝並設定 SharePoint Server。若要這樣做,請參閱安裝和部署 SharePoint 2013You must install and configure SharePoint Server. To do so, see Install and deploy SharePoint 2013.

注意

當您安裝 SharePoint Server 的 SharePoint 2010 工作流程平台會自動安裝。SharePoint 2013 工作流程平台需要工作流程管理員及必須分別安裝並再設定為搭配使用 SharePoint Server 伺服器陣列。> 以正常運作 SharePoint 2013 的工作流程需要有 App Management Service 和佈建的網站訂閱服務。它不需要以萬用字元憑證和 DNS 註冊的安裝程式,但必須執行兩個執行個體。The SharePoint 2010 Workflow platform installs automatically when you install SharePoint Server. The SharePoint 2013 Workflow platform requires Workflow Manager and must be installed separately and then configured to work with your SharePoint Server farm. > To function correctly SharePoint 2013 Workflows require to have App Management Service and Site Subscription Service provisioned. It is not required to setup a wildcard certificate and DNS registration but both instances need to be running.

安裝和設定工作流程管理員Install and configure Workflow Manager

您必須安裝和設定 工作流程管理員。若要執行這項操作,請參閱安裝及設定工作流程管理員 1.0You must install and configure Workflow Manager. To do so, see Installing and Configuring Workflow Manager 1.0.

設定工作流程管理員以搭配使用 SharePoint Server 伺服器陣列Configure Workflow Manager to work with the SharePoint Server farm

您必須設定工作流程管理員以搭配 SharePoint Server 之前,請考慮下列兩個重要因素。You must consider the following two key factors before configuring Workflow Manager to work with SharePoint Server.

  • 工作流程管理員是否已安裝在屬於 SharePoint 伺服器陣列一部分的伺服器上?Is Workflow Manager installed on a server that is part of the SharePoint farm?

  • 將工作流程管理員與 SharePoint Server 之間的通訊使用HTTPHTTPS吗?Will communication between Workflow Manager and SharePoint Server use HTTP or HTTPS ?

這些因素翻譯成四個案例。每個案例設定 SharePoint 伺服器陣列以進行通訊及工作流程管理員的伺服器陣列運作。請依照您的情況下會比對的案例。These factors translate into four scenarios. Each scenario configures a SharePoint Server farm to communicate and function with the Workflow Manager farm. Follow the scenario that matches your circumstance.

1: 為 SharePoint 伺服器陣列一部分的伺服器上已安裝工作流程管理員。通訊,是使用 HTTP 來進行。1: Workflow Manager is installed on a server that is part of the SharePoint Server farm. Communication takes place by using HTTP.
2: 為 SharePoint 伺服器陣列一部分的伺服器上已安裝工作流程管理員。通訊,是使用 HTTPS 來進行。2: Workflow Manager is installed on a server that is part of the SharePoint Server farm. Communication takes place by using HTTPS.
3: 不屬於 SharePoint 伺服器陣列的伺服器上安裝工作流程管理員。通訊,是使用 HTTP 來進行。3: Workflow Manager is installed on a server that is NOT part of the SharePoint Server farm. Communication takes place by using HTTP.
4: 不屬於 SharePoint 伺服器陣列的伺服器上安裝工作流程管理員。通訊,是使用 HTTPS 來進行。4: Workflow Manager is installed on a server that is NOT part of the SharePoint Server farm. Communication takes place by using HTTPS.

注意

[!附註] 基於安全性考量,建議您在實際執行環境使用 HTTPS。For security reasons, we recommend HTTPS for a production environment.

提示

[!提示] 如需基本權限設定的資訊,請參閱 SharePoint Server 2013 的工作流程管理員基本權限設定For information about least-privilege configuration, see Least Privilege Configuration for Workflow Manager with SharePoint Server 2013.

若要設定工作流程管理員及屬於 SharePoint 伺服器陣列的伺服器上的通訊,是使用 HTTP 來進行To configure Workflow Manager on a server that is part of the SharePoint Server farm and on which communication takes place by using HTTP

  1. 登入已安裝工作流程管理員的 SharePoint 伺服器陣列中的電腦。Log on to the computer in the SharePoint Server farm where Workflow Manager was installed.

  2. 以管理員身分開啟 [SharePoint 管理命令介面。這被藉由以滑鼠右鍵按一下 [ SharePoint 管理命令介面命令並選擇 [以系統管理員身分執行Open the SharePoint Management Shell as an administrator. This is accomplished by right-clicking the SharePoint Management Shell and choosing Run as administrator.

  3. 執行 Register-SPWorkflowService Cmdlet。Run the Register-SPWorkflowService cmdlet.

    範例Example:

    Register-SPWorkflowService -SPSite "http://myserver/mysitecollection" -WorkflowHostUri "http://workflow.example.com:12291" -AllowOAuthHttp
    
  4. 登入 SharePoint 伺服器陣列中每部伺服器。Log on to each server in the SharePoint Server farm.

    SharePoint 伺服器陣列中的每部伺服器必須已經安裝工作流程管理員用戶端。Each server in the SharePoint Server farm must have the Workflow Manager Client installed.

    注意

    在伺服器上安裝工作流程管理員時,會自動在該伺服器上安裝工作流程管理員用戶端。您仍將需要在任何其他伺服器上安裝工作流程管理員用戶端。舉例來說,如果您的伺服器陣列有五部伺服器,並且在其中一部伺服器上安裝工作流程管理員,則仍將需要在其他四部伺服器上安裝工作流程管理員用戶端。When you install Workflow Manager on a server it automatically installs the Workflow Manager Client on that server. You will still need to install the Workflow Manager Client on any additional servers. For example, if you have a farm that contains five servers and you install Workflow Manager on one of those servers you will still need to install the Workflow Manager Client on the four additional servers.

  5. 在 SharePoint 伺服器陣列的每部伺服器上安裝工作流程管理員用戶端。Install the Workflow Manager Client on each server in the SharePoint farm.

    在此處下載與安裝工作流程管理員用戶端:http://go.microsoft.com/fwlink/p/?LinkID=268376Download and install the Workflow Manager Client here: http://go.microsoft.com/fwlink/p/?LinkID=268376

    若要在屬於 SharePoint 伺服器陣列的伺服器上與在哪些進行通訊使用 HTTPS 來設定工作流程管理員To configure Workflow Manager on a server that is part of the SharePoint Server farm and on which communication takes place by using HTTPS

  6. 決定您是否需要在 SharePoint 中安裝工作流程管理員憑證。Determine if you need to install Workflow Manager certificates in SharePoint.

    某些情況下,您需要取得並安裝工作流程管理員憑證。若安裝時需要您取得並安裝這些憑證,您必須完成該步驟才能繼續。若要得知您是否需要安裝憑證或想要取得指示,請參閱<在 SharePoint Server 2013 中安裝工作流程管理員憑證>。Under some circumstances, you have to obtain and install Workflow Manager certificates. If your installation requires that you obtain and install these certificates, you must complete that step before continuing. To learn whether you need to install certificates, and for instructions, see Install Workflow Manager certificates in SharePoint Server.

  7. 登入已安裝工作流程管理員的 SharePoint 伺服器陣列中的電腦。Log into the computer in the SharePoint Server farm where Workflow Manager was installed.

  8. 以管理員身分開啟 [SharePoint 管理命令介面。這被藉由以滑鼠右鍵按一下 [ SharePoint 管理命令介面命令並選擇 [以系統管理員身分執行Open the SharePoint Management Shell as an administrator. This is accomplished by right-clicking the SharePoint Management Shell and choosing Run as administrator.

  9. 執行 Register-SPWorkflowService Cmdlet。Run the Register-SPWorkflowService cmdlet.

    範例Example:

    Register-SPWorkflowService -SPSite "https://myserver/mysitecollection" -WorkflowHostUri "https://workflow.example.com:12290"
    
  10. 登入 SharePoint 伺服器陣列中每部伺服器。Log on to each server in the SharePoint Server farm.

    SharePoint 伺服器陣列中的每部伺服器必須已經安裝工作流程管理員用戶端。Each server in the SharePoint Server farm must have the Workflow Manager Client installed.

    注意

    在伺服器上安裝工作流程管理員時,會自動在該伺服器上安裝工作流程管理員用戶端。您仍將需要在任何其他伺服器上安裝工作流程管理員用戶端。舉例來說,如果您的伺服器陣列有五部伺服器,並且在其中一部伺服器上安裝工作流程管理員,則仍將需要在其他四部伺服器上安裝工作流程管理員用戶端。When you install Workflow Manager on a server it automatically installs the Workflow Manager Client on that server. You will still have to install the Workflow Manager Client on any additional servers. For example, if you have a farm that contains five servers and you install Workflow Manager on one of those servers you will still need to install the Workflow Manager Client on the four additional servers.

  11. 在 SharePoint 伺服器陣列的每部伺服器上安裝工作流程管理員用戶端。Install the Workflow Manager Client on each server in the SharePoint farm.

    在此處下載與安裝工作流程管理員用戶端:http://go.microsoft.com/fwlink/p/?LinkID=268376Download and install the Workflow Manager Client here: http://go.microsoft.com/fwlink/p/?LinkID=268376

    若要使用 HTTP 來進行的通訊及不屬於 SharePoint 伺服器陣列的伺服器上設定工作流程管理員To configure Workflow Manager on a server that is NOT part of the SharePoint Server farm and on which communication takes place by using HTTP

  12. 登入 SharePoint 伺服器陣列中每部伺服器。Log on to each server in the SharePoint Server farm.

  13. 在 SharePoint 伺服器陣列的每部伺服器上安裝工作流程管理員用戶端。Install the Workflow Manager Client on each server in the SharePoint farm.

    執行工作流程配對 Cmdlet 之前,您必須在 SharePoint 伺服器陣列的每部伺服器上安裝工作流程管理員用戶端。Before you can run the workflow pairing cmdlet, you must install Workflow Manager Client on each of the servers in the SharePoint farm.

    在此處下載與安裝工作流程管理員用戶端:http://go.microsoft.com/fwlink/p/?LinkID=268376Download and install the Workflow Manager Client here: http://go.microsoft.com/fwlink/p/?LinkID=268376

  14. 以系統管理員身分開啟 SharePoint Management Shell。方法是用滑鼠右鍵按一下 [SharePoint 2013 管理命令介面] 命令,並選擇 [以系統管理員身分執行]。Open the SharePoint Management Shell as an administrator. This is accomplished by right-clicking the SharePoint 2013 Management Shell command and choosing Run as administrator.

  15. 執行 Register-SPWorkflowService Cmdlet。Cmdlet 僅需執行一次,且能在 SharePoint 伺服器陣列的任一個伺服器執行。Run the Register-SPWorkflowService cmdlet. The cmdlet should be run only once and can be run from any of the servers in the SharePoint farm.

    範例Example:

    Register-SPWorkflowService -SPSite "http://myserver/mysitecollection" -WorkflowHostUri "http://workflow.example.com:12291" -AllowOAuthHttp
    

    重要

    [!重要事項] 執行配對 Cmdlet 之前,您必須在 SharePoint 伺服器陣列的每部伺服器上安裝工作流程管理員用戶端。You must install the Workflow Manager Client on each server in the SharePoint farm before you run the pairing cmdlet.

    若要使用 HTTPS 來進行的通訊及不屬於 SharePoint 伺服器陣列的伺服器上設定工作流程管理員To configure Workflow Manager on a server that is NOT part of the SharePoint Server farm and on which communication takes place by using HTTPS

  16. 決定您是否須在 SharePoint 2013 中安裝工作流程管理員憑證。Determine whether you need to install Workflow Manager certificates in SharePoint 2013.

    某些情況下,您需要取得並安裝工作流程管理員憑證。若安裝時需要您取得並安裝這些憑證,您必須完成該步驟才能繼續。若要得知您是否需要安裝憑證或想要取得指示,請參閱<在 SharePoint Server 2013 中安裝工作流程管理員憑證>。Under some circumstances, you have to obtain and install Workflow Manager certificates. If your installation requires that you obtain and install these certificates, you must complete that step before continuing. To learn whether you need to install certificates, and for instructions, see Install Workflow Manager certificates in SharePoint Server.

  17. 登入 SharePoint 伺服器陣列中每部伺服器。Log on to each server in the SharePoint Server farm.

  18. 在 SharePoint 伺服器陣列的每部伺服器上安裝工作流程管理員用戶端。Install the Workflow Manager Client on each server in the SharePoint farm.

    執行工作流程配對 Cmdlet 之前,您必須在 SharePoint 伺服器陣列的每部伺服器上安裝工作流程管理員用戶端。Before you can run the workflow pairing cmdlet, you must install Workflow Manager Client on each of the servers in the SharePoint farm.

    在此處下載與安裝工作流程管理員用戶端:http://go.microsoft.com/fwlink/p/?LinkID=268376Download and install the Workflow Manager Client here: http://go.microsoft.com/fwlink/p/?LinkID=268376

  19. 以管理員身分開啟 [SharePoint 管理命令介面。這被藉由以滑鼠右鍵按一下 [ SharePoint 管理命令介面命令並選擇 [以系統管理員身分執行Open the SharePoint Management Shell as an administrator. This is accomplished by right-clicking the SharePoint Management Shell command and choosing Run as administrator.

  20. 執行 Register-SPWorkflowService Cmdlet。Run the Register-SPWorkflowService cmdlet.

    範例Example:

    Register-SPWorkflowService -SPSite "https://myserver/mysitecollection" -WorkflowHostUri "https://workflow.example.com:12290"
    

    重要

    [!重要事項] 執行配對 Cmdlet 之前,您必須在 SharePoint 伺服器陣列的每部伺服器上安裝工作流程管理員用戶端。You must install the Workflow Manager Client on each server in the SharePoint farm before you run the pairing cmdlet.

驗證安裝Validate the installation

使用這些步驟來驗證您已順利安裝及設定所需的元件。Use these steps to validate that you have successfully installed and configured the required components.

驗證安裝To validate the installation

  1. 將使用者新增至 SharePoint 網站,並授與該使用者網站設計人員的權限。Add a user to your SharePoint site, and grant the user Site Designer permissions.

  2. 安裝 SharePoint Designer 2013,並根據 SharePoint 2013 工作流程平台建立工作流程。如需詳細資訊,請參閱使用 SharePoint Designer 2013 及 SharePoint 2013 工作流程平台建立工作流程Install SharePoint Designer 2013 and create a workflow based on the SharePoint 2013 Workflow platform. For more information, see Creating a workflow by using SharePoint Designer 2013 and the SharePoint 2013 Workflow platform.

  3. 從 SharePoint 使用者介面執行此工作流程。Run this workflow from the SharePoint user interface.

疑難排解Troubleshooting

基於安全性考量,無法使用「設定」帳戶來根據 SharePoint 2013 工作流程平台建立工作流程。如果您嘗試使用 SharePoint Designer 2013 來根據 SharePoint 2013 建立工作流程,您會收到工作流程動作清單不存在的警告,且不會建立工作流程。For security reasons, the Setup account cannot be used to create a workflow based on the SharePoint 2013 Workflow platform. If you try to create a workflow based on the SharePoint 2013 Workflow platform by using SharePoint Designer 2013, you receive a warning that the list of workflow actions do not exist, and the workflow is not created.

您必須將部署及執行工作流程的使用者新增至「使用者設定檔」服務。檢查管理中心中的「使用者設定檔」服務應用程式頁面,以確認您正在用來驗證工作流程安裝的使用者位於「使用者設定檔」服務中。The user who deploys and runs a workflow must be added to the User Profile service. Check the User Profile service application page in Central Administration to confirm that the user you are using to validate workflow installation is in the User Profile service.

您可以決定 SharePoint Server 及工作流程管理員所要使用的埠 HTTP 和 HTTPS 使用 IIS 管理員如下圖所示。You can determine which ports SharePoint Server and Workflow Manager are using for both HTTP and HTTPS by using IIS Manager as shown in the figure.

圖:使用 IIS 管理員來檢視由工作流程管理員使用的連接埠Figure: Use IIS Manager to view the ports used by Workflow Manager

View ports in IIS Manager.

Workflow Manager是透過使用 TCP/IP 或具名管道來進行通訊。請確認已在主控Workflow Manager資料庫的 SQL Server 執行個體上啟用適當的通訊協定。Workflow Manager communicates by using TCP/IP or Named Pipes. Make sure that the appropriate communication protocol is enabled on the SQL Server instance that hosts the Workflow Manager databases.

SQL 瀏覽器服務必須在管理Workflow Manager資料庫的 SQL Server 執行個體上執行。The SQL Browser Service must be running on the SQL Server instance that hosts the Workflow Manager databases.

無法使用系統帳戶來開發工作流程。The System Account cannot be used to develop a workflow.

若要疑難排解 SharePoint Server,請參閱 <疑難排解 SharePoint 伺服器To troubleshoot SharePoint Server, see Troubleshooting SharePoint Server.