Friday, July 31, 2009

Giving Power Users the Tools – Creating an Approval Workflow with SharePoint Designer – Part 2

Overview

Part 1 has almost all the steps you need to complete the workflow. In Part 2, I will go over the conditions for the next steps and a few possible outcome steps for an approved workflow. It is important to realize that SharePoint Workflows complete Step by Step regardless of the outcome of each step, and that a workflow will not stop unless you tell it to do so.

Conditions for Management Approval Process.

Step 1. Similar to Step 3 in Part 1. Create a New Step and rename it to Collect Management Approval.

Step 2. Set the Condition as Initiation: WorkFlow Status Equals TeamLeadApproved

Step 3. Add an action to Collect Management Approval similar to Step 4 to Step 6 in Part 1.

Step 4. Create a Step to send out email notifications called “Confirm Management Approval” Similar to Step 7 to Step 11 in Part 1. In the conditions look for the ManagementApprovalID instead of the TeamLeadID. Remember that when you compare these values you are looking up a Task by ID and not looking up the value directly.

Step 5. Make sure that you add the condition to Stop the workflow if the Management Approval equals Reject. The end result should look like this:

image

If you forget to stop the workflows and set the status then un-approved actions will execute.

Step 6. Create a new Step for the approved action. If you wish you can place conditions on this action so that it will only run if both the TeamLeadApproval and Management Approval Tasks are “Approved”, but if you have setup your workflow correctly these conditions are unnecessary. From this point you have all the different options for workflows open. You can use this process to create:

  • Calendar Entry
  • List Entry
  • Update the Status of a Document
  • Assign a Task

Thursday, July 30, 2009

Giving Power Users the Tools – Creating an Approval Workflow with SharePoint Designer – Part 1

 

Overview

I use a custom approval workflow with my most of my InfoPath forms.  The built in approval workflow is decent however when dealing with an larger organization that has many managers, its typically unacceptable to blanket approval emails and tasks at managers distribution list.  With custom workflow, I can target a specific manager and a team lead for every individual in our organization.

Multi-Step Approval Workflow Process:

Sample Steps

1.  Open up your SharePoint site with SharePoint Designer, attach the workflow to your list or document library and give it a name:

image

2.  Click “Initiation” and add Parameter “Workflow Status” as a single line of text with the default value of “NotStarted”.  I never use spaces in my parameters.

image

3.  Click Okay and then Next to go to “Step 1” and rename “Step 1” to “Collect Team Lead Approval” and Set the Conditions to Initiation: WorkFlow Status equals NotStarted.

image

4. Add the Action to Collect Team Lead Approval, add a customer form field called Team Lead Approval as a Choice with “Accept” and “Reject” as options.

image

5.  After you complete the Collect Information wizard, it will output the value to a variable.  I like to use my own descriptive variable names.  Click on Variables at the bottom and Create a new TeamLeadApprovalID variable of type List Item ID.  (Remember when you collect information you return the Task ID not the actual form field you are collecting)

image

6.  Set the Output to the new variable.  You can delete the old automatically created variable as well to keep your workflow clean and shiny!

image

7.  Create a New Workflow Step and rename it to “Confirm Team Lead Approval”.  In this step we are going to send the outgoing emails to the user with a summary.

8.  Set the Condition to compare fields and lookup the Tasks list in your site.  Look for the field label “Team Lead Approval”  This field was automatically created when you ran the Collect Information wizard. (It actually creates a New Task Content Type!)  Find the list Item by comparing the Tasks:ID field to your Variable:TeamLeadApprovalID.

image

9.  Set the Condition for Tasks:Team Lead Approval to equals Approve.

image

10.  Create two Actions.  The first action set the Initiation:WorkFlow Status to TEamLeadApproved.  For the Second Action Submit Send an email message to the person who created the entry letting them now it was approved.

11. Add an Else If condition for Rejected requests using the same instructions as above, but make sure that you add the action to Stop the Workflow or it will KEEP RUNNING.  The end result should look like this:

image

In the Next Post, I will continue with the Management Approval Process.  It’s pretty much identical to this one.

Giving Power Users the Tools – Email notification for new Tasks

 

Overview

It’s a little strange, but in some of the default Microsoft templates, email notification is turned off for Task lists.  As a rule of thumb whenever I make a site template or setup a new Task list I turn this on, its a feature that user’s expect and consistently send me an email about.

Quick Steps

1.  Open your Site and List.

2.  Click on Settings and List Settings.

image

3.  Click on Advanced Settings.

image

4.  Click on Yes beside “Send email when ownership is assigned?”

image

We need to work on making this a universal default.

Wednesday, July 29, 2009

Giving Power Users the Tools – Using InfoPath Web Based Forms to create calendar entries

Overview

I have been using InfoPath forms with SharePoint workflows for a while now but with this latest workflow, I ran into something interesting I had to create a Calendar item from InfoPath form data. 

Creating a Calendar item or a list item from a workflow is easy, you just have to have the required fields with the required data types.  Text data must go in text column and date/time fields can be used as start and stop times in a calendar entry.

However, InfoPath 2007 does not have a date/time control just a date control and a time field.  In order to pass this information together into SharePoint, the information has to be captured separately and concatenated together in the InfoPath form in a third field.  The process looks something like this.

Sample Steps:

1.  Open up your InfoPath form and create your fields.  You should probably make them all required as without the start and stop and subject fields, you can’t make a calendar entry in SharePoint.  StartDate should be a Date type and Start Time should be a Time type.  The rest of the types are self explanatory.

image

2.  Two of the fields “StartDateandTime” and “StopDateandTime” are your concatenated fields.  Make those two fields date and time type.

image

3.  Enter the default formula for the StartDateandTime fields as concat(StartDate,”T”, StartTime).  Its very important to have the T in there so its the recognized date/time format.

4.  Promote your new date/time fields.  They are ready to be used for new calendar entries.

Monday, July 27, 2009

Configure SharePoint – Disable Loopback on SharePoint WFE Servers

 

Overview

I work on a lot of different SharePoint servers and most of the time I don’t have a separate “Client” computer I can use to see how the server is responding.  Many times it will appear that SharePoint is broken because of a loopback issue in IIS.  When you browse the SharePoint site from the web front end server the server will repeatedly ask for authentication until you get a 401.1 error.  The process looks a like this:

Continuous Authentication Boxes:

image

 

Eventual failure:

image

 

Fortunately you can disable the loopback check, the process is described in Microsoft KB http://support.microsoft.com/kb/896861.  I recommend performing this on all your SharePoint servers, but at the very least the server you will be using for administration.  My recommendation is use option 2:

 

“Method 2: Disable the loopback check
Follow these steps:
  1. Click Start, click Run, type regedit, and then click OK.
  2. In Registry Editor, locate and then click the following registry key:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa

  3. Right-click Lsa, point to New, and then click DWORD Value.
  4. Type DisableLoopbackCheck, and then press ENTER.
  5. Right-click DisableLoopbackCheck, and then click Modify.
  6. In the Value data box, type 1, and then click OK.
  7. Quit Registry Editor, and then restart your computer.”http://support.microsoft.com/kb/896861.

Tuesday, July 21, 2009

Giving Power Users the Tools - Getting User Information for Web Based Infopath Forms - Part 3

In the first two parts, I add in the steps for creating a data connection to the profile service and then filtering the results for the current user. The third Part is to display the Manager Information. To do this we will be using the same process that we used in Part 1 and Part 2.


Steps:
  1. Following Part 1, create a new data source with the same configuration as GetUserProfilebyName, but called it GetUsersProfilebyNameMGR. Make sure that this data source does not query when the form is opened.
  1. Add a new text field to your InfoPath form called ManagerAccount
  1. Following Part 2, set the default value from the your GetUserProfilebyName Datasource filter the current User for their Manager’s account information:
  1. Add a rule on the ManagerAccount Field called “QueryManagerDataSource”
  1. Add an Action to set the AccountName fields value to the ManagerAccount field. The ManagerAccount field is the current field selected so it is represented by the underlined dot.
  1. Add an Action to Query using the data connection GetUserProfilebyNameMGR
  1. Click OK until back at the InfoPath form.
  2. Assign default values to the Manager fields the as in Part 2, using the GetUserProfileByNameMGR datasource.

Monday, July 20, 2009

Giving Power Users the Tools - Getting User Information for Web Based Infopath Forms - Part 2

In the first part we created the data connection, the Second Part Utilize the profile information for the three fields (Full Name, Phone Number, and Email) by filtering out the desired column about the current users.

Steps:
  1. Open the Employee Text Box and click the function ling by the default value box.
  1. Insert a field
  1. Browse to your datasource and select “Value” and then click Filter Data
  1. Add a filter
  1. In the first text box click “Select a Field or Group”, insert the Name field
  1. In the expression column select “is equal to” and in the last column type in “Preferred Name”
  1. Click OK all the way back to the InfoPath form. You have just filter out the data to show the Preferred Name. You can repeat these steps for the “WorkEmail” and “WorkPhone”


Giving Power Users the Tools - Getting User Information for Web Based Infopath Forms - Part 1

Overview


Somewhere along the way I usually end up building or troubleshooting processes in SharePoint that involve complex workflows and InfoPath forms. I use a pretty basic process for my own forms that has resulted in trouble free operation. Most of my processes require a basic header that gathers user and manager information, this is the trouble free process to do that:

Sample Form “Header”



In this post I will go though the steps to add the User’s info and follow up with Part 2 and Part 3 to create the text field default values and add the manager information.

To automatically populate your form header first Create a Data connection to the SharePoint Site to receive profile information.

Steps:
  1. Open up the data connection wizard in your InfoPath form
  1. Create a new receive data connection
  1. Select the Web Service Option
  1. Enter the following address with your server name to use the SharePoint User Profile Service
  1. Select the operation “Get User Profiles by Name”
  1. Examine the parameters, but there is nothing to add here:
  1. For a web based form there is no need to save an offline copy of the data
  1. Retrieve the data when the form is opened
  1. Click Finish and the data connection is created.


Wednesday, July 15, 2009

Working with SharePoint Designer - Creating a New Aspx page

Overview

You can create custom web pages with SharePoint designer and then attach your SharePoint master page with the look and feel of your site.

Sample Process

1. Open up your SharePoint site with SharePoint Designer.
2 . Create a document library for custom web pages.
3. Right click in the document library and select the new aspx command.

4. Right click on your Document and select Properties to change the title. (Just a good practice)




5. After saving the new title, double click on the aspx file to open the page in SharePoint Designer.
6. You can edit the page at this point or go right into attaching the master page. Usually I do my edits first and add my web part zones.
7. Add a web part zone by clicking form#form1 then selecting from the tool bar: Insert then SharePoint Controls then Web Part Zone.



8. Attach the master page by clicking on the tool bar: Format then Master Page then Attach Master Page


9.Typically you want the default master page for your site.



10. The Body is placed in the Main Place Holder, if you have other place holders on your Master page you could modify the content to go there.



11. As SharePoint Designer attaches the page you will see all the typical formatting for your site appear. Save your custom page and you are finished.


Tuesday, July 7, 2009

Capacity Planning - SharePoint SAN Disk Configuration - Please Make it Right

Overview


I have a lot of conversations with storage teams, unfortunately when most customers buy a SAN they stack on the largest drives that they can. This is part to reclaim the cost of the frame as quickly as possible, but the problem is that the larger drives have more space but the same IOPS as the smaller drives. With SharePoint Databases I like to achieve 2 IOPS per GB for Log files and Database content. I have found that this is an optimum minimum in collaboration environments with customized pages. As you know, customized pages are stored in SQL Content Databases and not cached on the Web Front End Servers. In this case I am looking at a 512GB volume for SharePoint.


When I write to these teams I try to keep it clear and break it down to:


  • Understanding IOPS for SharePoint – Understand the requirements

  • SharePoint Disk Best Practices – Get the info from an Authority

  • Performance Logs in the Current Configuration – Understand the Impact of what’s been done


After those items I follow it up with specifics that could go in a change request, but I definitely recommend including all elements.

Understanding IOPS for SharePoint

Disk Performance

IOPS are input/output operations per second and a typical 15K RPM SCSI disk has between 150 and 180 IOPS per Disk. A safe measure is to take the lowest value of 150 IOPS. To determine your IOPS per Gigabyte for a specific Disk divide the 150 IOPS by the size of the Disk. In our Current Configuration (see below) we are using 300 GB disks depending on our fill rate we could have as low as 150 IOPS / 300 GB = .5 IOPS per Gigabyte.

Raid Configuration

Raid Configuration is very important to overall performance of a volume, Raids that store parity (raid 5) information decrease overall performance of the disks while raids that stripe data between two volumes (raid 1) increase overall performance per disk. Optimally SharePoint drives are in a Raid 1+0 or a mirrored and Striped configuration.

SharePoint Disk Best Practice

My Best Practice is for SQL Server to access data at a minimum of 2 IOPS per GB. For 512GB we need 1024 IOPS.

Microsoft Recommended Configuration (SharePoint Capacity Planner)

The Microsoft Recommended Configuration for our Database volume of 512GB of content is:
SAN Array\Volume 2 (Data Files),RAID 10 (20 x 146.00 GB SCSI 15,000 RPM)
This configuration is for 10 striped disks = 1500 IOPS which Mirrored on 10 additional Disks.

Current Configuration

  • One LUSE volume of 512GB constituting 4 logical devices coming from 4 RAID groups.
  • Each RAID Group has 8 disks( 300GB ,15K RPM) in 7D+1 .

Because this is an uneven number of disks I know that it’s in a parity configuration.
In our current configuration each Raid group is capable of: 656.25 IOPS and 1.8TB of Disk which is .3645 IOPS per GB
A spanned volume does not achieve any higher performance.


Standard Calculation for Parity Disk IOPS Disks etc:
(0.8 + 4*0.2)( # desired number of IOPS)/(150 IOPS/disk) = # number of Disks
(0.8 + 4*0.2)(X)/(150 IOPS/disk) = 7
(0.8+4*.2)(X) = 1050
(1.6)*(X)=1050
X = 656.25

Performance Logs in the Current Configuration
Even the slightest usage and our disk queue length tops out:



Current Page performance is about 5 seconds to open a page which is slow to failing:

“Estimate user response time

First, determine if your organization can tolerate a slower user response time or if your organization demands a faster user response time. Response times are categorized in the following way:


  • Slow (3-5 seconds) User response times can slow to this rate without issue.

  • Recommended (1-2 seconds) The average user response time target.

  • Fast (<1 second) For organizations whose businesses demand speed. “

The response time is so slow that we are almost off of the chart. When the pages respond slowly all farm operations are slowly which in turn causes errors and make updates difficult.