Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

 

摘要

當您升級 Microsoft SharePoint 2013 到 Microsoft SharePoint 2016 時,您不必建立新的工作流程管理員安裝。您可以使用 SharePoint 2013 伺服陣列,在新的 SharePoint 2016 陣列與使用相同的安裝。

不過,您可能要建立新的安裝的工作流程管理員,在某些情況下。例如,如果您想要移動到不同的 Windows 作業系統系統的工作流程管理員,或如果後端資料庫伺服器已退役。在這些情況下,請依照下列工作流程管理員嚴重損壞修復,以建立新的工作流程管理員安裝使用舊的資料庫中的步驟。請確定您使用的工作流程管理員資料庫的最新副本。

背景

當您使用 SharePoint 伺服器以及工作流程管理員時,則工作流程管理員會保存已發佈的工作流程的 SharePoint 網站的記錄。每個站台是在 [工作流程管理員] 中以表示範圍。工作流程定義、 所有的工作流程執行個體,以及其狀態,也會儲存工作流程管理員。

SharePoint 會儲存工作流程的歷程記錄和 SharePoint 工作流程的工作流程工作資訊。當載入工作流程狀態頁面時,SharePoint 會先將呼叫至工作流程管理員,查看工作流程是否存在。若要這麼做,它會使用工作流程執行個體識別碼。然後,SharePoint 會載入其餘的工作流程資訊。如果工作流程執行個體 ID 已遺失管理員 」 中的工作流程,或是使用 [工作流程管理員通訊期間發生錯誤,您會收到錯誤訊息。

升級 SharePoint 2013 SharePoint 2016 透過工作流程管理員

先決條件

  • 使用 Web 平台安裝程式 (Web PI),以安裝最新累積更新的工作流程管理員。

  • 工作流程管理員用戶端的最新版本 SharePoint 2013 在伺服器上安裝,並確定所有的工作流程可正常運作。

  • 安裝 SharePoint 2016 陣列,及升級所有的服務應用程式和內容資料庫。

  • 所有的 SharePoint 2016 伺服陣列伺服器上安裝最新版的工作流程管理員用戶端使用 Web PI。

註冊工作流程管理員與 SharePoint 2016

若要執行這項操作,請參考下列步驟:

  1. 在 [SharePoint 2013 伺服陣列中,移至管理中心>應用程式管理>管理的服務應用程式,然後再刪除工作流程服務應用程式 Proxy

  2. 在 SharePoint 2016 伺服陣列中,執行下列 PowerShell cmdlet 到對 SharePoint 2016 加上相同的工作流程管理員安裝:

    Register-SPWorkflowService –SPSite <SharePoint site URL> –WorkflowHostUri <Workflow service endpoint URL> -force

注意請注意,新的 SharePoint 2016 伺服陣列中已升級的內容資料庫應該已經還原從最新的備份。這有助於防止差異和工作流程管理員與內容資料庫之間的間隔。

在升級之後,您可能會遇到的常見問題

網站 URL 已變更的問題 1:

如果您的網站 URL 已在 SharePoint 2016,但網站識別碼保持不變,您必須使用 SharePoint 設計工具來重新發佈工作流程,從受影響的網站。

問題 2: 在某些網站上,不要啟動工作流程

如果在某些網站上,不要啟動工作流程,重新發佈的工作流程,從受影響的網站。或者,您也可以執行重新整理受信任的安全性語彙基元服務中繼資料餵送計時器工作。

問題 3: 工作流程失敗並傳回 「 無法取得應用程式主要使用權限資訊 」 的錯誤

狀況

請考慮下列情況:

  • 您擁有 SharePoint 2013 工作流程和工作流程管理員設定您的伺服陣列中。

  • 陣列中的網站最近連接到現有的例項的工作流程管理員。

在這個案例中,您連線到工作流程管理員安裝後所建立的工作流程會順利完成。不過,不完成之前您連線到工作流程管理員建立的工作流程。相反地,它們會卡當他們嘗試完成,否則它們仍處於暫停狀態。保持為已暫停的工作流程,您會收到 HTTP 500 錯誤。此外,ULS 記錄檔會記錄下列項目:

無法取得應用程式主要使用權限資訊。


原因

工作流程管理員已經有工作流程執行所在的站台的範圍。範圍有不正確的SPAuthenticationRealm值範圍的ApplicationID欄位中,因為沒有SPAppPrincipal類別存在於符合ApplicationID的值範圍的 SPWeb 物件。因此,工作流程會失敗並傳回錯誤訊息。

解決方案

要解決這個問題,請使用下列 PowerShell 命令來註冊新的SPAppPrincipal物件。要這麼做,其識別碼符合ApplicationID值儲存在SPWeb物件在 [工作流程管理員] 中的範圍中的SPWeb物件上。

#Variables
$webUrl = "http://sp.contoso.com/sites/teamsite/teamweb"
$oldAuthRealm = "58a2b173-0f88-4bff-935b-bf3778cd0524" #authentication realm expected by Workflow Manager
$newAuthRealm = "48834d17-d729-471e-b0d0-a0ec83b49de0" #authentication realm of current farm

#Get the SPWeb and SPSite objects, and the id of the web
$web = Get-SPWeb $webUrl
$site = $web.site
$clientId = $web.Id

#Create the old and new app principal ids
$oldAppId = "$clientId@$oldAuthRealm"
$newAppId = "$clientId@$newAuthRealm"

#Register the app principal with the old authentication realm
Register-SPAppPrincipal -DisplayName "Old Workflow" -Site $web -NameIdentifier $oldAppId

#Set permissions for the app principal
$oldAppPrincipal = Get-SPAppPrincipal -Site $web -NameIdentifier $oldAppId
Set-SPAppPrincipalPermission -Site $web -AppPrincipal $oldAppPrincipal -Scope SiteCollection -Right FullControl
Set-SPAppPrincipalPermission -Site $web -AppPrincipal $oldAppPrincipal -Scope Site -Right FullControl

#List the app principals with the old and new authentication realms in the ids
Get-SPAppPrincipal -Site $web -NameIdentifier $oldAppId | fl
Get-SPAppPrincipal -Site $web -NameIdentifier $newAppId | fl
 
其他資訊

若要取得儲存在範圍中的ApplicationIDSPAuthenticationRealm值,請依照下列步驟執行:

  1. 執行下列的 SQL 查詢:

    SELECT *
    FROM [WFResourceManagementDB].[dbo].[Scopes] WITH (NOLOCK)
    WHERE Description like '%<WebID>%'


    附註<WebID> 是 SPWeb 物件 ID 的預留位置。

  2. 在查詢結果中,按一下以開啟 [SQL Server Management Studio 中的 [在個別的索引標籤上的 XML 的 SecuritySettings 欄中的值。

  3. 在 [XML 檔,找出包含值的ApplicationID項目。例如,找出下列項目:

    <ApplicationId>SPWeb_object_ID@SPAuthenticationRealm</ApplicationId>

    注意出現之前的 GUID at 符號 (@) 是 SPWeb 物件中,ID 和 GUID 出現之後 at 符號做為SPAuthenticationRealm的值。

或者,您可以在下列的範例記錄檔項目,例如找到 ULS 記錄檔中的SPAuthenticationRealm值:

11/03/2017年 12:13:16.72 w3wp.exe (SPWFE01:0x51FC) 0x1298 SharePoint 基礎驗證授權 an3eg 中無法取得應用程式主要使用權限資訊。AppId=i:0i.t|ms.sp.ext|< SPWeb 物件識別碼 > @< SPAuthenticationRealm >
 
11/03/2017年 12:13:16.72 w3wp.exe (SPWFE01:0x51FC) 0x1298 SharePoint 基礎一般 8nca 中的應用程式錯誤時存取 /site/teamsite/teamweb/_vti_bin/client.svc,錯誤 = 物件參考未設定至的 o 執行個體物件。  在 [在 Microsoft.SharePoint.SPAppRequestContext.InitCurrent (HttpContext 內容),在 Microsoft.SharePoint.SPAppRequestContext.EnsureTenantPermissions SPServiceContext serviceContext、 throwIfAppNotExits 布林 (布林 allowFullReset)在 Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.PostAuthenticateRequestHandler (物件 oSender,EventArgs ea) 在 Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.InitCurrentAppPrincipalToken (HttpContext 內容)在 System.Web.HttpApplication.ExecuteStep 的 System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() (IExecutionStep 步驟,布林值和 completedSynchronously)

Need more help?

擴展您的技能

探索訓練 >

優先取得新功能

加入 MICROSOFT 365 測試人員 >

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?

Thank you for your feedback!

×