...building hybrid clouds that can support any device from anywhere
Okay Readers – we are back!
Here is the third of six posts in the MVP Spotlight Series for the Automation Track…
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:
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.
Then select the DFS Share Request list.
Then go to the List tab in the ribbon and choose Create a Workflow in SharePoint Designer from the dropdown under Workflow Settings.
This will open the SharePoint designer client on your machine, which will prompt you to title your workflow and give it a description.
Once the workflow is created you will see a blank canvas where you can add workflow steps.
Click on the Action menu and select Start Approval Process.
Click on the underlined text these usersto configure the approver for the request.
Use the dialog to select the approver in the "Participants" field and add any text or additional fields to the approval request.
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.
Click the fx field next to the input box and set the first value for comparison to Variable: IsItemApproved.
Select the value Yesfor the other comparison value.
Then in the body of the If condition, add the Set Field in Current Item action from the Actionmenu.
Choose the Statusfield.
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.
Finally, select Publishfrom the ribbon to attach your workflow to the SharePoint list.
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.
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:
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.
Single Line of text
This is the name of the request category that will appear in the listing.
This URL will point to an image resource that will represent the category.
The request content type can inherit from the generic Item content type and have the following fields.
A descriptive title for the request
A brief description of the request.
A hyperlink to the request form.
Go to the site settings screen from the site actions menu.
In the site settings screen click on the Site Content Typeslink.
Click Createon the Site Content Types screen.
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.
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.
The configuration for the new "Category Image" column is shown below.
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.
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.
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.
Choose the Descriptioncolumn to add it to our content type.
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.
Choose Custom List.
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.
Click List settings.
Click Advanced Settings.
Set "Allow management of content types" to Yes.
Now we see a section for content types on our list settings page. Click Add from existing site content types.
Select the Custom Content Types category in the drop down and add both of our newly created types.
Finally, we'll want to remove the default content type that came with the list by clicking on the Itemcontent type.
On the option page that comes up, select Delete this content type.
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.
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.
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.
Use the search box to find and edit the existing managed property, PictureURL.
Scroll down to find mapped properties section and click the Add a Mappingbutton.
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.
After the property is mapped you will need to manually re-index your site for the change to be picked up.
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.
And open the Pages library.
Create a new page using the ribbon and give it a name.
Click on the page to open it, and select Edit from the ribbon.
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.
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.
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.
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.
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.
This should complete the configuration you need to display your requests categories to your users.
And now a few notes from me (Charles)…
Be sure to check out Ryan’s session from TechEd North America 2014!
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 http://aka.ms/IntroToSMA), the great work over at the System Center Orchestrator Engineering Blog, and of course, Ryan’s Blog over at http://opalis.wordpress.com!