blogs.conchango.com

welcome to the conchango blogging site
Welcome to blogs.conchango.com Sign in | Join | Help
in Search

Paul Galvin's Blog

  • MOSS Small Farm Installation and Configuration War Story

    This week, I've struggled a bit with my team to get MOSS installed in a simple two-server farm.  Having gone through it, I have a greater appreciation for the kinds of problems people report on the MSDN forums and elsewhere.

    The final farm configuration:

    • SQL/Index/Intranet WFE inside the firewall.
    • WFE in the DMZ.
    • Some kind of firewall between the DMZ and the internal server.

    Before we started the project, we let the client know which ports needed to be open.  During the give and take, back and forth over that, we never explicitly said two important things:

    1. SSL means you need a certificate.
    2. The DMZ server must be part of a domain. 

    Day one, we showed up to install MOSS and learned that the domain accounts for database and MOSS hadn't been created.  To move things along, we went ahead and installed everything with a local account on the intranet server. 

    At this point, we discovered the confusion over the SSL certificate and, sadly, decided to have our infrastructure guy come back later that week to continue installing the DMZ server.   In the mean time, we solution architects moved ahead with the business stuff.

    A weekend goes by and the client obtains the certificate.

    Our infrastructure guy shows up and discovers that the DMZ server is not joined to any domain (either a perimeter domain with limited trust or the intranet domain).  We wasted nearly a 1/2 day on that.  If we hadn't let the missing SSL certificate bog us down, we would have discovered this earlier.  Oh well....

    Another day passes and the various security committees, interested parties and (not so) innocent bystanders all agree that it's OK to join the DMZ server with the intranet domain (this is a POC, after all, not a production solution).

    Infrastructure guy comes in to wrap things up.  This time we successfully pass through the the modern-day gauntlet affectionately known as the "SharePoint Configuration Wizard."  We have a peek in central administration and ... yee haw! ... DMZ server is listed in the farm.  We look a little closer and realize we broke open the Champaign a mite bit early.  WSS services is stuck in a "starting" status. 

    Long story short, it turns out that we forgot to change the identity of the service account via central administration from the original local account to the new domain account.  We did that, re-ran the configuration wizard and voila!  We were in business.

    </end>

    Subscribe to my blog.

    Technorati Tags:

  • Mea Culpa -- SharePoint Designer *CAN* Create State Machine Workflows

    I've recently learned that it's possible and even fairly easy to create a state machine workflow using SharePoint Designer.  Necessity is the mother of invention and all that good stuff and I had a need this week that looked for an invention.  Coincidentally, I came across this MSDN forum post as well.  My personal experience this week and that "independent confirmation" lends strength to my conviction.  I plan to write about this at greater length with a full blown example, but here's the gist of it:

    • The approach leverages the fact that a workflow can change a list item, thereby triggering a new workflow.  I've normally considered this to be a nuisance and even blogged about using semaphores to handle it.
    • SharePoint allows multiple independent workflows to be active against a specific list item.

    To configure it:

    • Design your state machine (i.e., the states and how states transition from one to the next).
    • Implement each state as separate workflow.
    • Configure each of these state workflows to execute in response to any change in the list item.

    Each state workflow follows this rough pattern:

    • Upon initialization, determine whether it should really run by inspecting state information in the "current item".  Abort if not.
    • Do the work.
    • Update the "current item" with new state information.  This triggers an update to the current item and fires off all the state workflows.

    Aside from the obvious benefit that one can create a declarative state machine workflow, all that state information is terrific for building KPIs and interesting views.

    It does have a fairly substantial drawback -- standard workflow history tracking is even more useless than normal :)  That's easily remedied, however.  Store all of your audit type information in a custom list.  That's probably a good idea even for vanilla sequential workflow, but that's for another blog post :)

    I call this a "mea culpa" because I have, unfortunately, said more than once on forums and elsewhere that one must use visual studio to create a state machine workflow.  That simply isn't true.

    </end>

     Subscribe to my blog.

    Technorati Tags:
  • Quick and Simple: Make an InfoPath Form Read Only (InfoPath Forms Services in MOSS)

    There's a common business scenario like this:

    • User fills out an InfoPath form.
    • Submits form.
    • Long-running workflow process kicks off.
    • While the workflow is running, we don't want anyone to change the content of the form.

    This office.microsoft.com example describes how to create a separate "view" and mark the whole view as read-only.  This is a workable approach but has the drawback that you've effectively created two entire versions of the same form and must now keep them in sync manually.  If you add a field to the editable view, you must then add it to the non-editable view as well.  Over time, with different developers, there can be some divergence. 

    This alternative might work better in some cases:

    • Add a new field to the form called "IsEditable".
    • Set its default value to true.
    • Promote it when publishing to MOSS.
    • In the workflow, set the value of IsEditble to false.
    • Go back to the form.
    • Add a rule that "upon open of the form", disable your save button when IsEditable is false.

    The drawback to this approach is that all the fields will still be editable on the screen.  The user can get a false impression that they can actually change content.  You can mitigate that by putting in some text that the form is disabled, possibly in big red letters across the top of the page.

    In one project, I created a "workflow status" view.  As the workflow progressed, it would update specific status fields that had been promoted from the form.  When the user opened the form, the "open form" rule automatically switched to that view and the user had a nice little summary status.

    </end>

    Subscribe to my blog.

  • Use Semaphores in SharePoint Designer Workflow to Prevent Endless Loops

    It's possible to cause an endless loop in a SharePoint Designer workflow.  A common implementation pattern like this causes the problem:

    • Create a workflow and associate with a list.
    • Indicate that it should start on create of new items and update of existing items.
    • A step in the workflow updates a field in "Current Item".
    • Since the current item changed, the workflow starts anew.

    To prevent this endless loop, implement a simple semaphore:

    • Add a site column (or column to the list/library if you're not using content types).
    • Hide it from the edit page (easy to do if a site column via its properties, not as easy if a list column).
    • In the workflow, check to see if the value of the semaphore column is blank.
    • If it is blank, set it to a non-blank value and proceed.
    • If is is not blank, exit immediately.

    This can become a fairly nuanced solution, depending on business requirements and so forth, but it's been a workable pattern when I've needed it.

    </end>

    Technorati Tags:

    Subscribe to my blog.

  • Developers: How Do I Learn SharePoint?

    In the last several months, a dozen or more folks from across the planet have been emailing me and asking the general question, "How do I learn SharePoint?"

    I'm hardly authoritative, but I've had some success (and trying to get better all the time) so I thought I'd document my personal road map.  Others may find it valuable.

    Before I do that, I just want to observe that it's obvious to me, based on these personal emails and the even greater number of MSDN / SharePoint University posts of the same nature, that there is huge developer interest in getting up to speed with WSS/MOSS.  I wonder what it's going to be like a year from now ... easier to find good SharePoint talent?  The same?  Are folks committing themselves to the platform at a rate sufficient to keep up with demand for good resources?  How could you even figure something like that out short of a WAG?

    Paul's Roadmap

    I was full time employed by the good folk at Conchango while I followed this road map.  This means that from a learning perspective, I was actively engaged in projects as I followed the steps I outline below. 

    Some Basic Terms

    For people entering this world, there are two key acronyms:

    • WSS: Windows SharePoint Services
    • MOSS: Microsoft Office SharePoint Server

    WSS is "free" in that it's bundled with windows server 2003 (or at least can be downloaded from MS).  I put quotes around free because you need a box, a valid O/S license and probably SQL (though there's a "free" kind of SQL as well). 

    MOSS is built on top of WSS and extends it.  There is no MOSS without WSS.  MOSS is not free.

    Perhaps not day one, but soon after you've got some basic familiarity with the platform, it's important to learn the differences.  For example, a powerful web part, the Content Query Web Part, is a MOSS feature and not available WSS.  People often make the incorrect assumption that CQWP is available in WSS and then end up scrambling for a stop-gap measure when they realize their error.

    Hit the Books

    I started working with WSS/MOSS on about 01/02/2007.  I had a little prior experience with SPS 2003 but very little.  To get myself started, I purchased the two books listed here (http://paulgalvin.spaces.live.com/lists/cns!1CC1EDB3DAA9B8AA!203/).

    I started with the big blue administration book.  Naturally, it covers administration.  At the same time, it provides a survey of all MOSS features (and WSS features as well).

    For me, it's not so important to remember all the various details (until it's time to get certified) but it's good to know the boundaries.  (I follow this same approach in 1st person shooters I play on the xbox or PC -- I enter a room and tend to make a counter-clockwise loop until I get back where I started.  I just feel better knowing the shape of the box I'm in.)

    After reading the big blue book, I would read the entire Inside WSS book.  It dives deeply into issues that developers care most about.

    Create a Virtual Environment

    In order to do any development or properly use the environment, you need a full blown windows server operating system with SharePoint Designer, Visual Studio 2005 (2008 works, but some useful tools have yet to be ported as of the writing of this article), InfoPath 2007 and some other stuff.  There are many good blog entries describing this process.  I'd have a look at these two:

    In addition, Andrew Connell shared his experiences with VMWare here:

    Use your favorite search engine to see what other people do.  It's a useful learning exercise in and of itself.

    Spend a few minutes angrily denouncing the fact that you need a server environment on which to do development.  But ... don't bother blogging about it or posting it to MSDN forums.  It's already been done :).  Instead, embrace it and move on.  You'll be better off for it.

    Get Certified

    I believe that the MS SharePoint certification path, which consists four exams, is exhaustive.  I suggest that you follow their online preparation guide and do your best to understand each of the areas of the test.

    I do not suggest that you take the exam just to pass it.  I do not suggest that you use one of the "brain dump" style 3rd party "tools" for passing MS tests.  If you can take the test, pass it based on a combination of your own directed study and hands-on experience, you'll be a stronger developer and job candidate for it.

    There are four tests in two "tracks":

    Developer:

    Admin:

    I recommend that developers study for all of these exams.  You'll be strong for them, though I suppose if you skipped the admin exams, you would get by.

    I found the WSS version to be considerably more challenging than the corresponding MOSS versions, much to my surprise.  I was in a class recently and several others made the same point.

    While I was studying for the 70-542 exam (MOSS development) I tracked my study resources.  These may be helpful to you as well: http://paulgalvin.spaces.live.com/Blog/cns!1CC1EDB3DAA9B8AA!192.entry

    Plug Yourself Into the Community

    The SharePoint community is vibrant, strong and growing larger all the time.

    You want to look at the following to start:

    • Blogs
    • Forums
    • Codeplex
    • Twitter

    Blogs

    If you don't understand RSS, stop everything and learn it.  It will take 10 minutes to learn it, maybe another 10 minutes to find a web based RSS reader (I like google's reader, www.google.com/reader).

    Start by adding this blog to your RSS reader :)

    Next, add www.sharepointblogs.com to your reader.  They aggregate many blogs into a single feed.

    Over time, you'll find blogs that are not aggregated that way.  Just add them individually.

    I subscribe to a few dozen blogs which I've accumulate over the last year.  If you want, I can export my list and email it.

    Eventually, you may want to start your own blog.  I personally think that a series of blog entries describing a "newbie's" progress learning WSS/MOSS would be an interesting series. I wish I had done that myself.

    Forums

    I actively participate in two forum groups: MSDN and SharePoint University.

    Forums are excellent places to learn.  People ask questions ranging from the very simple ("How do I create a site column") to the panicked ("My server is down!") to more hypothetical design questions.

    Once you get a flavor of the environment, venture out and start replying.  Short of directly interacting with a customer, nothing is better than this for hands on experience.

    Codeplex

    Go to www.codeplex.com.

    Check it out and search for SharePoint projects.

    Subscribe to the daily summary Codeplex feed in your feed reader.

    Add any new SharePoint projects to your feed reader.

    Eventually, after reading the forums and facing down your own WSS/MOSS demons, consider putting together your own codeplex project.

    Twitter

    As I write this blog entry, a lot of SharePoint folk have started using Twitter

    It's hard to characterize Twitter.  You'll just have to check it out yourself.

    Conclusion

    That wraps up my roadmap and makes me current.  I just started using Twitter two weeks ago.

    WSS/MOSS is a very cool platform and the community is growing all the time.  Use community resources to improve your skills and enjoy the journey!

    </end>

     Subscribe to my blog.

  • Data Protection Manager: Seems Like a Great SharePoint Backup/Restore Solution

    At the New Jersey SharePoint User Group meeting last night, Microsoft Sr. product specialist DuWayne Harrison presented Microsoft Data Protection Manager 2007.  DuWayne was great (and he was supported by one or two colleagues from the audience whose names I don't recall). 

    Up until last night, I have never heard of DPM.

    I'm not a system admin type person, so I'm writing this from SharePoint consultant's perspective and may get some of the words wrong.  To me, DPM is a backup/restore solution for Microsoft "stuff":

    • Files
    • SQL
    • O/S
    • Virtual machines (live backup of the VM, even if the VM itself is running Unix).
    • Bare metal recovery (i.e. catastrophic hardware failure).

    Beyond that stuff, which I would consider to be minimal requirements for any kind of "real" backup/restore product, DPM also has built-in intelligence for SharePoint.  It understands about server farms and lets you restore:

    • Entire databases (e.g. content, config, etc).
    • Site collections
    • Individual sites
    • Individual items (e.g. documents).

    The actual restore process involves extracting the target data from the backup and save it into a "restore farm" and then from there, moving it to the production environment (or wherever you want to restore).  I think this is seamless, but there was a lot of emphasis on the need for a "restore farm".  The restore farm does not need to match the production environment in every particular (mainly in physical topology) but does need to match in terms of templates, versions, etc.

    I didn't see a full end to end demo, but DuWayne did show screen shots and some live demos.  It seems to be as good as it needs to be, at least for a moderate sized environment.

    I was particularly struck by the pricing.  Obviously, don't hold me to this, but I believe that the most expensive pricing is roughly as follows (in USD):

    • $600 for DPM itself.
    • Hardware for a DPM server (and associated stuff for media and all that).
    • $450 for each server you want to back up ("enterprise" license).

    A five server farm would cost at most:

    • $600 for DPM
    • $450 x 5 servers = $2,250

    Total cost in licenses: $2,850

    In practice, it would be less.  You wouldn't necessarily need to have DPM installed on each web front end, for example.  You don't necessarily need enterprise licenses either.

    The user interface is seems very simple probably would not require any special training to get up to speed.  I did ask about that specifically and there is apparently a 1.5 day class available, though it's not obvious to me that anyone would really need to take it.

    All in all, I think it's certainly worth investigating if you're out there looking for a data protection solution for SharePoint.

    </end>

    Subscribe to my blog.

    Technorati Tags:
  • Walk-through: Fix Employee Training Template Available Seats Unregister Bug

    As many people know, the Employee Training template provided by Microsoft here has a bug that we can reproduce following these steps:

    • Create a class with a max size of 10 students.
    • Register --> Total available seats properly decrements by one.  Result: 9 available seats.
    • Unregister: --> Bug.  Total available seats should increment by one.  It does not.  Result: 9 available seats as per SharePoint, but in fact, there are 10 available seats.

    Solution: Use SharePoint Designer to correct the workflow.

    First, open up the site.  The folder list for me looks like this:

    image

    If we have a look at the "Attendee registration" workflow, we see that there is a step labeled "Enforce seating policy".  It looks like this:

    image

    This step in the workflow updates the item by incrementing the "Filled Seats" metadata column on the course.  If we pull that up in more detail, we see this:

    image

    That's all the information we need to fix the unregistration workflow.

    If we flip over to the unregistration workflow, there is no similar workflow step.  Add it as follows:

    1: Expand "Attendee unregistration" and open up the XOML (see first screen shot if you're lost).

    2: Add a new workflow variable, "New Filled Seats" of type "Number".

    3: Assign a value to "New Filled Seats" as shown:

    image

    4: Decrement the Filled Seats by 1:

    image

    5: Update the related Course item:

    image

    6: Make sure all the steps are in the right sequence.  For me, it looks like this:

    image

    7: Finish the workflow to re-build it.

    8: Test.

    </end>

     Subscribe to my blog.

    Technorati Tags: ,
  • Content Query Web Part: Speaking at New York SharePoint Users Group

    I will be speaking with my colleague, Natalya Voskresenskaya, at the New York SharePoint Users Group meeting Wednesday May 7th.

    Thanks to Bob Fox for throwing our names into the hat and helping us get this opportunity!

    Our overall topic is the Content Query Web Part and we hope to give some useful information to two distinct audiences:

    • Business users (non-developers): Show how CQWP can be configured to solve certain common business problems without any coding.
    • Developers: Show how CQWP can be extended to do some pretty interesting things that a business user wouldn't normally feel comfortable doing themselves.  This part of the presentation will help business users understand what's possible using this web part so that they can provide better and more realistic requirements to their developer partners.

    Here is the notice NYSPUG mailed out earlier this week:

    "Using Content Query Web Part to Solve Business Problems".

    MOSS 2007's Content Query Web Part (CQWP) enables users to create custom views of data queried from many sources, and present that data in one place. Despite its powerful query & content refinement options, CQWP is often an underrated and overlooked feature. CQWP is both a "data extraction engine" (find documents or list items anywhere in a site collection) and also a first-class presentation tool that enables users to control how content is presented by wrapping HTML and styles to format the display nearly any way you wish.

    In this demo-heavy session, they will show how to use the CQWP to solve business problems by showing off core features.

    • use default CWQP features, including audience targeting

    • use CWQP as a reporting tool anywhere in a site collection via filter criteria such as "all documents created today".

    • change look & feel of query results to highlight business data, show additional columns of information, display information in a grid format, and others.

    • show how CQWP can aid in content type administration (i.e. find all documents of a particular content type so as to understand potential impact of changing a CT definition).

    • describe some limitations of CQWP

    • provide a list of resources for advanced CQWP techniques, including blogs, ECQWP Codeplex project & MSDN documentation.

    </end>

    Subscribe to my blog.

    Technorati Tags:
  • FAST SharePoint Integration: Execute a Simple Query

    This is a continuation in my FAST coding mini-series for SharePoint folk.  The bit of code below executes a search for the term "test" in FAST via a Console application.  Obviously, it's a hop, skip and jump away to wrap this logic inside a web part or application page:

     

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Collections.Specialized;
    using Com.FastSearch.Esp.Search;
    using Com.FastSearch.Esp.Search.Http;
    using Com.FastSearch.Esp.Search.Navigation;
    using Com.FastSearch.Esp.Search.Query;
    using Com.FastSearch.Esp.Search.Result;
    using Com.FastSearch.Esp.Search.View;
    using System.Collections;
    
    namespace Conchango
    {
        class InvokeSimpleFASTQuery
        {
            static void Main(string[] args)
            {
    
                #region Initialize our communication with FAST
                ISearchFactory searchFactory;
    
                NameValueCollection nameValueCollection = new NameValueCollection();
    
                nameValueCollection.Add("fastsearchengine", "Com.FastSearch.Esp.Search.Http.HttpSearchFactory");
                nameValueCollection.Add("Com.FastSearch.Esp.Search.Http.QRServers", "fastdemoback:15100");
                nameValueCollection.Add("Com.FastSearch.Esp.Search.Http.RequestMethod", "GET");
    
                searchFactory = SearchFactory.NewInstance(nameValueCollection);
    
                #endregion
    
                #region Launch a query 
                
                string queryString = "test";
    
                Query query = new Query(queryString);
    
                query.SetParameter(BaseParameter.CLUSTERING, false);
                query.SetParameter(BaseParameter.NAVIGATION, true);
                query.SetParameter(BaseParameter.NAVIGATION_DEEPHITS, 100);
    
                ISearchView searchView;
                searchView = searchFactory.GetSearchView("sharepointconn");
    
                IQueryResult result = searchView.Search(query);
    
                Console.WriteLine("Total results from search: [" + result.DocCount + "].");
    
                int docCounter = 0;
    
                while (docCounter < result.DocCount)
                {
    
                    docCounter++;
    
                    IDocumentSummary thisDocSummary = result.GetDocument(docCounter);
    
                    Console.WriteLine("[" + docCounter + "]: " + thisDocSummary.GetSummaryField("url").StringValue);
    
                } // while
    
                Console.ReadLine();
                #endregion
    
            }
        }
    }

    It generates the following result:

    image

    </end>

    Subscribe to my blog.

    Technorati Tags: ,
  • FAST SharePoint Integration: Sample Code to Display All Available FAST Views

     

    Here is some code that shows all available views from a FAST server based on the named QRServer (the server process with which we communicate).  I offer this up to give you all a taste of what it's like to use the provided FAST API.

     

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Com.FastSearch.Esp.Search;
    using Com.FastSearch.Esp.Search.Http;
    using Com.FastSearch.Esp.Search.Navigation;
    using Com.FastSearch.Esp.Search.Query;
    using Com.FastSearch.Esp.Search.Result;
    using Com.FastSearch.Esp.Search.View;
    using System.Collections.Specialized;
    using System.Collections;
    
    
    namespace Conchango
    {
        class EnumerateFASTViews
        {
            static void Main(string[] args)
            {
    
                ISearchFactory searchFactory;
    
                NameValueCollection nameValueCollection = new NameValueCollection();
    
                nameValueCollection.Add("fastsearchengine", "Com.FastSearch.Esp.Search.Http.HttpSearchFactory");
                nameValueCollection.Add("Com.FastSearch.Esp.Search.Http.QRServers", "fastdemoback:15100");
                nameValueCollection.Add("Com.FastSearch.Esp.Search.Http.RequestMethod", "GET");
    
                searchFactory = SearchFactory.NewInstance(nameValueCollection);
    
                Console.WriteLine("Total Views: [" + searchFactory.GetSearchViewList().Count + "].");
    
                int i = 0;
    
                foreach (object o in searchFactory.GetSearchViewList())
                {
                    Console.WriteLine("View [" + i++ + "]: [" + o.ToString() + "].");
    
                }
                
                Console.ReadLine();
                
            }
        }
    }
    

     

    Note that I consider myself a barely competent C# programmer and I have thin skin, so don't send any raspberries my way, especially re: the "foreach (object o in ...)" construct :)

    </end>

    Technorati Tags: ,

    Subscribe to my blog.

  • FAST and SharePoint Integration First Look

    I've been lucky to have an opportunity to work on a FAST <--> SharePoint integration project and thought I'd continue to share my limited experience with the community.

    Microsoft is in the process of purchasing FAST.  I don't know anything about the schedule except that it should be finished in the "2nd quarter" which I assume means by 06/30/08.

    My project's design, at a very high level, calls for creating a few web parts that have roughly the same look, feel and functionality as the standard MOSS search box and core results web part, but pulling from FAST.  I've made some baby steps in that direction.

    FAST is a dedicated search engine.  It's not based on Microsoft technology, though it's obvious to me that some of the FAST engineers clearly understand MS tech (or they've made use of contractors). 

    FAST:

    FAST is a big monster server product (and I don't mean that in a bad sense; MOSS is a big monster product to me as well).  It appears to be based on Java and I noticed some apache stuff and maybe some PHP.  I wouldn't be surprised if there were other bits of tech mixed in here and there.  It definitely runs on windows server and is working fine in the virtual environment which I've been using.

    It makes use of a facade web service that crawls SharePoint content for indexing in its special FAST way. 

    A SharePoint end user would be pretty much at home with FAST's user interface.  It has simple/advance search, shows results, is big on relevancy (though I don't see how it handles social relevancy).  However, it does go further.  Its stemming seems better.  I really can't articulate it well but I'll just say "it's better."  You can take my word for it, or not :)  I may elaborate on this point in the future, as I learn more.

    MOSS:

    FAST provides a .NET-friendly DLL that provides an interface to the FAST engine.  This makes it possible for us to create web parts or application pages or whatever we want to query FAST and present the results.

    There seems to be a web service interface as well.

    I also have access to a FAST-provided web part that does integrate MOSS and FAST.  I don't know if this is a POC, something that was whipped up as a demo or what.  It's definitely a good learning tool, not so sure if it's production-ready.

    That's it for now.  As I progress through the project, I'll post more.

    </end>

    Technorati Tags: , ,

    Subscribe to my blog.

  • Determine FAST QRServer Port

    In order to communicate with FAST Search via its API, we need to know the port on which the QRServer is running.

    I followed these steps to locate it:

    1. Log into the FAST admin site (http://server:port/admin).
    2. Navigate to System Overview.
    3. Locate "Search Dispatcher" and click the spyglass icon:

      image

       
    4. I successfully used the value, 15100 for "Info Name" = "http":

      image

     

    Notes:

    1. Port 15100 appears to be the default out-of-the-box port number for the QRServer. 

    2. Use this code similar to the following to instantiate a connection to FAST:

          ISearchFactory searchFactory;
      
          NameValueCollection nameValueCollection = new NameValueCollection();
      
          nameValueCollection.Add("fastsearchengine", "Com.FastSearch.Esp.Search.Http.HttpSearchFactory");
          nameValueCollection.Add("Com.FastSearch.Esp.Search.Http.QRServers", "fastdemoback:15102");
          nameValueCollection.Add("Com.FastSearch.Esp.Search.Http.RequestMethod", "GET");
      
          searchFactory = SearchFactory.NewInstance(nameValueCollection);

    3. If you pick a wildly incorrect port, you get a helpful error message:

    image

    4. However, if you pick the port number listed on the overview (15102) you don't get that helpful error message.  Instead, later when you try to access any data via a search or reference a FAST view, you get an error.  Debugging shows that the searchFactory's view count is zero.  You'll be given the message "Failed to fetch Search View List".

    </end>

    Technorati Tags:

    Subscribe to my blog.

    Posted 31 March 2008 15:37 by paul.galvin | 0 Comments
    Filed under:
  • Towards SharePoint Technical Design Patterns: SharePoint Designer Workflow + Event Receiver = High Potency Cocktail

    One of the emerging patterns I find in crafting SharePoint solutions leverages SharePoint Designer workflow and an event receiver.

    Here is a business scenario to put it in context:

    • I upload a document to a doc lib.
    • I kick off multi-step workflow created using SharePoint Designer.
    • At some point during that process, workflow assigns a task to someone (via collect data from user or assign a task).
    • We want to use a KPI to track how long that task is awaiting completion.  The KPI shows green for tasks that are completed or due more than 3 days from now.  It shows yellow if the task is due tomorrow or today.  It shows red if the task is past due.
    • Here's the kicker: I want the date that drives that KPI to be holiday-aware.

    I can't calculate a holiday-aware due date in SharePoint Designer workflow very easily.  I would have to create a custom action or use a 3rd party tool.  However, it's easy enough to calculate such a date in an event receiver.  Merge those two together and we get a pattern like this:

    • Define a hidden yes/no site column on the document library labeled "DoCalcualteDueDate".
    • Initialize it to false.
    • At the appropriate time in the workflow (e.g. just before the "collect data" action), assign that value to True.
    • An ItemUpdate() event receiver looks to see if "DoCalculateDueDate" is true.  Since the event receiver runs on every update, "DoCalculateDueDate" is normally false.
    • When workflow assigns DoCalculateDueDate to true, the event receiver calculates the holiday-aware due date.
    • When the event receiver does this calculation, it sets the DoCalculateDueDate flag to false.

    In the end, SPD workflow is communicated with an event receiver via the DoCalculateDueDate semaphore and we have holiday-aware due dates that are assigned at the exactly correct moment in the workflow's life.  SharePoint Designer controls when the due date is assigned but the event receiver performs the actual calculation and assignment.

    </end>

    Subscribe to my blog.

  • Observed Behavior: Moving SPD Workflows Within a Site Collection

    I'm giving this post a slightly oddball "Observed Behavior" lead since I'm a little leery of drawing conclusions from it.  SPD workflows are ... temperamental.

    People are often asking / wondering / fretting over moving SPD workflows from one place to another.  Today, I followed these steps and made these observations:

    • I created a workflow using SharePoint Designer in a site attached to a document library.
    • The associated document library already housed several documents.
    • I saved the site as a template.
    • When I saved the site as a template, I saved the content as well.
    • I created a new site in the same site collection using that template.

    At this point, I tried to run the workflow.  It promptly terminated itself with the log message, "Failed on start".

    I expected this.  I have low expectations when it comes to moving SPD workflows around.

    I continued:

    • Opened the site in SharePoint Designer.
    • Had a peek at the workflow.  It seemed fine.
    • I clicked "Finish".
    • I ran the workflow.

    This time, it worked fine.

    I'll add that this workflow used the "collect data from user" action which is a relatively complex action under the hood.

    I tentatively conclude that the process of "finishing" the workflow caused SPD to properly associate the SPD workflow with the new document library.  I also conclude the XOML and other XML artifacts are reasonably "loose".  They are not super tightly coupled to the document library.

    What does this mean?  Assuming it's a reliable and reproducible process, there's at least one rough method we can use to move them around.  I don't know if this would work if we crossed site collection boundaries or even more drastically, entire new farms (e.g. dev to stage to prod). 

    If you're reading this and inclined, please post a comment or email me your SharePoint Designer migration story.  I'll gladly update this posting with any insights thus offered.

    </end>

    Subscribe to my blog.

    Technorati Tags:
  • Quick and Simple: Workflow-only Update Field

    It's often useful to store status information in a custom list such as an approval code which should never be directly manipulated by end users.  This is a common business scenario.  I have been working on a project this year that generates various status and reminder dates via SharePoint Designer workflows that then drive KPIs and generally support time-critical business processes. 

    Use a site content type / column to achieve this effect.

    Create a site content type with the status column as shown:

    image

    Note the "Status (for Demo)" field at the bottom.

    Next, click on the column name to access the column's properties.  Select "Hidden (Will not appear in forms)" in the Column Settings section as shown:

    image

    This removes the field from the standard edit/update forms.  However, it is still available in views, KPIs, the object model and anywhere else you want to use it, including SPD workflow. 

    </end>

    Subscribe to my blog.

More Posts Next page »
Powered by Community Server (Personal Edition), by Telligent Systems