How to conditionally start different workflows yet retain a single status field

December 7th, 2006 by davidwise

I have a sitution where a single item in a list can have any one of literally dozens of possible workflows running against it.  Creating views against this is next to impossible as you have to account for all the various status fields that can be involved.  Even the simplest request becomes a nightmare.

Let me explain by example: let's say a particular list item can have three possible workflows: Approve Lease, Approve Purchase, and Approve Loan.  These flows need to go to completely different groups of people in order to get approved so I naturally create three instances of the Approval workflow with the proper people assigned to each.

A user then enters a new request into the system using my custom WebPart.  In that request is a dropdown with three options: "Buy, Borrow, Lease".  Based on this value, my WebPart determines the proper workflow and starts it.  Sort of – more on this in a bit.

With no customization, I would have to create a view for each workflow: Rejected Purchases, Rejected Loans, Rejected Leases and would have to create three more for In Process as well as three more for Approved.  Nine views and we haven't even gotten started yet!  As I mentioned, in my real-world problem, an item can have dozens of possible workflows, so this list of views becomes overwhelming quickly.  In addition, it is unnecessarily complex to determine the answer to a simple request : display all rejected items.  In the above example, I would have to create yet another view and filter it where each workflow status field is Rejected.

What I actually end up doing is much simpler.  I have a special purpose workflow created based on the Approval Template called "Current Workflow".  The WebPart grabs the proper workflow based on the dropdown value, copies the EventData (this is the stuff that differs between workflows based on the same template) and uses it when starting the "Current Workflow".  Thus, all workflow activity limits its updates to the one status field for Current Workflow.  (Please see my other post for information about where the EventData is and how to access it)

The net result is that now I can initiate the proper workflow and all of my views can use the status in the "Current Workflow" field to make their determination for approval / rejected.  Going back to the example, I've cut the number of views from the initial 10 to 3.  I can add any number of additional workflows and I will still only have three views needed.

Workflow Errors: Getting to the Real Message

November 29th, 2006 by davidwise

Troubleshooting SharePoint workflow errors can be a real pain because the extent of your feedback is "Error in Workflow".  That's it.  Nothing in the event log, nothing in the page source and nothing useful in the Workflow history.  However, there is a way to get more detailed information about exactly what happened.

To get the real dirt on the error, you need to enable Diagnostic Logging so that it will write all the details about the error to a log in 12/LOGS.  Go to Central Admin -> Operations -> Diagnostic logging -> Event Throttling.  There you will be able to set how much information you want logged.  There is a tiny catch here though in that you can only change one setting at a time, so set the "Workflow Features" category as shown below and click OK
   

Now go back in and set the values for "Workflow Infrastructure" and click OK
   

Then run whatever process allows you to replicate the error.  Quickly jump into the 12/LOGS folder on the SharePoint server, and open the most recent log file.  The actual workflow error should now be visible towards the bottom of the log.

The Increasing Irrelevance of Google Searches

November 13th, 2006 by davidwise

It seems like the search results coming out of Google are getting less and less relevant.  It is nothing I can put my finger on, given the practical art that is a search engine, it's just that I've been finding a lot of things missing from results.  Things I know are out there.

It used to be that if something was out there on the net, it was in Google.  All you had to do was figure out the right way to ask for it.  Lately, that simply has not been the case.  I regularly run across key blogs, press releases from major companies, and even Usenet postings that are simply not in the search results.  I've often had to find these answers using other search engines or the old fashioned way, by following "useful links" on sites that I frequent.

This problem seems to have escalated about 4-5 months ago.  I've checked with co-workers and they tell me that they've noticed it too.  I hope they fix it soon because the old results are sorely missed.

Microsoft PhotoSynth opens a new world

November 10th, 2006 by davidwise

Microsoft recently released the Tech Preview of their Microsoft PhotoSynth product.  All I can say is: WOW!  This thing has the potential to change not just the way that personal photos are used, but rather, much of the way that the Internet is used now.

If properly executed, this could finally connect the Internet to the real world.  Imagine any picture as a gateway.  You could go to a company's website (like Best Buy) and actually view their corporate headquarters, inside and out.  Big deal, right?  Get this – you could also find the store nearest you and, using a picture of the facade, zoom into the store and, using service features linked to the images, open a chat with the store's customer service rep.  You could read the hours on the door, walk around the store.  You could see what the Manager's Specials are.  If the store is particularly aggressive, you could even see what is on their bargain racks.  You could even see where the store is in the mall for those "Strike Mission" shopping trips.

Want to see what the Vegas strip looks like at night?  Find a picture of it and zoom in.  Servers would have to be set up to manage photo volumes in the same manner that they do html page now, but once the infrastruture is in place, you can go anywhere in the world, simply by looking at a picture of it.

But why stop with present day?  Similar archives can be set up of anywhere, anytime.  Want to see the 1964 Worlds fair?  You can tour everything that there were pictures of.  Naturally, these things are a little more difficult as those images would have to have their gps data figured out and analyzed by hand, but the potential is there.

I realize that this tool is only the very first in a generation of such tools and can't quite do what I suggest, but the possibilities only grow as the technology matures.

Special thanks to Remco  for bringing this to my attention!

Office 2007 Goes Gold

November 7th, 2006 by davidwise

It looks like we are on track to have our hands on the final release of Sharepoint 2007 soon.  Microsoft has just released Office 2007 System to the manufacturers with a current release date of November 30th.  The press release does not name Sharepoint specifically, but since Sharepoint has been part of the Office 2007 System for the entire beta, it's a safe assumption.

Here is the full Microsoft press release

Update:
In an update from Andrew Connell, it appears that the bits will be available on November 16th.