SharePoint How-To Series: Enabling Workflow

SharePoint How-To Series: Enabling Workflow

Let’s imagine you have a nice new SharePoint 2013 environment. You open SharePoint Designer to create a new 2013 Workflow, only to find that you are only prompted for creating 2010 ones instead. Here's what to do.

In our last two posts in this series we walked through the use of PowerShell as part of the administration toolkit. In addition to using PowerShell for Administration, there are times when it needs to be used for setup and configuration of certain features.

So, let’s imagine you have a nice new SharePoint 2013 environment. You open SharePoint Designer to create a new 2013 Workflow, only to find that you are only prompted for creating 2010 ones instead.

It is then you realize that you need to set up Windows Workflow Components for this to work. To do this, download the latest “Microsoft Web Platform” installer. The easiest way to get this is open up Internet Information Services (IIS) and expand the server. You will then be prompted to “get started” with the installer.

Simply click “Yes” and you will be taken to the Microsoft Web Platform site ready to download the installer.

Click the “Free Download” link and save the installer somewhere on your server. Once it is downloaded, click the file and launch the installer.

The installer will launch, set up the basics, and then present you with a list of options.

At this point we could start searching for and installing the required items, but things here can get a little funny and end up breaking. You could also type “Workflow” or “Service Bus” in the search bar to get the needed items to display.

Instead, we are going to use command lines to complete this setup.

To download any of the components using the command line, we use the following format:

 

Webpicmd /offline /Products:”Product Name” /Path:”Path Location

 

To download the components above you can use the following commands. I am using the following location: “C:\Components\Workflow\” to download into.

 

Webpicmd /offline /Products:ServiceBus /Path: C:\Components\Workflow\ServiceBus
Webpicmd /offline /Products:WorkflowClient /Path: C:\Components\Workflow\Client
Webpicmd /offline /Products:WorkflowManagerRefresh /Path:C:\Components\Workflow\Manager

 

Make sure you download the Service Bus 1.0 Cumulative Update using the link below and drop that in the same folder structure.

http://www.microsoft.com/en-us/download/details.aspx?id=36794

The folder structure I am using looks like this now that it is fully populated with the downloaded files.

Now we can use simple command line or PowerShell commands to install these components in the order they are needed.

Command Line

WebpiCmd.exe /Install /Products:Product to Install /XML:XML Definition Location /AcceptEula /SuppressPostFinish

PowerShell

Start-Process -FilePathPath to WebpiCmd” -ArgumentList “/Install /Products:”Product to Install” /XML:”XML Definition Location” /AcceptEula /SuppressPostFinish” -Wait –PassThru

 

As an example, if we were installing the “Service Bus” components, both commands could be used.

Command Line

WebpiCmd.exe /Install /Products:ServiceBus /XML:C:\Components\Workflow\ServiceBus\feeds\latest\webproductlist.xml /AcceptEula /SuppressPostFinish

PowerShell

Start-Process -FilePathC:\Program Files\Microsoft\Web Platform Installer\WebpiCmd.exe” -ArgumentList “/Install /Products:ServiceBus /XML:C:\Components\Workflow\ServiceBus\feeds\latest\webproductlist.xml /AcceptEula /SuppressPostFinish” -Wait –PassThru

The components need to be installed in the following order:

  1. Service Bus
  2. Service Bus Update
  3. Workflow Client
  4. Workflow Manager

Once you have installed all of the components, you can run the core wizard and set up the Workflow Farm, or you could PowerShell Script the entire process. The PowerShell is a little more complicated, but the key is it is repeatable. The core PowerShell commands being used to configure the Workflow Manager and Service Bus components are:

New-SBFarm

New-WFFarm

Add-SBHost

Add-WFHost

Each command requires various parameters and properties. Once it is completed you should end up with a fully configured Workflow Manager and Service Bus engine.

Now the final step is to connect it up to SharePoint. This done once again using PowerShell commands. This time it is “Register-SPWorkflowService”.

Register-SPWorkflowService -SPSite "http://{SharePoint Site URL} " -WorkflowHostUri "http://{Workflow URL}:{Port}" –AllowOAuthHttp

The above command will configure the Workflow Components to be connected to SharePoint over HTTP; if you wanted to us HTTPS you would specific a different port and protocol.

HTTP

Register-SPWorkflowService -SPSite "http://{SharePoint Site URL} " -WorkflowHostUri "http://{Workflow URL}:12291" –AllowOAuthHttp

HTTPS

Register-SPWorkflowService -SPSite "http://{SharePoint Site URL} " -WorkflowHostUri "http://{Workflow URL}:12290"

And there you have a fully working SharePoint 2013 Workflow Environment. When you open SharePoint Designer now it should now display 2013 as well as 2010.

PowerShell also allows us to delve further into the Workflow Services by using some simple commands:

 

Command

 

More details can be found on Microsoft TechNet about each command.

 

https://technet.microsoft.com/en-us/library/ee906558.aspx

 

As you can see, there is great power by using PowerShell—for everything from Configuration, Setup, Monitoring and then implementing other components such as Workflow into SharePoint.

 

In our final post we will move into general administration using both the User Interface and PowerShell.

 

Don’t forget the upcoming webinar on SharePoint Administration, where we will cover even more. You can register using the link below.

 

http://sharepointpromag.com/sharepoint-admin-101?promo=UM_WPBLK

 

 

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish