Automation–MVP Spotlight Series–SharePoint: DFS Share Creation Request Walkthrough (Part 2)

Okay Readers – we are back!

Here is the third of six posts in the MVP Spotlight Series for the Automation Track


–MVP Spotlight Series–

SharePoint: DFS Share Creation Request Walkthrough (Part 2)

by Mike Roberts (a Ryan Andorfer Co-Worker)


Building Self Service Requests Using SharePoint

In this post we are going to tackle the finish up the creation of the self-service request for a DFS file share by adding an approval workflow and creating an attractive request catalog page that will allow users of the self-service portal to select a request from a categorized listing.

Here (color portion) is a look at where this post fits in to the overall example Solution Architecture:

image_thumb3


SharePoint Approval Workflow

The whole goal of our self-service IT is to delegate authority with control. Frequently, sufficient logic can be incorporated into the request validation and/or the automated script to prohibit requests that would cause issues or violate policy. However, sometimes it helps to have a human review a request to ensure it is appropriate and won't cause issues. This can also be a good transition strategy when system owners are reluctant to delegate control to the resources they administer. This allows them to experience automated request processing without taking on the full risk of completely self-service requests. When automation saves time and effort, without causing problems, you can take off the "training wheels" and shift to a fully automated request model.

The process of configuring a SharePoint workflow requires the use of another client application called SharePoint Designer. This is a freely-downloadable tool available from Microsoft. First we must navigate to our request list by clicking on Site Contenton the left side of the page.

clip_image001

Then select the DFS Share Request list.

clip_image002

Then go to the List tab in the ribbon and choose Create a Workflow in SharePoint Designer from the dropdown under Workflow Settings.

clip_image003

This will open the SharePoint designer client on your machine, which will prompt you to title your workflow and give it a description.

clip_image005

Once the workflow is created you will see a blank canvas where you can add workflow steps.

clip_image007

Click on the Action menu and select Start Approval Process.

clip_image009

Click on the underlined text these usersto configure the approver for the request.

clip_image010

Use the dialog to select the approver in the "Participants" field and add any text or additional fields to the approval request.

clip_image012

Now we want to add conditional logic to set the item's status field depending on the outcome of the workflow process. When the status field is set to Approved the automation engine will know that the file share is ready to be built. To do this, select If any value equals value option from the Conditiondrop down.

clip_image013

Click the fx field next to the input box and set the first value for comparison to Variable: IsItemApproved.

clip_image014

Select the value Yesfor the other comparison value.

clip_image015

Then in the body of the If condition, add the Set Field in Current Item action from the Actionmenu.

clip_image017

Choose the Statusfield.

clip_image018

Choose Approved.

clip_image019

Now follow the same process to set the status to Rejectedif the request was not approved. This should leave you with conditional logic that looks like the screenshot below.

clip_image020

Finally, select Publishfrom the ribbon to attach your workflow to the SharePoint list.

clip_image021


Configuring the Request Catalog: List Setup

One of our requirements was to have a user-friendly interface for finding and submitting requests. It seems like we've got a handle on the submission of requests, and the next component of the solution will complete the picture. Our goal is to build an interface to allow users to browse a categorized listing of requests, like the mock-up shown below.

clip_image023

The first step in this process is setting up content types to represent the different categories and requests on our portal. I like to think of content types as a way to define a data structure in SharePoint. You can create a new content type by navigating to "Site Settings" > "Content Types" > and clicking create.


Our content types will have the following fields:

Request Category

The request category content type should inherit from the "Folder" content type. Folder is a special content type that can contain other items. This will allow us to store the requests we create within the Request Categories that are configured, both from an organizational and security standpoint.

Field

Type

Description

Name

Single Line of text

This is the name of the request category that will appear in the listing.

Category Image

URL

This URL will point to an image resource that will represent the category.

Request

The request content type can inherit from the generic Item content type and have the following fields.

Field

Type

Description

Request Name

Single Line of text

A descriptive title for the request

Request Description

Single Line of text

A brief description of the request.

Request Link

URL

A hyperlink to the request form.

Go to the site settings screen from the site actions menu.

clip_image024

In the site settings screen click on the Site Content Typeslink.

clip_image025

Click Createon the Site Content Types screen.

clip_image026

We want to create a content type for our Request Categories. By selecting Folder as the parent content type we allow our content type to contain other items. The Request Category content type can then be secured to restrict access to the requests contained within it.

clip_image028

We want to add an additional column to hold a link to an icon that can be used to represent the category visually on the homepage. Click Add from new site columnto accomplish this.

clip_image030

The configuration for the new "Category Image" column is shown below.

image

That does it for the request category content type. We also need to create a content type for individual requests within a category. To do this we will navigate back to the Site Content Types page and click Create. The request content type can just inherit from the generic Item content type.

clip_image034

Then we want to add a column to the content type to house the hyperlink to the request form. We can do this by clicking on the link as we did for the Request Category content type and configuring a hyperlink column as shown below.

clip_image036

We will also add an existing column to the content type to store the request description. There is already an existing site column that serves this purpose so this time we click Add an Existing site column.

clip_image037

Choose the Descriptioncolumn to add it to our content type.

clip_image039

Now that we've created the two content types to represent Requests and Request Categories in our request catalog we need a place for them to live. We will create a new list in SharePoint for this purpose. From the site actions menu select Add an app.

clip_image040

Choose Custom List.

clip_image041

Enter "Request Catalog" as a title for your list and click create. Then click on the Request Cataloglist form the site content view to open up the list.

clip_image042

Click List settings.

clip_image043

Click Advanced Settings.

clip_image044

Set "Allow management of content types" to Yes.

clip_image045

Now we see a section for content types on our list settings page. Click Add from existing site content types.

clip_image046

Select the Custom Content Types category in the drop down and add both of our newly created types.

clip_image048

Finally, we'll want to remove the default content type that came with the list by clicking on the Itemcontent type.

clip_image049

On the option page that comes up, select Delete this content type.

clip_image050

Now we can navigate back to our Request Catalog list page and use the new item menu to add Request Categories and Requests to our list. Remember, Requests should be created within Request Category folders so that users will see relevant requests when they open up the Request Category folder.

clip_image051

Once the list is populated we can move on to creating a way to display the categories. You can also upload images to your SharePoint site to use as icons for your request categories by linking to them from the Category Image field on each request category.


Configuring the Request Catalog: Search Configuration

Now we have a means to store and organize our requests. However, this basic list view doesn't provide the attractive user experience that was our goal. The answer to this problem is to use the "Swiss Army Knife" of SharePoint web parts, the Content by Search web part. This web part queries SharePoint's search indices for a set of data and uses display templates to render the results in a variety of different views for display to site visitors.

Because the Content by Search web part queries the search index for data to display we need to ensure all relevant data is in the search index to be queried. We do this by modifying a Managed Property. Navigate to site settings using the site actions menu and click Search Schemaunder Site Collection Administration.

clip_image052

Use the search box to find and edit the existing managed property, PictureURL.

clip_image054

Scroll down to find mapped properties section and click the Add a Mappingbutton.

clip_image056

In the dialog that pops up, enter Category in the search box and then select the entry ows_Category_x0020_Image. If this isn't an available option in the list, the reason is likely that the search indexer hasn't crawled the request category list. To speed up this process you can manually request your site be re-crawled. Once you've selected the property to be mapped, click Ok in the dialog and the property configuration page as well.

clip_image058

After the property is mapped you will need to manually re-index your site for the change to be picked up.


Configuring the Request Catalog: Page Creation

Now after all that hard work we're finally ready to configure the page that will actually display the request catalog. Go to the Site Contentspage.

clip_image059

And open the Pages library.

clip_image060

Create a new page using the ribbon and give it a name.

clip_image061

clip_image063

Click on the page to open it, and select Edit from the ribbon.

clip_image064

Place your cursor in the body of the page, go to the Insert tab on the ribbon and click Web Part. Under the Content Rollup category, select Content Searchand hit Add.

clip_image065

Initially the web part will display three random pieces of content from the site. Click in the upper right corner of the web part and select Edit Web Part.

clip_image067

In the section on the right hit the Change query button. This will allow us to target the search query that pulls back the content to be displayed.

clip_image068

We want to target our search web part to the categories we set up previously in the Request Catalog list. Choose a Items matching a content type in the "Select a query" prompt, then select the Request Categorycontent type in the "Restrict by content type" prompt. On the right you will see a dynamically generated result set based on you configuration. It should be displaying the request categories that you have populated in the Request Catalog list.

clip_image070

Set the Number of items to show to a large value so all of your request categories will be displayed, and choose Picture on top, 3 lines on bottomfrom the Item drop down, then hit apply.

clip_image072

This should complete the configuration you need to display your requests categories to your users.

clip_image074


And now a few notes from me (Charles)…

Be sure to check out Ryan’s session from TechEd North America 2014!

DCIM-B363 Automated Service Requests with Microsoft System Center 2012 R2

In this session, see a real-world implementation of a fully automated IT service catalog developed by a Fortune 500 company for supporting self-service requests. This service catalog is based in Microsoft SharePoint and utilizes the newly released Service Management Automation (SMA) engine. During the session we look at how the solution is architected, cover integration between SMA and SharePoint, build a new service offering from the ground up, and share the best practices we have developed for doing work with SMA along the way. So what’s the best part? You get access to the solution we create, so you leave with access to a working solution to help get you started!

Speakers: Ryan Andorfer, Mike Roberts

Link on TechEd NA 2014 Channel 9 Recording: DCIM-B363 Automated Service Requests with Microsoft System Center 2012 R2

And finally - As always, for more information, tips/tricks, and example solutions for Automation within System Center, Windows Azure Pack, Windows Azure, etc., be sure to check out the other blog posts from Building Clouds in the Automation Track (and https://aka.ms/IntroToSMA), the great work over at the System Center Orchestrator Engineering Blog, and of course, Ryan’s Blog over at https://opalis.wordpress.com!

enJOY!