Posts Tagged ‘SharePoint’

4 Clicks or 1? Using jQuery to Start a SharePoint Workflow.


19 Apr
No Gravatar

The IT Urgent Change process needs to be automated.  It’s relatively simple and after gathering the requirements its clear that this can be accomplished using SharePoint and a SharePoint Designer workflow.  The workflow is created and published to the list.  The decision is made that the workflow will be started manually as opposed to automatically when the Change Request is created.  Everyone in IT has contribute access to the list and there are no security requirements related to who can or can’t start a workflow.

This means a user must take the following steps to initiate the workflow:

1. Click the context menu and click the Workflows menu item

2. Select the Change Process Workflow.

3. Initiate the Workflow

That’s a few more clicks than should be required so I wanted to find a way to make starting a workflow a one-click affair.  I knew this should be relatively simple with jQuery and the Dataview Web Part so I’d like to detail how I accomplished this so others can hopefully benefit from it.

The end result looks like this:

When the user clicks the Start Workflow link they see a nice Ajax loading image as seen below:

When the workflow has been initiated they are presented with a confirmation message telling them the process is underway:

On to the solution!  First I need to give a shout out to Marc Anderson , the creator of the jQuery Library for SharePoint Web Services which can be found here: http://spservices.codeplex.com/.  This is such a handy tool for interacting with the SharePoint web services from the client and this was my first opportunity to use it.  I simply downloaded the JS files and put them in my SharePoint Scripting Resource Centre site collection as first conceived by Mark Miller at EndUserSharePoint.com.  The original post can be found here: http://www.endusersharepoint.com/2010/01/05/build-a-sharepoint-scripting-resource-center/

Once that was done I need to do a few things.  I created a Web Part Page and opened SharePoint Designer.  I then added the Change Request list to one of the web part zones.  In order to get the customizations that wanted needed to create a DataView out of it so I simply right clicked on the list and converted it to a XSLT Dataview.   That’s all I really need to do here so I saved the page and opened it up in the browser.  What you can do with a dataview is almost limitless.  The best way to tackle customizations is to make all the changes you can using the SPD interface.  Once you have reached the limits of what you can do there you can start customizing the XSL.  Refer to the following series by Marc to learn everything you need to know about XSL and the DVWP.  http://www.endusersharepoint.com/2010/01/19/unlocking-the-mysteries-of-data-view-web-part-xsl-tags-part-1-overview/

When you modify a dataview in the browser you have a different set of options then when you work with a regular list.  The important thing we want to do here is modify the XSL in order to achieve the look and functionality we want.

In the interests of saving my sanity I copied the XSL and pasted it into SharePoint Designer (just a new XML document) so I could at least have the benefit of some colour in my life.  I added the following snippet  which I’ll explain as I go.

<xsl:if test=”not(normalize-space(@ChangePr) = ’5′ or normalize-space(@ChangePr) = ’2′)”>

<div>

<xsl:attribute name=”id”>

<xsl:text>WorkflowDiv</xsl:text>

<xsl:value-of select=”@ID” disable-output-escaping=”yes”/>

</xsl:attribute>

<a href=”#”>

<xsl:attribute name=”onclick”>

<xsl:text>javascript:StartWorkflow(‘</xsl:text>

<xsl:value-of select=”@EncodedAbsUrl” disable-output-escaping=”yes”/>

<xsl:text>’,'</xsl:text>

<xsl:value-of select=”@ID” disable-output-escaping=”yes”/>

<xsl:text>’);</xsl:text>

</xsl:attribute>

Start Workflow</a>

<img style=”visibility:hidden” src=”http://employeeportal/sites/sprc/PublishingImages/ajax-loader.gif”>

<xsl:attribute name=”id”>

<xsl:text>Loader</xsl:text>

<xsl:value-of select=”@ID” disable-output-escaping=”yes”/>

</xsl:attribute>

</img></div>

</xsl:if>

The result I want to achieve with this is another column in the dataview with the “Start Workflow” link that will call a Javascript function and passes in a few parameters and uses the jQuery Library for SP Web Services to kick off the workflow.

The following section says that we’re only going to render the link when the workflow is not complete or cancelled.  When you covert a list view to a dataview your workflow column which normally reads “In Progress’, “Completed” etc. switches to the numerical value.  Why?  I haven’t a clue.  But the easiest way is to use SPD to create some conditional formatting and then just copy the XSL that is generated.

<xsl:if test=”not(normalize-space(@ChangePr) = ’5′ or normalize-space(@ChangePr) = ’2′)”>

You can see that the 2 values we pass to our StartWorkflow function are the EncodedAbsUrl and the ID of the list item in question.  The EncodedAbsUrl for a list item looks like this: http://servername/sites/its/Lists/Change%20Request/107_.000.   We also output a hidden image with our nice loading image downloaded from http://www.ajaxload.info that will appear beside each item while the workflow is initiating.

Also note that our loading image and the div that wraps everything have an id property that concatenates on the list item id to it that we’ll use in our client side script.

On to the jQuery.   We need to add a Content Editor Web Part to our page and place the following script inside:

Our jQuery and jQuery Web Services references

<script type=”text/javascript” src=”/sites//sprc/Resources%20%20jQuery/jquery-1.3.2.min.js”></script>

<script  type=”text/javascript” src=” /sites/sprc/Resources%20%20jQuery/jQuery%20SP%20Services/jquery.SPServices-0.5.4.min.js”></script>

<script type=”text/javascript”>

function StartWorkflow(ItemURL, ItemID)

{

var loadingImage = ‘Loader’ + ItemID

var workflowDiv = ‘WorkflowDiv’ + ItemID

//Show our loading image

document.getElementById(loadingImage).style.visibility = ‘visible’;

$().SPServices({

operation: “StartWorkflow”,

item: ItemURL,

templateId: “{04ee1c93-f6b7-49b3-a79c-fa3142ecd688}”,

workflowParameters: “<root />”,

completefunc: function() {

document.getElementById(workflowDiv).innerHTML = ‘Workflow Started’;

}

});

}

</script>
As you can see there is very little scripting required here.  We take the URL of the list item and the item id.  We then show the loading image and make the web service call through Marc’s library:

There are 4 parameters.

  1. The operation is “Start Workflow”
  2. The URL is the value of the EncodedAbsUrl for the list item mentioned earlier.

The template id is the guid of the workflow template that we created in SharePoint Designer.  You can find this out by following the first 2 steps at the very beginning of this article and then copying the URL from your browser.  It will look something like this: http://servername/sites/its/Workflows/Change%20Process/Change%20Proce.aspx?List=d0fa2d98-6086-4c97-be85-4746c801e7f3&ID=89&TemplateID={04ee1c93-f6b7-49b3-a79c-fa3142ecd688}&Source=http%3A%2F%2Femployeeportal%2Fsites%2Fits%2FLists%2FChange%2520Request%2FAllItems%2Easpx.  You can see that there is a TemplateID value in the query string and that’s what we want

  1. Our workflow doesn’t have an initiation screen so we simply pass it an XML node.  You have to do this or the workflow will throw an exception.  This took some digging to find out why the workflow wouldn’t start.
  2. completefunc – what we want to happen when we’re done.  In this case we just want to get rid of the image and let the user know the workflow started.  Remember that AJAX is asynchronous so if you try to take post-initiation actions with code inline it will actually run prior to the workflow having been started.  If you want something to happen after the call to the SPServices library is done, put it in the completefunc.

There is no error handling in this solution yet but if you go to Marc’s Codeplex site you can see methods on how you can have error information returned and then trap them. It’s pretty straightforward.

That is how I used, jQuery, the jQuery Library for SharePoint Web Services and the DataView Web Part to allow a workflow to be started with one click.

VN:F [1.9.21_1169]
Rating: 10.0/10 (4 votes cast)
VN:F [1.9.21_1169]
Rating: +1 (from 1 vote)

jQuery vs Webparts solution


26 Mar
No Gravatar

As I mentioned in my last post, I had to come up with a simple way of fetching an employee’s phone number and allowing them to update it through SharePoint. I contemplated developing a web part that would interact with the HR system but with the length of time a deployment can take I thought that it might be simpler to use jQuery. This way I don’t have to develop and deploy any custom .Net code. I simply have to write some HTML and jQuery and embed that into the page.

A few caveats. Security is not really an issue here. There is no requirement to ensure that people can only update their own phone number. Although since there is a mapping between a user’s AD account and their HR Employee ID that logic could easily be handled in the web services if required. The other is the fact that cross-domain scripting is not supported so your HTML page will need to be on the same server as the web services.

The last caveat is that the page is hideous and logic is sketchy – this was only a POC to demonstrate a different approach to tackling these types of problems.

How the page works is that a user loads the page and is presente d with a textbox and a button. They enter their Employee ID into the text box and click the button. This uses ajax to call a .Net ASMX web service called EmployeeInfo which accepts the Employee ID in the form an integer and returns an Employee object.  We then simply render that on the screen, hide that button and show another one.  The user can then enter a new phone number in the textbox, click the button which calls the UpdatedEmployee Web Service.  This web service accepts the Employee ID and Phone Number and returns a Response object that has a property called ResponseStatus which we can check in our client code.

This first thing if of course to add a reference to our jQuery library which is stored in a SharePoint library.

<script type=”text/javascript” src=”<url>/jquery-1.3.2.min.js”></script>

What follows is the HTML code which is simple – and hideous.

<div id="instructions">Enter Employee ID</div>
<div id="controls">
<input id="txtEmployeeID" type="text" />
<input type="button" value="Search" id="Button1" onclick="CallWebService('http://<url>/Service.asmx/EmployeeInfo', document.getElementById('txtEmployeeID').value, '')" />
<input type="button" value="Update Phone Number" id="btnUpdate" onclick="CallWebService('http://<url>/Service.asmx/UpdateEmployee', _employeeid, document.getElementById('txtEmployeeID').value, '')"
style="display:none;" />
</div>
<div id="loadingDiv" style="display:none"><img src="http://jaymoss/PublishingImages/ajax-loader.gif" /></div>
<div id="ResultSet"></div>

It’s very straightforward. A textbox to enter the Employee ID and a button to request the employee information. Another button to submit the phone number back for updating and a few DIV tags to control formatting.  You can see  in the onclick events of the buttons that we are calling the same Javascript function and passing in different parameters.  Below is the code that int.eracts with the .Net web services.

I don’t want to spend too much time on the simple logic so I’ll focus on the Ajax piece.  All you need to do is call the AJAX function and pass in the correct parameters.  The url parameter is the actual url of your web service.   The data is returned in JSON.  More information on decorating your web services to be compatible with this format is located here: http://stackoverflow.com/questions/211348/how-to-let-an-asmx-file-output-json.

var data;

function CallWebService(url, employeeid, phonenumber)

 if (phonenumber.length == 0)

 {

 data = “{‘employeeid’:'” + employeeid +”‘}”;

_employeeid = employeeid;

}

else

{

data = “{‘employeeid’:'” + employeeid + “‘, ‘phonenumber’: ‘”+ phonenumber +”‘}”;

$(‘#ResultSet’).attr(‘style’, ‘display:none’);

$(‘#loadingDiv’).attr(‘style’, ‘display:block’);

$(‘#controls’).attr(‘style’, ‘display:none’);

}

$.ajax({

type: “POST”,

url: url,

contentType: “application/json; charset=utf-8″,

data: data,

dataType: “json”,

success: success,

error: ajaxFailed

});

}

Since our web services accept parameters we pass them in the data parameter.  All you really need to know is that the format is {‘parameter’:'value’}.  Multiple parameters are separated by commas.  You can pass arrays as well which is well documented online.

The last two parameters are the function to be called if the call is successful and if it fails.  In our case the success function is creatively named “success” and the error function is called “ajaxFailed”  below are the functions themselves.

Side note:  I’m having a hard time concentrating on this post because I’m watching all the pre-fight hype of the GSP vs Dan Hardy fight.  This is going to be ugly.  Dan Hardy doesn’t have a prayer but I digress.  Update:  I can’t believe it went the distance.

function success(data, status)

{

hideLoader();

if (data.d['ResponseStatus'] == “Success!”)

{

alert(‘Employee Phone Number Successfully Updated’);

$(‘#controls’).attr(‘style’, ‘display:none’);

}

else

{

$(‘#ResultSet’).html(data.d['EmployeeName'] + ‘ <br> ‘ + data.d['PhoneNumber']);

$(‘#txtEmployeeID’).attr(‘value’, ”);

$(‘#Button1′).attr(‘style’, ‘display:none’);

$(‘#btnUpdate’).attr(‘style’, ‘display:block’);

}

}

function ajaxFailed(xmlRequest)

{

hideLoader();

alert(xmlRequest.status);

}

Data is the JSON object is returned where you can check the properties of the object returned by your web services.  Easy as pie!

Upload the HTML to the web server the web services reside on and you’re golden.  You can then use a simple Page Viewer Web Part to display your masterpiece inside SharePoint and your users will never be the wiser.

Obviously, there are many situations when a custom developed web part is required but my intention has been to demonstrate an alternative approach to accomplish a specific problem without writing custom .Net code.

Enjoy and all comments are always welcome!

VN:F [1.9.21_1169]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.21_1169]
Rating: 0 (from 0 votes)

jQuery vs Webpart


24 Mar
No Gravatar

I was recently presented with the following issue. We need a web part that will allow someone to enter their employee id and update their phone number which will then be posted back to the HR system. Web part?? Come on!

This can be accomplished with jQuery, some nice HTML formatting and…..oh wait…that’s it.

Anyone that knows jQuery will know that there are cross-domain scripting issues that we have to deal with by design. So we may have “develop” and HTML page that uses jquery and ajax to do the calls and host it on the web server that serves up the required web services.

Code to follow but give me a break. You could do this in a traditional web part deployed as a feature and go through the entire SDLC or write some simple HTML and call the pre-existing services.

Code to follow.

Tell me I’m wrong please.

VN:F [1.9.21_1169]
Rating: 10.0/10 (2 votes cast)
VN:F [1.9.21_1169]
Rating: +3 (from 3 votes)

JQuery and SharePoint Blogging Sample


13 Jan
No Gravatar

It’s been a while since I posted due to a change in careers.  I have become an independent SharePoint consultant and am loving the change.

Reading my favourite (IT) site, EndUserSharepoint and all the interesting examples of what the authors are doing with SharePoint has gotten me very excited about the possibilities of integrating JQuery with SharePoint to create some very slick user interfaces.  I want to some highlights of this latest prototype because it touches on a lot of different areas.

Firstly the shoutouts:

Heather Solomon for her blog on Customizine the CQWP
Michael Hofer for rolling up blog comments with the CQWP
Everyone at EUSP

So without further ado here’s a quick video of what the prototype looks like.  Prototype

So the first thing I did was create a new site based on the Blog template, added a few posts and made a few of my typically dim comments.  I actually added a column on the comments list called Highlight which we’ll use later. 

I added a CQWP to my page and you’ll notice that there is no way to roll up blog comments from the UI.  A little research led me to Michael’s blog above.  So configuring the CQWP to roll up blog posts and then exporting it, modifying the server template property from 301 to 302 and reimporting it did the trick.  Keep in mind that if you modify the CQWP in the UI after words you’re going to have to go through that process again.

While we’re on the subject of modifying the webpart we might as well add the extra fields we’ll need to the CommonViewFields property in our webpart. Essentially this makes the fields available to use when modifying the XSL a little later.  For more information please read Heather Solomon’s post above.

<property name=”CommonViewFields” type=”string”>Body, Text;Title,Text;Highlight,Boolean</property>

Moving along….I wanted to get a  nice accordion effect with the results which naturally led me toward the jQuery accordion.  For those that haven’t used it, it really could not be simpler.  Add a reference to the right jquery libraries, format the HTML and away we go.  Actually in the interest of clarity, here are all the jquery references and code required for this sample.  I’ll explain them as we go:

Simply place this all into a Content Editor Web Part (this definitely is not a best practice but for the purposes of this article we’ll leave it like this).

  <script type=”text/javascript” src=”http://jqueryui.com/latest/jquery-1.3.2.js”></script>
  <script type=”text/javascript” src=”http://jqueryui.com/latest/ui/ui.core.js”></script>
  <script type=”text/javascript” src=”http://jqueryui.com/latest/ui/ui.accordion.js”></script>
<script type=”text/javascript” src=”http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/jquery-ui.min.js”></script>
<link rel=”stylesheet” href=”http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/ui-lightness/jquery-ui.css” type=”text/css”>

<script type=”text/javascript”>
  $(document).ready(function(){
    $(“#accordion”).accordion(
{
    autoheight: false
}
);
jQuery(“#dialog”).dialog({
      bgiframe: true, autoOpen: false,  modal: true, show: ‘slide’
    });

  });

  function PopulateText(textToShow, title)
  {
        document.getElementById(“dialog”).innerHTML = textToShow;
        document.getElementById(“dialog”).title = title;
  }

 </script>

The appropriate HTML formatting for the accordion looks like this:

<div id=”accordion”>
    <h3><a href=”#”>First header</a></h3>
    <div>First content</div>
    <h3><a href=”#”>Second header</a></h3>
    <div>Second content</div>
</div>

Since we’ll need to control the HTML output we’ll turn to our friend the itemstyles.xsl file.  It’s located in the style library which is easy enough to find in SPD:

Again, for the mechanics of creating new templates etc. please refer to Heather’s blog post.  She’s far more articulate that your resident troglodyte here.  Anywhoo…we’ll create a new template and this is really where the magic happens.  The first challenge I had was that I needed to have a <div id=”accordion”></div>  block surrounding the CQWP.  But, obviously this output will be rendered for each item. 

However with the following check we can ensure that the following output is generated only for the first item.  I’ll explain the code snippet in red later – it’s not germane to this discussion.  So essentially on the first match we’re going to spit out <div id=”accordion”> and then everything else will be contained with in that div.

 <!–If this is the first match let’s put a header on it–>
  <xsl:if test=”count(preceding-sibling::*)=0″>
   <div id=”dialog” title=”Comment”>
    <p>
     <xsl:value-of select =”@Body” disable-output-escaping=”yes”/>
    </p>

   </div>
   <xsl:text disable-output-escaping=”yes”>&lt;div id=accordion &gt;</xsl:text>
  </xsl:if>

Of course then at the end of the template will put the following check it to render the closing tag on the last match:

  <!–If this is the last match we’ll put a footer on the end to close off the html–>
  <xsl:if test=”count(following-sibling::*)=0″>
   <xsl:text disable-output-escaping=”yes”>&lt;/div&gt;</xsl:text>
  </xsl:if>

The next step we want to do is make sure that only the list items or comments that have Highlight checked are rendered.

A very simple check like so makes that happen:  <xsl:if test=”@Highlight=’True’”> …put everything you want rendered in here  </xsl:if>

Now – you’ll notice in the video that when you click the more button for each item a nice jquery modal dialog pops up with the body of the comment.  Here’s how that was accomplished.

That snippet in red above is the container that will be required to store the text we want to show in the jQuery dialog so we’re going to need to come up with a way to dynamically populate this.

So in our XSL we will do the following – comments inline:

       <tr valign=”top”>
        <td><strong>Details</strong></td>
        <td valign=”bottom”>

<!–The users will click an image with the word “More” on it in order to show the comment body.  We wrap the image in an <a> tag and then in the click event we set the dialog properties (height, width etc.) and then we open the dialog.

However on the mousedown event (prior to the onclick) we render some script that will call the PopulateText function and pass in the comment Body (@Body).  When the dialog opens it will display the right text. 

–>   
<a href=”#” onclick=”jQuery(‘#dialog’).dialog(‘option’,'show’ , ‘slide’);jQuery(‘#dialog’).dialog(‘option’,'height’ , 300);jQuery(‘#dialog’).dialog(‘option’, ‘width’, 500);jQuery(‘#dialog’).dialog(‘open’); return false”>
   <xsl:attribute name=”onmousedown”>
   <xsl:text>javascript:PopulateText(“</xsl:text>
   <xsl:value-of select =”@Body” disable-output-escaping=”yes”/>
   <xsl:text>”, “Comment”);</xsl:text>
   </xsl:attribute>
   <img border=”0″ src=”/SiteCollectionImages/Moreicon.gif”></img>
   </a>
     </td>
       </tr>

In order to change the them for your accordion and dialog all you need to do is change the link to the theme css file (<link rel=”stylesheet” href=”http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/ui-lightness/jquery-ui.css” type=”text/css”>).

And that is how I created some nice effects for Blog Posts using the CQWP and jQuery.   I hope you enjoy, get some ideas and provide me with some feedback.

Jason

For reference sake the entire XSL template is below:

<xsl:template name=”HighlightedBlogComments” match=”Row[@Style='HighlightedBlogComments']” mode=”itemstyle”>
  <xsl:variable name=”SafeLinkUrl”>
            <xsl:call-template name=”OuterTemplate.GetSafeLink”>
                <xsl:with-param name=”UrlColumnName” select=”‘LinkUrl’”/>
            </xsl:call-template>
        </xsl:variable>
  <xsl:variable name=”SafeImageUrl”>
            <xsl:call-template name=”OuterTemplate.GetSafeStaticUrl”>
                <xsl:with-param name=”UrlColumnName” select=”‘ImageUrl’”/>
            </xsl:call-template>
        </xsl:variable>
  <xsl:variable name=”LinkTarget”>
            <xsl:if test=”@OpenInNewWindow = ‘True’” >_blank</xsl:if>
        </xsl:variable>
 
 <!–If this is the first match let’s put a header on it–>
  <xsl:if test=”count(preceding-sibling::*)=0″>
   <div id=”dialog” title=”Comment”>
    <p>
     <xsl:value-of select =”@Body” disable-output-escaping=”yes”/>
    </p>
   </div>
   <xsl:text disable-output-escaping=”yes”>&lt;div id=accordion &gt;</xsl:text>
  </xsl:if>
  <!–Only show the records where the HighLight Column has been checked–>
  <xsl:if test=”@Highlight=’True’”>
   <h4>
    <a href=”#”>
     <xsl:value-of select=”@Title”/>
    </a>
   </h4>
   <div height=”350″>
    <p>
     <font size=”1″>
      <table>
       <tr valign=”top”>
        <td><strong>Author</strong></td>
        <td><xsl:value-of select=”@Author”/></td>
       </tr>
       <tr valign=”top”>
        <td><strong>Posted On</strong></td>
        <td><xsl:value-of select=”@Created”/></td>
       </tr>
       <tr valign=”top”>
        <td><strong>Details</strong></td>
        <td valign=”bottom”>
   

   <a href=”#” onclick=”jQuery(‘#dialog’).dialog(‘option’,'show’ , ‘slide’);jQuery(‘#dialog’).dialog(‘option’,'height’ , 300);jQuery(‘#dialog’).dialog(‘option’, ‘width’, 500);jQuery(‘#dialog’).dialog(‘open’); return false”>
   <xsl:attribute name=”onmousedown”>
   <xsl:text>javascript:PopulateText(“</xsl:text>
   <xsl:value-of select =”@Body” disable-output-escaping=”yes”/>
   <xsl:text>”, “Comment”);</xsl:text>
   </xsl:attribute>
   <img border=”0″ src=”/SiteCollectionImages/Moreicon.gif”></img>
   </a>
  

   </td>
       </tr>
      </table>
     </font>
    </p>
   </div>
  </xsl:if>
  <!–If this is the last match we’ll put a footer on the end to close off the html–>
  <xsl:if test=”count(following-sibling::*)=0″>
   <xsl:text disable-output-escaping=”yes”>&lt;/div&gt;</xsl:text>
  </xsl:if>
 </xsl:template>

VN:F [1.9.21_1169]
Rating: 8.8/10 (4 votes cast)
VN:F [1.9.21_1169]
Rating: +1 (from 3 votes)

My SPC 09 Calendar


14 Oct
No Gravatar

SPC09Here’s my schedule for the upcoming SharePoint conference.  I’ll also be live blogging for End User SharePoint which I am really looking forward to.

Monday, October 19th, 2009
9:00 AMKeynote: Unveiling Microsoft SharePoint 2010
Mandalay Bay BallroomSpeaker: Steve Ballmer

10:30 AMKeynote: Microsoft SharePoint 2010 Drilldown
Mandalay Bay BallroomSpeaker: Jeff Teper

1:15 PMEnterprise Search Overview
Islander GSpeaker: Evan Richman

2:45 PMECM for the Masses – How SharePoint 2010 delivers on the promise
Lagoon HSpeaker: Ryan Duguid

4:30 PMOverview of Social Computing in SharePoint 2010
South Seas DSpeaker: Christian Finn

Tuesday, October 20th, 2009
9:00 AMWhat’s New in Business Connectivity Services (Evolution of BDC!)
South Seas BSpeaker: Michal Gideoni

10:30 AMScaling SharePoint 2010 topologies for your organization
Mandalay Bay FSpeaker: Simon Skaria, Umesh Unnikrishnan

1:15 PMSharePoint Document Management Deep Dive
Mandalay Bay KSpeaker: Ryan Duguid

2:45 PMOffice 2007 vs. Office 2010 – Deployment Considerations
Breakers BSpeaker: Chris Bortlik

4:30 PMContinental Airlines: Architecting Enterprise Content Management -…
Breakers ESpeaker: Benjamin Lee, Denise Wilson, Jason Deere

Wednesday, October 21th, 2009
9:00 AMSharePoint 2010 Governance: Planning and Implementation
Mandalay Bay GSpeaker: Scott Jamison, Susan Hanley

10:30 AMConfiguring and Deploying a Reporting Environment in SharePoint…
Mandalay Bay KSpeaker: Prash Shirolkar, Thierry D’hers

1:15 PMOverview of Content Acquisition for Search in SharePoint 2010
ReefSpeaker: Siddharth Shah

2:45 PMSolving Information Chaos: Advanced Content Processing with FAST…
Lagoon JSpeaker: Sven Arne Gylterud

4:30 PMSocial Search in SharePoint 2010
Mandalay Bay HSpeaker: Jessica Alspaugh

Thursday, October 22th, 2009
9:00 AMUnveiling New Management Tools for Administering SharePoint 2010
South Seas BSpeaker: Zach Rosenfield

10:30 AMDeep Dive into SharePoint 2010 Profile Store and Profile Data…
Mandalay Bay GSpeaker: Chris Gideon, Tanuj Bansal

12:00 PMForm-driven Mashups Using InfoPath and Forms Services 2010
Mandalay Bay JSpeaker: Nick Dallett

VN:F [1.9.21_1169]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.21_1169]
Rating: 0 (from 0 votes)

SP Workflow Governance


13 Oct
No Gravatar

As the adoption of our MOSS 2007 platform continues to gain traction we have begun delivering some of the more important pieces of our moss_2007governance plan.  Due to our limited resources we have identified the areas that we feel are the most important and are delivering those as they are developed. 

First, a primer on our environment in order to provide some context on the why.  I work for a global manufacturing company with a decentralized operational structure.  We currently have about 8000 users and are at approximately 600,000 hits per month across the portal.  Many of our facilities are coming on board to our MOSS implementation which is managed centrally in the Toronto area by a relatively (by the standards of other organizations) small team of people.    When I say small – I mean 3 in IT.   As our facilities come on board there are increasing requests to automate business processes by creating and hosting workflows in SharePoint.  We felt it was necessary to quickly develop and publish some policies around this type of activity that takes into account three main factors:  reinforcing the concept of user ownership over SharePoint functionality, the resource levels at the central office, and the current processes around deployment that are already in place.

Obviously many pieces of successful governance are inter-related which is why in conjunction with these specific policies we have published governance about the roles & responsibilities of the various types of users interacting with SharePoint: site collection administrators, site administrators, content creators etc.  Support processes need to be documented as well in order for the site administrators/content creators to understand their role and the escalation path.

Below is an overview of the workflow-related policies and the rationale behind them.

Policies

  • Out of the Box SharePoint workflows will be the first option examined when implementing workflows
    • This is straightforward and doesn’t require much explanation.  OOTB should always be the first option when looking at new functionality whether its SharePoint or any other technology solution
  • We do not currently support the out of the box translation workflows
    • Our implementation is currently English only so there is no business need to be using these workflows
  • We will not provide support for user developed SharePoint Designer workflows
    • This does not mean that we will not allow SPD workflows to be created and deployed.  It means that should a user choose to use SPD designer to create a workflow they own it we will not be able to support them with their troubleshooting requirements.  We simply do not have the resources to spend time with individual users or teams analyzing why their workflow is not doing what they expected it to do.
  • SharePoint Designer training must be taken prior to creating workflows with this tool.
    • We will however recommend training providers that can provide the required training or will assist individuals or teams with the fundamentals of SPD workflows.  We are also developing training material that will be provided through the MS Productivity Hub which will allow them to access material on demand.
  • The creator of the workflow owns it and is responsible for any documentation/knowledge transfer.
    • This was touched on in Point 4 but it can’t be stressed enough.  As with any business solution the functional business owners are responsible for knowing, using and training on the functionality and business processes they own.  We are making a much more concerted effort as part of the governance process to define and communicate the responsibilities of the business owner/site administrator. 
    • Communicating the necessity of cross training to the owner as a risk mitigation strategy is essential in helping them understand their responsibility.
  • Errors with workflows will be investigated by the owner of the workflow by reviewing the workflow history.  If, after investigating, the error appears to be platform related an email will be sent to the helpdesk with detailed information about the error.
    • The intention here is to again ensure that IT and more specifically the Help Desk is not the first option when an issue with a workflow is discovered.
    • Training the users on the fundamentals of workflows, tasks, workflow history etc. will empower them to attempt to troubleshoot the issue and resolve it more quickly.
  • We will not support the developer training or deployment related to custom developed workflows in Visual Studio.  
    • VS workflows need to be deployed by someone with access to Central Administration
    • We have a rigid deployment process of one deployment to QA and Production per month.  We have 1 person responsible for doing this (along with many other tasks including non-SP related).   This means that a custom developed workflow change could potentially be facing a lag of 1 month prior to being deployed
    • The issue for us here is not the mechanics of deploying the workflows, but the inevitability of the software developers at our divisions creating more complex workflows over time with increased needs for changes, errors and “emergency” deployments putting our current deployment processes and policies at risk.
  • SharePoint workflows will not be used to automate business critical processes.
    • This policy is derivative of the previous points and realities of our environment.  As is common with most SharePoint deployments there is a tendency for people to think of SharePoint as the solution for everything.  We are attempting to place reasonable constraints on the use of the environment while working proactively with our users to identify alternatives by helping them clearly define their requirement and choosing the right solution.

This policies will evolve over time, as they should.  We have already referred numerous people to these policies and their supporting documentation.  As our organizational maturity with this platform improves our governance model will evolve in parallel.

VN:F [1.9.21_1169]
Rating: 7.0/10 (1 vote cast)
VN:F [1.9.21_1169]
Rating: +1 (from 1 vote)

MS Tech Days Canada Review


30 Sep
No Gravatar

techdays-2009I attended the Tech Days event in Toronto this week and wanted to share my thoughts on the Communication and Collaboration track.  This track was focused on SharePoint during day one.

This was my first time attending this event and I was fairly disappointed with it.  This is not to say that I didn’t get any value from it – I did.  But MS tried to do to much in too short a time with too diverse an audience.  The intial informal survey of the audience indicated that there was a mix between SharePoint Admins, developers, those who had little experience with the platform and those that weren’t running it and wanted to learn more.

The initial session was titled Deploying MOSS in a virtualized world.  The speaker was very knowledgable.  The topics covered ranged from SharePoint topologies,  server relationships and roles, interesting facts on the mechanics of search indexing and querying, options for installing SharePoint, application log errors, information SQL Server aliasing, backup and DR options as well as some information about Hyper-V virtualization.  All this in an hour and a half!  Regardless, I talked to the presenter afterwards and got some excellent information about the mechanics of search indexing and moving your query services to your WFE.  This is something I have been considering for some time.

The next session was held by Eli Robillard, a long time SharePoint MVP that I have worked with in the past.  His level of knowledge is quite frankly incredible.  He spoke about versioning  and upgrade of SharePoint based solutions.  It was interesting but very, very detailed but I wasn’t clear on why it was not part of a development related track.  For the non-developer audience, which was most of the room, he might as well have been speaking Mandarin.  This is no way a knock on Eli, he is a wonderful presenter. 

The following session was Comprehensive Security for MOSS 2007.  This was interesting but the coverage was too broad in my view.  There was good information about service accounts, permission levels, zones, authentication providers, FBA etc.  I found this quite useful.  The presenter then moved into standard SharePoint security.  I couldn’t quite grasp how someone that didn’t understand SharePoint OOB security would possibly benefit from a presentation the more administrative and technical aspects of security required to run the MOSS platform.

So overall I was disappointed but did come away with some information that I can use.  My advice to Microsoft is firstly to narrow the focus of the presentations.  Cover fewer topics more effectively.  Making the registration process more proactive in understanding the audience would be useful as well.  Personally I don’t think taking a show of hands to see who is a SharePoint admin at the beginning of the day is the appropriate time to get an understanding of your audience.

Will I go next year?  No.  However I’m glad I experienced it this year.   By the way – the breakfast was great, the lunch was awful.

VN:F [1.9.21_1169]
Rating: 9.0/10 (1 vote cast)
VN:F [1.9.21_1169]
Rating: +1 (from 1 vote)

A Brutal Flaw with SP Workflows


27 Sep
No Gravatar

sad-face-1Everyone with an intermediate level of knowledge with SharePoint knows that there are 3 ways to create workflows that act on SharePoint lists/libraries.  In ascending order of complexity and flexibility they are:  OOTB SharePoint workflows, SharePoint designer workflows and custom developed Visual Studio workflows.

Imagine the folllowing scenario with which I have been faced.  Working with a user to implement a mission-critical business process that is focused on the steps required to acknoweldge and act on changes to customer requirements.  The workflow is developed, tested and rolled out – in production.  Everyone is happy.

A few months later a request for a change to the process is made which necessitates a change to the workflow that has 50 workflows currently in process.  How do we test that exactly?  Good question and there is no easy answer.

Since a SharePoint workflow is associated with a list based on a GUID that is environment specific you can’t do it without some ridiculous (in my view) manual steps that are outlined very nicely at my favourite SharePoint site – End User SharePoint.  http://www.endusersharepoint.com/2008/12/08/why-can%e2%80%99t-i-easily-port-sharepoint-designer-workflow-solutions-from-one-list-to-another-part-1/

In my view this is a deal-breaker for using SP workflow for automating business critical processes.  I’ll be attending the SP 2009 conference next month and will be eager to see if and how this has been addressed.  In the meantime if anyone has any experience with dealing with this issue I’m interested in hearing your feedback.

VN:F [1.9.21_1169]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.21_1169]
Rating: +1 (from 1 vote)

SharePoint Blogs as a Communication Mechanism


21 Sep
No Gravatar

i_love_blogging-787805As those of you who read this blog periodically know, I work for a large, global manufacturing company.  As part of the rebranding effort of our MOSS 2007 implementation many of our senior executives have started blogging.  This provides another medium for them to converse with the peeps as it were. At the outset their intention was to create a two way dialog with our employees and take some intial steps to embrace the world of Enterprise 2.0.  I would say that while it has been somewhat successful, but it has not met expectations.  I have some ideas as to why and some solutions but am very interested in the feedback of those who have enjoyed a successful blogging initiative.

This great article by Joel Olsen triggered gave me some excellent food for thought to ponder this situation: http://www.sharepointjoel.com/Lists/Posts/Post.aspx?List=0cd1a63d%2D183c%2D4fc2%2D8320%2Dba5369008acb&ID=253

Here are some of the issues that I see as an obstacle to success.

  1. Corporate Culture – ours is an organizationally decentralized company.  While we have made great strides in improving communication and collaboration over the past 1o years some of that institutional memory lingers.
  2. Lack of Governance – clear governance needs to be defined on acceptable blogging and commenting policies.  This will provide clarity to people about expectations and give them some certainty on how to ensure their comment is published.
  3. User Profile Data – While this isn’t necessarily related to blogging it is critical in order to extend MOSS from a communication and collaboration tool to a platform for connecting people.  This shift in my view will drive people to the portal as part of their day to day activities and increase the opportunity for users to read and interact with blogs.  This is difficult in a decentralized organization like ours because the responsibility for populating AD with accurate information lies with the individual manufacturing facilities.
  4. Latency – I see this as a major issue.  When people take the time to post a comment it needs to be reviewed and approved within a reasonable period of time.   Currently when they post it “disappears” into the ether and will only show up once approved.  There then is a further delay in waiting for a response.  We are looking at implementing a simple “Thumbs Up” mechanism so people can immediately give feedback on content.  We discussed a ranking system or even having a Thumbs Down option but have decided at this point in the evolution of our Enterprise 2.0 initiative that we want to encourage positive feedback and leave more comprehensive and potentially negative feedback for the comment mechanism.
  5. Metrics – the only way you can know if any initiative is successful is to define measurements and success criteria and then….wait for it…measure them.  The problem with OTB SharePoint usage statistics is that they absolutely do not provide you with enough information to make informed judgments about whether what you are doing is working.  In our situation our executives typically post new blogs on Mondays. 
    1. We initially created a graph for each blog showing number of hits and distinct users for the last 30 days.  This was helpful in the sense that it showed us both usage trends over time and confirmed that there was a spike in traffic 1-2 days after the blog was posted.
    2. We then linked the SharePoint usage data to our main application database to show how many distinct users per month from each manufacturing facility  were visiting the blogs.  Interesting, but not overly useful.
    3. We are now looking at metrics that will require some proactivity on the part of the blog admins but should prove more useful.  Breaking down the metrics by week to coincide more closely with the posting cycle.  And then doing some research to understand the effectiveness of the blog?  If a blogger highlights a certain facility for great work they did, the traffic from that facility should increase if the message is getting across.  Or if a blog is posted focused on a specific major customer of ours the ideal outcome would be that all facilities dealing with or hoping to win business from that customer would be drawn to the blog post.  If not, there is a problem.  But you can’t know if you don’t measure it.
    4. Average length of time to approve and respond to a blog comment.  In my view there should be an SLA around this.  I personally would not want to have a conversation with someone that took a week to respond.
    5. As I highlighted in a previous blog entry we have wired up a DVWP to a SQL query to highlight blog comments and their current status to make it easier for approvers to see if there are any new entries that need review.  We have also encouraged them to set up alerts on their Comments lists.
    6. A quick tip that many people don’t know is that by appending “_layouts/usagedetails.aspx” to the end of your site URL you are able to see different usage metrics.  You wil be able to see for example a list of users by day that have accessed your site.  This can be helpful in understanding who is accessing your blogs and when and will allow you to get a sense of who is reading each post.  Again – it’s not perfectly accurate but tied with the other metrics you can start to get a good picture of who is conuming the content.
    7. SharePoint Designer also has some usage reporting that you can use.  If you open a site and select the Site > Reports >Usage option you can see the reports that you can take a look at.
  6. Exposing Content – we have a site called Blog Central and each blog is a subsite of that.  We currently roll up the latest blog entries using the CQWP.  The issue with that is the fact that the Blog Central site is still a click away from the home page.  We are looking at a revamp of our homepage to leverage the CQWP and JQuery to in order to maximize the use of space and allow users to more easily see what is new.  We are also looking at rolling up the comments to a more prominent central location in order to highlight the fact that there is dialogue taking place.  Currently comments are only accessible by looking at the bottom of specific blog posts which makes it cumbersome for the users.

I hope you find this information helpful and most importantly I am interested in any feedback on your own experiences.

VN:F [1.9.21_1169]
Rating: 6.0/10 (2 votes cast)
VN:F [1.9.21_1169]
Rating: 0 (from 2 votes)

Rolling Up Blog Posts


02 Sep
No Gravatar

I was recently presented with the following scenario:  As part of the creation of a SharePoint dashboard, my business users are interested in seeing the number of blog comments and their current status by blog.

Our blogs are contained as subsites of a site called Blog Central which reside in a site collection called “Public.”  The dashboard resides in a separate site collection.  Our site collections contain individual content databases.

As a former developer, my initial response is to find an out of the box solution wherever possible. 

  1. A content query web part wouldn’t suffice as its scope is limited to the current site collection
  2. Adding a new data connection in SP Designer to hook up to a dataview web part (DVWP) won’t work because the lists and libraries (not the web services) are also limited to the current site collection. These can be combined to recursively roll up content in the current site collection however.

I ended up querying the content database directly and presenting that through the DVWP.  So, in SP Designer I created a new Database Connection.  Database_Connections

 

 

 

 

Browsing to the content database for the Public site collection I wrote the following query in order to retrieve the correct data:

SELECT     Webs.Title,
                    CASE UserData.tp_ModerationStatus
                                   WHEN 0 THEN ‘Approved’ 
                                   WHEN 1 THEN ‘Rejected’ 
                                    WHEN 2 THEN ‘Pending’
                     END AS Status,                        
                      COUNT(*) AS Total 

FROM       AllLists INNER JOIN                       
                    Webs ON AllLists.tp_WebId = Webs.Id INNER JOIN 
                     UserData ON AllLists.tp_ID = UserData.tp_ListId 

WHERE     (AllLists.tp_Title = ‘comments’) AND
                      (Webs.FullUrl LIKE ‘%blogcentral%’) 

GROUP BY UserData.tp_ModerationStatus, Webs.Title 

ORDER BY Webs.Title, UserData.tp_ModerationStatus

I then conditionally formatted the DVWP to show different colours based on status and done.  
DVWP

 

 

 

If there is a better way to do this, using CAML or some other method,  please let me know and I will share it.

VN:F [1.9.21_1169]
Rating: 9.0/10 (2 votes cast)
VN:F [1.9.21_1169]
Rating: +1 (from 1 vote)

Intelligence Among Us

it's there…use it.