Wednesday, November 11, 2015

Installing and configuring Workflow Manager Step By Step for SharePoint 2013

Hi Mates,

Here i am with another post. It took me almost 6 hours to install, troubleshoot and configure the Workflow Manager for Workflow Service Application in SharePoint 2013 properly. There are many blogs to configure it and most of them just cover the major steps not the errors that could occur.

Update: Before you move ahead with installation, you must check this post otherwise you could get in trouble after installing it in your farm.

I would really like you to visit this blog.
It helped me a lot to configure Workflow Manager. Thanks man.

So, lets begin...!

First thing to consider is, where to install the Workflow Manager in SharePoint 2013 Farm?

So now I have 2 WFE, 2 APP Servers and 1 DB server. You should install it on APP servers only. In case you have less resources, you can install on WFE servers too but not on DB server. Lets keep that server away from hosting any services. Like SharePoint, Workflow Manager also makes itself a farm. For example, the first server on which you'll install the Workflow Manager would be the CA for Workflow Manager. You can join the other servers to this Workflow Manager CA server by selecting the joining option while running the Workflow Manager Setup.

If you want to install the prerequisites manually, you must check this post by Microsoft. Or you can choose the simple way of installation using WPI (Web Platform Installer).

1. Download Web Platform Installer from here.
http://www.microsoft.com/web/downloads/platform.aspx

2.  Run the downloaded setup of WPI.  

   

3. Search for these apps and click install. Your total apps count will be listed at the bottom right corner and install as below.



(I am copying the screenshot from another blog so no need to worry about the versions difference. )







 In this section, you should provide the service account name which you have created for Workflow Service Application. As i have told, i have copied these screenshots because i have installed already on my machine, i cannot make it edit. So ideally you should be using (for example) Domain\SPWorkFlowMGR service account if you have created. Otherwise you can use the Farm account here in place of WorkFlow Manager account.


Check "Allow Workflow management over HTTP on this computer" option as your system is not configured for HTTPS. This is really a tricky part. If you do not check this check box , you'll have to make a binding manually in IIS for the target site (See Example Below). Microsoft do not recommends to enable HTTP support in production environment. See a small note made by Microsoft here in this article.


IIS Binding Example
(I had to bind the http one manually in IIS otherwise it was giving me an error later on in PowerShell)


Perform an IIS reset



I refreshed the page and found the same error i saw after configuring Workflow Service Application in Central Administration.


I tried to browse my SharePoint site with port numbers but no gain.


I ran the below command which game me error.
Register-SPWorkflowService -SPSite "http://MySite" -WorkflowHostUri "http://MyAPPServerName:12291" -AllowOAuthHttp -Force

Register-SPWorkflowService : Unable to connect to the remote service at
http://MyAPPServerName:12291/SharePoint/. See InnerException for more details.
Client ActivityId : 7391a59f-4e3d-4603-aa73-52b480d08636.
At line:1 char:1
+ Register-SPWorkflowService -SPSite "http://MySite" -WorkflowHostUri
"http://pr ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
    + CategoryInfo          : InvalidData: (Microsoft.Share...WorkflowService:
   RegisterSPWorkflowService) [Register-SPWorkflowService], WorkflowEndpointN
  otFoundException
    + FullyQualifiedErrorId : Microsoft.SharePoint.WorkflowServices.PowerShell
   .RegisterSPWorkflowService


Screenshot Here


The other error message i got later on was below


Register-SPWorkflowService : Unable to connect to the remote service at http://MyAPPServerName:12291/SharePoint/. See InnerException for more
 details. Client ActivityId : ce9ff6bc-b517-4eb7-9fb1-ea0197e2a3c4.
At line:2 char:1
+ Register-SPWorkflowService -SPSite "http://MySite/" -WorkflowHostUri "http ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (Microsoft.Share...WorkflowService:RegisterSPWorkflowService) [Register-SPWorkflowService], Workfl 
   owEndpointNotFoundException
    + FullyQualifiedErrorId : Microsoft.SharePoint.WorkflowServices.PowerShell.RegisterSPWorkflowService
So as a fix i have done below steps:

1. Restart my Server
2. Open IIS and check if the proper binding exists for the mentioned ports. i.e I have mentioned above for adding binding port manually. Like below...


Read this post to get more information on this issue.

3. Run the below command and it worked fine.

Register-SPWorkflowService -SPSite "http://MySiteName/MySubsite" -WorkflowHostUri "http://MyAPPServerName:12291" -AllowOAuthHttp -Force


I have used my server name on which i have installed the WorkFlow services as the -WorkflowHostUri  above with the port number (currently which is hosting CA and hosting Workflow service) and it worked fine for me.

Now my CA shows the Workflow Service Application like this.


If you want to check weather the the service is running or not, open IE as administrator.

Tip:   You don't get the run as Admin option for IE if your server OS is Windows Server 2012 and
to open IE with run as Admin privileges you need to navigate to folder where the IE is installed 
C:\Program Files\Internet Explorer then open iexplorer.exe  as Admin

Browse the site and it should output an xml.






Bingo...Yeah...!

Happy SharePointing...!




4 comments:

  1. HI, I followed your steps . Excellent . It helps me a lot. Thank you .
    I am from India

    ReplyDelete
    Replies
    1. I am glad it helped you. :) Thank you.

      Delete
  2. Great help, thanks a ton! In my case, restart was not necessary but just needed to have -WorkflowHostUri with the server name and add -Force

    ReplyDelete
  3. hi, i followed all your step, but error still here. could you help me whit another solution. thanks

    ReplyDelete