0

We are using SP2013 on-premise enterprise edition. Recently we patched our farm and receive this error:

Error UpgradeWorkflowServiceActivities. Run Copy-SPLocalActivitiesToWorkflowService manually to complete this action.

So I tried to fix it by the PowerShell according this question.

I ran following:

$credential = [System.Net.CredentialCache]::DefaultNetworkCredentials
$site = Get-SPSite("https://sites.sharepoint.com/")
$proxy = Get-SPWorkflowServiceApplicationProxy
$svcAddress = $proxy.GetWorkflowServiceAddress($site)
Copy-SPActivitiesToWorkflowService -WorkflowServiceAddress $svcAddress -Credential $credential -Force $true

I ran above script on SPWEB01 (we also have SPWEB02, SPAPP01, SPAPP02, two OWA server and 1 SQL) The last command return follow error:

Copy-SPActivitiesToWorkflowService : Scope '/SharePoint' was not found. HTTP headers received from the server - ActivityId: f2122b2c-5f0b-4c58-a8d9-3bb283e39561. NodeId: SPAPP01. Scope: /SharePoint. Client ActivityId : b69d9ccf-051f-48c7-8985-bdfe37d887c4. At line:1 char:1

I have no clue what it means. Could I have your advice?

[UPDATE]: I found following in the upgrade error log. Seems related with the issue:

SharePoint Foundation Upgrade UpgradeWorkflowServiceActivities (15.0.6.0) 0 WARNING Error UpgradeWorkflowServiceActivities. Run Copy-SPLocalActivitiesToWorkflowService manually to complete this action. Error: Microsoft.Workflow.Client.WorkflowEndpointNotFoundException: Unable to connect to the remote service at http://SPAPP01:12291/SharePoint/. See InnerException for more details.

I can browse http://SPAPP01:12291/ but return 404 no found for http://SPAPP01:12291/SharePoint/

1 Answer 1

2
+50

It looks like at some point, you tried to configure Workflow Manager to work with SharePoint (so you can create/deploy/use 2013 mode workflows). To do so, you set up Workflow Manager (a dedicated -free- product) and then connected SharePoint to it.

Workflow Manager generally sets up on http://<WFserver>:12291/, where WFserver is the Web server you install Workflow Manager on (could be a dedicated one, apart from SharePoint farm).
Once Workflow Manager is installed, on the SharePoint side (i.e. from any SP server), you run Register-SPWorkflowService -SPSite "http://WebAppUrl" -WorkflowHostUri "http://WFserver:12291" -AllowOAuthHttp.

So, it seems to me that:

  • Either you did configure Workflow Manager right, but after that the URL http://<WFserver>:12291/SharePoint (note however I doubt you did create it under /SharePoint) has been dropped for any reason.
  • Or you never actually installed Workflow Manager and someone only tried to do so, inexpertly, and only ran Register-SPWorkflowService -SPSite "https://sites.sharepoint.com" -WorkflowHostUri "http://SPAPP01:12291/SharePoint" -AllowOAuthHttp. [actually not the case since you ping http://SPAPP01:12291]
  • Or you did install Workflow Manager and someone registered a bad URL in SP, when running Register-SPWorkflowService -SPSite "https://sites.sharepoint.com" -WorkflowHostUri "http://SPAPP01:12291/SharePoint" -AllowOAuthHttp.

IMO, the point is: if you never used 2013 mode workflows and don't intend to use them, you need to remove that registration... I'll look now on how to do it.

EDIT
OK, so it looks like there's no way to remove the binding to Workflow Manager! See for instance https://social.technet.microsoft.com/Forums/office/en-US/7576a5a1-4774-4a29-9562-28ce1a26fb80/what-is-opposite-of-registerspworkflowservice?forum=sharepointadmin.
So, here are your options:

  • Either remove completely the Workflow Service Application Proxy from CA (as suggested in the last post of mentioned MSDN forum).
  • Or, as it looks like WF Manager is installed at http://SPAPP01:12291, re-run Register-SPWorkflowService with the -force parameter:
    Register-SPWorkflowService -SPSite "https://sites.sharepoint.com" -WorkflowHostUri "http://SPAPP01:12291" -AllowOAuthHttp -Force
5
  • I am sure workflow manager (2013 mode) is installed but no workflow is built on it yet. However I don't know the detail steps the guys had performed.
    – Mark L
    Jan 27, 2016 at 9:46
  • I suspect it was miss-configured. As you don't use 2013 WF, you never spoted the problem.
    – Evariste
    Jan 27, 2016 at 9:52
  • I checked the install manual. It mentioned wf manager should be installed on App server SPAPP01 but run Register-SPWorkflowService -SPSite "http://SPWEB01" -WorkflowHostUri " http://SPWEB01:12291". How can I verify the register value and correct it? I am not 100% he followed his install manual
    – Mark L
    Jan 28, 2016 at 7:03
  • The web application has an AAM http://SPWEB01 when the farm and workflow manager was setup. Later it is changed to sites.sharepoint.com so workflow manager not work. So by follow your suggestion Register-SPWorkflowService -SPSite "https://sites.sharepoint.com" -WorkflowHostUri "http://SPAPP01:12291" It is fixed. No need delete the proxy.
    – Mark L
    Jan 28, 2016 at 8:43
  • For future reference, I follow this answer, it return https://sites.sharepoint.com/SharePoint. So I think by default a "Scope" SharePoint will be added, although I don't have idea what is a "Scope".
    – Mark L
    Jan 28, 2016 at 8:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.