Archives

Archives / 2004 / April
  • My SharePoint Workflow Pet Project Update

    Another day off, so another few hours to spend on cool coding stuff! In my last post I introduced you my new “pet project”: a generic SharePoint Document Library event handler that can be used for simple workflow and approval scenarios. Thanks to all the people who contacted me! Gerry posted a long reply in which he made the trade-off of developing your own workflow solution or buying a commercial product, and he would go for a commercial product. I appreciate Gerry’s opinion but let me set some things straight: it’s not my intention to compete in any way with commercial products like K2.NET, Teamplate or even BizTalk (although that would be cool ;-). They offer a lot more features, they have support and they are scalable and reliable. In the company I work for, we use Windows SharePoint Services to provide team sites to a group of people working on the same project. Sometimes there’s the need to have a very simple approval scenario, for which in my opinion the commercial solutions would be overkill and far too expensive (go talk to our management). Since we are a bunch of IT-people we can develop for each scenario a custom Event Handler implementation, which will work fine. But I just hate to create for each scenario a different Event Handler (I’m pretty quickly bored when doing repetitive work, you can ask Raf). That’s why I’ve come up with a more generic approach: a configurable Event Handler that will suit simple workflows. So will it be a better solution than the commercial ones: definitely not. Will it be as a reliable as the commercial products: probably not but I don’t intend to use it for critical processes. Will it be cheaper: I do think so since I’m developing it in my spare time (current rate €0.00 / hour, anyone want to pay more?) and configuration will be a matter of tweaking an XML file or something like that. Maybe the most important reason for me to start this project was the I’m intrigued by that kind of stuff. I want to know: can I make something like that, which problems will I have to conquer?

  • Simple Workflows and Approval Routes in SharePoint

    UPDATE: Visit the GotDotNet Workspace to download the engine!

    Quite a lot of people are asking if Windows SharePoint Services offers workflows and/or approval routes. The answer is: no, not out-of-the-box. You can fairly easy extend SharePoint and attach an event handler to a document library. This event handler is nothing more than a .NET class that implements the IListEventSink interface and contains some logic corresponding to the desired actions. For more information around this topic you can read Patrick Tisseghem’s excellent article, or  this article from the MSDN Library. The downside of this approach is that for each specific workflow or approval route you need to code an event handler.Unless you create something more generic and configurable: let me introduce you to my new “pet project”!

    I’ve created a generic event handler for SharePoint document libraries, that easily can be configured to create any workflow or approval route. Consider following approval route scenario to get an idea what you can accomplish with this event handler:
    There is a SharePoint site with three document libraries: Work In Progress, In Review and Reviewed. Contributors can submit documents in the Work In Progress library, every contributor of the site has access to that library. Documents in this library have a custom choice field, named Status with following possible values: Work in progress, Ready to publish and Declined. Once a document in the library gets the Ready to publish status (assigned by the contributor), the document will move to the In Review document library. Only people that are Reviewers can access this library. The library also has a custom choice field, named Approval, which can have these values: Approve and Decline. Once a Reviewer has reviewed the document, he or she can set the Approval property to Approve or Declined. When the document is declined, it will be moved back to the Work In Progress document library. When to document is approved it will be moved to the Reviewed document library, which can be accessed by every member of that site.

  • Bugfix for What's New Web Part & RSS Feed for SharePoint

    Several people reported some problems with the What’s New RSS Feed for SharePoint and the What’s New WebPart. When a user doesn’t has access to a SharePoint list, both components will try to obtain the necessary rights: the webpart will prompt for a new login and the RSS Feed will produce some “unexpected behaviour”. Before I jump into the technical details, here are the links to download the latest versions:

  • Creating InfoPath Processing Instructions in BizTalk Server 2004

    InfoPath has a little bit of magic in it. I’m not talking about the cool features for creating and using rich XML based forms, but I mean the magic that happens when you save the contents of an InfoPath form in a XML file. Although the result is just a file with the XML extension, it seems even the Windows Explorer is enchanted, it displays an InfoPath icon for the XML file. When double click the file, InfoPath will be opened, the corresponding InfoPath form will be loaded and the data from the XML file is showed in the form.

    So what’s causing of all this wizardry? If you open the XML file with Visual Studio.NET for example so we can see the actual XML content, you can see that are some XML directives (starting with ?mso) that you wouldn’t expect:

  • Generating RSS Feeds for SharePoint Sites

    UPDATED HERE!!

    Today I have a day off, so I decided to work a little bit on my “pet project”: RSS generation for SharePoint sites. Scoble asked for it when I released my RSS Reader Webpart. I know there are some good solutions for this problem available (for example from Siegfried Weber and DevHawk), but I was intrigued by this problem so I decided to craft one myself. Et voila: the What’s New Rss Feed for SharePoint was born (see the end of the post for downloads). I’ve re-used to logic of the What’s New Web Part to retrieve the latest changes on a SharePoint site so I won’t go into detail about that part of the code. The general idea behind this is that the code will go through all the lists on a SharePoint site (you can exclude specific lists) and retrieves the latest changed items (you can specify how many).

  • Positional Flat File Processing with BizTalk 2004: Early Termination

    Here's a nice tip I found in the BizTalk newsgroup, which is a great resource for learning more about BizTalk. When you process positional flat files, BizTalk assumes that each line is completely filled with characters. For example you have two fields in your flat file: code (5 positions) and name (10 positions): BizTalk expects the file to look like this:

  • How To Recreate A SharePoint Navigation Bar with FrontPage 2003

    Today just a little trick that I needed when I started to customize SharePoint sites with FrontPage 2003. One of the first things you'll probably be doing when you want to alter how a SharePoint site looks, is deleting some table rows and cells from the default SharePoint layout. Sometimes it happens that you (accidentally?) delete one element too much… (at least it happened to me!). A tricky one to get back is the SharePoint navigation bar on top of the screen. To imitate the “real” one you can paste following HTML into your page:
    <table class="ms-bannerframe" border="0" cellspacing="0" cellpadding="0" width="100%" height="25px">
      <tr>
         <td class=ms-banner width=100% nowrap ID="myNavigationBar" valign="middle">
           <!--webbot bot="Navigation"
                    S-Type="sequence"
                    S-Orientation="horizontal"
                    S-Rendering="html"
                    S-Btn-Nml="<a ID='onettopnavbar#LABEL_ID#' href='#URL#' accesskey='J'>#LABEL#</a>"
                    S-Btn-Sel="<a ID='onettopnavbar#LABEL_ID#' href='#URL#' accesskey='J'>#LABEL#</a>"
                    S-Btn-Sep="&amp;nbsp;&amp;nbsp;&amp;nbsp;"
                    B-Include-Home="FALSE"
                    B-Include-Up="FALSE"
                    S-Btn-Nobr="FALSE"
                    U-Page="sid:1002"
                    S-Target -->
         </td>
      </tr>
    </table>

  • How-to: Display Contents of a SharePoint List From Another Site

    Some people are wondering if it’s possible to display the contents of a SharePoint list that resides on another SharePoint site. Yes this is possible, even better: I’ll show you how to accomplish this! Suppose you have a SharePoint Task list on your root site that contains some tasks. You also have a sub site on which you want to display the contents of the Task list of the root site. First of all you need to create the Task list on the root site of course.

  • Create SharePoint Webparts With ASP.NET User Controls (+ Demo Video!)

    Patrick Tisseghem loves creating SharePoint webparts using ASP.NET user controls, in one of his latest posts he simplifies this technique by using the dynamically compiled assembly (that is build the first time the user control is rendered on an ASP.NET page) which contains the user control. He even made a video that shows step-by-step how this works! Thanks Patrick for the free U2U course! ;-) I think this process could be even more simplified (as Patrick suggests) by using a utility that would compile the ASP.NET user control, without having to render that user control on a web form. I don’t know the compiler parameters that should be used to emulate what ASP.NET does, maybe someone else can help us out? My first experiences in a test environment were quite positive (after referencing the right assemblies :-). The procedure feels a little bit weird (you rely on ASP.NET to compile the user control), but there has to be a cleaner way to get a hold of the assemblies you need…